This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 8264078a9a8e38f83f89b14ef2e10e6298c48804 Author: starocean999 <40539150+starocean...@users.noreply.github.com> AuthorDate: Wed May 15 17:54:30 2024 +0800 [fix](nereids)4 phase agg may lost parameter in some case (#34816) --- .../apache/doris/nereids/rules/implementation/AggregateStrategies.java | 2 +- regression-test/suites/nereids_syntax_p0/agg_4_phase.groovy | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/AggregateStrategies.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/AggregateStrategies.java index edbd28677b4..e1095df7bab 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/AggregateStrategies.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/implementation/AggregateStrategies.java @@ -1766,7 +1766,7 @@ public class AggregateStrategies implements ImplementationRuleFactory { AggregateFunction nonDistinct = aggregateFunction .withDistinctAndChildren(false, ImmutableList.copyOf(aggChild)); AggregateExpression nonDistinctAggExpr = new AggregateExpression(nonDistinct, - distinctLocalParam, aggregateFunction.child(0)); + distinctLocalParam, aggregateFunction); return nonDistinctAggExpr; } else { needUpdateSlot.add(aggregateFunction); diff --git a/regression-test/suites/nereids_syntax_p0/agg_4_phase.groovy b/regression-test/suites/nereids_syntax_p0/agg_4_phase.groovy index 4a3e60afb73..19cac99c153 100644 --- a/regression-test/suites/nereids_syntax_p0/agg_4_phase.groovy +++ b/regression-test/suites/nereids_syntax_p0/agg_4_phase.groovy @@ -56,4 +56,6 @@ suite("agg_4_phase") { contains ":VAGGREGATE (update serialize)" } qt_4phase (test_sql) + + sql """select GROUP_CONCAT(distinct name, " ") from agg_4_phase_tbl;""" } \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org