diff --git a/bolt/exec/AggregateCompanionAdapter.cpp b/bolt/exec/AggregateCompanionAdapter.cpp index ab082babf..a27aa3a69 100644 --- a/bolt/exec/AggregateCompanionAdapter.cpp +++ b/bolt/exec/AggregateCompanionAdapter.cpp @@ -397,7 +397,7 @@ bool CompanionFunctionsRegistrar::registerMergeExtractFunctionWithSuffix( const auto& [originalResultType, _] = resolveAggregateFunction(mergeExtractFunctionName, argTypes); if (!originalResultType) { - // TODO: limitation -- result type must be resolveable given + // TODO: limitation -- result type must be resolvable given // intermediate type of the original UDAF. BOLT_UNREACHABLE( "Signatures whose result types are not resolvable given intermediate types should have been excluded."); @@ -504,7 +504,7 @@ bool CompanionFunctionsRegistrar::registerExtractFunctionWithSuffix( auto resultType = resolveVectorFunction(name, argTypes); if (!resultType) { - // TODO: limitation -- result type must be resolveable given + // TODO: limitation -- result type must be resolvable given // intermediate type of the original UDAF. BOLT_UNREACHABLE( "Signatures whose result types are not resolvable given intermediate types should have been excluded."); @@ -561,7 +561,7 @@ bool CompanionFunctionsRegistrar::registerExtractFunction( auto resultType = resolveVectorFunction(name, argTypes); if (!resultType) { - // TODO: limitation -- result type must be resolveable given + // TODO: limitation -- result type must be resolvable given // intermediate type of the original UDAF. BOLT_UNREACHABLE( "Signatures whose result types are not resolvable given intermediate types should have been excluded."); diff --git a/bolt/exec/AggregateCompanionAdapter.h b/bolt/exec/AggregateCompanionAdapter.h index 57586c8b7..bf2b1c4cb 100644 --- a/bolt/exec/AggregateCompanionAdapter.h +++ b/bolt/exec/AggregateCompanionAdapter.h @@ -227,7 +227,7 @@ class CompanionFunctionsRegistrar { // with the same intermediate type, register extract functions with suffix // of their result types in the function names for each of them. Otherwise, // register one extract function of all supported signatures. The result - // type of the original aggregation function is required to be resolveable + // type of the original aggregation function is required to be resolvable // given its intermediate type. When there is already a function of the same // name as the extract companion function, if `overwrite` is true, the // registration is replaced. Otherwise, return false without overwriting the @@ -238,7 +238,7 @@ class CompanionFunctionsRegistrar { bool overwrite = false); // Similar to registerExtractFunction(), the result type of the original - // aggregation function is required to be resolveable given its intermediate + // aggregation function is required to be resolvable given its intermediate // type. If there are multiple signatures of the original aggregation function // with the same intermediate type, register merge-extract functions with // suffix of their result types in the function names for each of them. When diff --git a/bolt/exec/AggregateCompanionSignatures.cpp b/bolt/exec/AggregateCompanionSignatures.cpp index e773715ae..0e8b86612 100644 --- a/bolt/exec/AggregateCompanionSignatures.cpp +++ b/bolt/exec/AggregateCompanionSignatures.cpp @@ -170,12 +170,12 @@ bool CompanionSignatures::hasSameIntermediateTypesAcrossSignatures( const std::vector& signatures) { std::unordered_set seenTypes; for (const auto& signature : signatures) { - auto normalizdType = + auto normalizedType = normalizeType(signature->intermediateType(), signature->variables()); - if (seenTypes.count(normalizdType)) { + if (seenTypes.count(normalizedType)) { return true; } - seenTypes.insert(normalizdType); + seenTypes.insert(normalizedType); } return false; } diff --git a/bolt/exec/AggregateCompanionSignatures.h b/bolt/exec/AggregateCompanionSignatures.h index f146110a1..6a0bd282c 100644 --- a/bolt/exec/AggregateCompanionSignatures.h +++ b/bolt/exec/AggregateCompanionSignatures.h @@ -116,12 +116,12 @@ class CompanionSignatures { std::vector processedSignatures; for (const auto& signature : signatures) { - auto normalizdIntermediateType = + auto normalizedIntermediateType = normalizeType(signature->intermediateType(), signature->variables()); auto normalizedReturnType = normalizeType(signature->returnType(), signature->variables()); if (distinctIntermediateAndResultTypes.count(std::make_pair( - normalizdIntermediateType, normalizedReturnType))) { + normalizedIntermediateType, normalizedReturnType))) { continue; } @@ -135,7 +135,7 @@ class CompanionSignatures { // cannot. We only need one processed signature for each pair of // intermediate and result types. distinctIntermediateAndResultTypes.emplace( - normalizdIntermediateType, normalizedReturnType); + normalizedIntermediateType, normalizedReturnType); } } return processedSignatures; @@ -152,9 +152,9 @@ class CompanionSignatures { std::vector processedSignatures; for (const auto& signature : signatures) { - auto normalizdIntermediateType = + auto normalizedIntermediateType = normalizeType(signature->intermediateType(), signature->variables()); - if (distinctIntermediateTypes.count(normalizdIntermediateType)) { + if (distinctIntermediateTypes.count(normalizedIntermediateType)) { continue; } @@ -166,7 +166,7 @@ class CompanionSignatures { // There may be multiple signatures of the same intermediate type, some // can be processed successfully while some cannot. We only need one // processed signature for each intermediate type. - distinctIntermediateTypes.emplace(normalizdIntermediateType); + distinctIntermediateTypes.emplace(normalizedIntermediateType); } } return processedSignatures; @@ -183,7 +183,7 @@ std::unordered_map usedTypeVariables( bool isResultTypeResolvableGivenIntermediateType( const AggregateFunctionSignaturePtr& signature); -// Return a string that is preorder traveral of `type`. For example, for +// Return a string that is preorder traversal of `type`. For example, for // row(bigint, array(double)), return a string "row_bigint_array_double". std::string toSuffixString(const TypeSignature& type); diff --git a/bolt/functions/lib/aggregates/tests/utils/AggregationTestBase.cpp b/bolt/functions/lib/aggregates/tests/utils/AggregationTestBase.cpp index 741d8c8cc..e3d7631ff 100644 --- a/bolt/functions/lib/aggregates/tests/utils/AggregationTestBase.cpp +++ b/bolt/functions/lib/aggregates/tests/utils/AggregationTestBase.cpp @@ -340,7 +340,7 @@ void AggregationTestBase::testAggregationsWithCompanion( auto groupingKeysWithPartialKey = groupingKeys; groupingKeysWithPartialKey.push_back("k0"); - std::vector paritialAggregates; + std::vector partialAggregates; std::vector mergeAggregates; std::vector extractExpressions; extractExpressions.insert( @@ -352,14 +352,14 @@ void AggregationTestBase::testAggregationsWithCompanion( exec::getCompanionFunctionSignatures(functionNames[i]); BOLT_CHECK(companionSignatures.has_value()); - const auto& [paritialAggregate, mergeAggregate, extractAggregate] = + const auto& [partialAggregate, mergeAggregate, extractAggregate] = getCompanionAggregates( i, *companionSignatures, functionNames[i], aggregateArgs[i], aggregatesArgTypes[i]); - paritialAggregates.push_back(paritialAggregate); + partialAggregates.push_back(partialAggregate); mergeAggregates.push_back(mergeAggregate); extractExpressions.push_back(extractAggregate); } @@ -369,7 +369,7 @@ void AggregationTestBase::testAggregationsWithCompanion( PlanBuilder builder(pool()); builder.values(dataWithExtraGroupingKey); preAggregationProcessing(builder); - builder.partialAggregation(groupingKeysWithPartialKey, paritialAggregates) + builder.partialAggregation(groupingKeysWithPartialKey, partialAggregates) .finalAggregation() .partialAggregation(groupingKeys, mergeAggregates) .finalAggregation() @@ -394,7 +394,7 @@ void AggregationTestBase::testAggregationsWithCompanion( // repartitioning to split input into multiple batches. core::PlanNodeId partialNodeId; builder.localPartitionRoundRobinRow() - .partialAggregation(groupingKeysWithPartialKey, paritialAggregates) + .partialAggregation(groupingKeysWithPartialKey, partialAggregates) .capturePlanNodeId(partialNodeId) .localPartition(groupingKeysWithPartialKey) .finalAggregation() @@ -434,7 +434,7 @@ void AggregationTestBase::testAggregationsWithCompanion( PlanBuilder builder(pool()); builder.values(dataWithExtraGroupingKey); preAggregationProcessing(builder); - builder.singleAggregation(groupingKeysWithPartialKey, paritialAggregates) + builder.singleAggregation(groupingKeysWithPartialKey, partialAggregates) .singleAggregation(groupingKeys, mergeAggregates) .project(extractExpressions); @@ -452,7 +452,7 @@ void AggregationTestBase::testAggregationsWithCompanion( PlanBuilder builder(pool()); builder.values(dataWithExtraGroupingKey); preAggregationProcessing(builder); - builder.partialAggregation(groupingKeysWithPartialKey, paritialAggregates) + builder.partialAggregation(groupingKeysWithPartialKey, partialAggregates) .intermediateAggregation() .finalAggregation() .partialAggregation(groupingKeys, mergeAggregates) @@ -474,7 +474,7 @@ void AggregationTestBase::testAggregationsWithCompanion( PlanBuilder builder(pool()); builder.values(dataWithExtraGroupingKey); preAggregationProcessing(builder); - builder.partialAggregation(groupingKeysWithPartialKey, paritialAggregates) + builder.partialAggregation(groupingKeysWithPartialKey, partialAggregates) .localPartition(groupingKeysWithPartialKey) .finalAggregation() .partialAggregation(groupingKeys, mergeAggregates) @@ -497,7 +497,7 @@ void AggregationTestBase::testAggregationsWithCompanion( PlanBuilder builder(pool()); builder.values(dataWithExtraGroupingKey); preAggregationProcessing(builder); - builder.partialAggregation(groupingKeysWithPartialKey, paritialAggregates) + builder.partialAggregation(groupingKeysWithPartialKey, partialAggregates) .localPartition(groupingKeysWithPartialKey) .intermediateAggregation() .localPartition(groupingKeysWithPartialKey) @@ -530,7 +530,7 @@ void AggregationTestBase::testAggregationsWithCompanion( SCOPED_TRACE("Streaming partial"); auto partialResult = validateStreamingInTestAggregations( [&](auto& builder) { builder.values(dataWithExtraGroupingKey); }, - paritialAggregates, + partialAggregates, config); validateStreamingInTestAggregations(