From 54f9e96d7f7bf4f5e7973861b5bebf23592de9e7 Mon Sep 17 00:00:00 2001 From: 924060929 <924060929@qq.com> Date: Tue, 26 Mar 2024 18:03:00 +0800 Subject: [PATCH] save --- .../doris/nereids/rules/analysis/NormalizeAggregate.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/NormalizeAggregate.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/NormalizeAggregate.java index 325be7c5ab1236..ea3de56b034d99 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/NormalizeAggregate.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/NormalizeAggregate.java @@ -231,17 +231,18 @@ private LogicalPlan normalizeAgg(LogicalAggregate aggregate, Optional normalizedAggOutput + ImmutableList.Builder normalizedAggOutputBuilder = ImmutableList.builderWithExpectedSize(groupingByExprs.size() + normalizedAggFuncs.size()); for (NamedExpression pushedGroupByExpr : pushedGroupByExprs) { - normalizedAggOutput.add(pushedGroupByExpr.toSlot()); + normalizedAggOutputBuilder.add(pushedGroupByExpr.toSlot()); } - normalizedAggOutput.addAll( + normalizedAggOutputBuilder.addAll( normalizedAggFuncsToSlotContext.pushDownToNamedExpression(normalizedAggFuncs) ); // create new agg node + ImmutableList normalizedAggOutput = normalizedAggOutputBuilder.build(); LogicalAggregate newAggregate = - aggregate.withNormalized(normalizedGroupExprs, normalizedAggOutput.build(), bottomPlan); + aggregate.withNormalized(normalizedGroupExprs, normalizedAggOutput, bottomPlan); // create upper projects by normalize all output exprs in old LogicalAggregate List upperProjects = normalizeOutput(aggregateOutput,