Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bolt/exec/AggregateCompanionAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down Expand Up @@ -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.");
Expand Down Expand Up @@ -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.");
Expand Down
4 changes: 2 additions & 2 deletions bolt/exec/AggregateCompanionAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions bolt/exec/AggregateCompanionSignatures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ bool CompanionSignatures::hasSameIntermediateTypesAcrossSignatures(
const std::vector<AggregateFunctionSignaturePtr>& signatures) {
std::unordered_set<TypeSignature> 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;
}
Expand Down
14 changes: 7 additions & 7 deletions bolt/exec/AggregateCompanionSignatures.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ class CompanionSignatures {
std::vector<T> 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;
}

Expand All @@ -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;
Expand All @@ -152,9 +152,9 @@ class CompanionSignatures {
std::vector<AggregateFunctionSignaturePtr> processedSignatures;

for (const auto& signature : signatures) {
auto normalizdIntermediateType =
auto normalizedIntermediateType =
normalizeType(signature->intermediateType(), signature->variables());
if (distinctIntermediateTypes.count(normalizdIntermediateType)) {
if (distinctIntermediateTypes.count(normalizedIntermediateType)) {
continue;
}

Expand All @@ -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;
Expand All @@ -183,7 +183,7 @@ std::unordered_map<std::string, SignatureVariable> 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);

Expand Down
20 changes: 10 additions & 10 deletions bolt/functions/lib/aggregates/tests/utils/AggregationTestBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ void AggregationTestBase::testAggregationsWithCompanion(
auto groupingKeysWithPartialKey = groupingKeys;
groupingKeysWithPartialKey.push_back("k0");

std::vector<std::string> paritialAggregates;
std::vector<std::string> partialAggregates;
std::vector<std::string> mergeAggregates;
std::vector<std::string> extractExpressions;
extractExpressions.insert(
Expand All @@ -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);
}
Expand All @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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);

Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -530,7 +530,7 @@ void AggregationTestBase::testAggregationsWithCompanion(
SCOPED_TRACE("Streaming partial");
auto partialResult = validateStreamingInTestAggregations(
[&](auto& builder) { builder.values(dataWithExtraGroupingKey); },
paritialAggregates,
partialAggregates,
config);

validateStreamingInTestAggregations(
Expand Down
Loading