This is an automated email from the ASF dual-hosted git repository.
starocean999 pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new f3622800cb2 [fix](nereids)4 phase agg may lost parameter in some case
(#34826)
f3622800cb2 is described below
commit f3622800cb2dcdf54011d7ae17d69f5fb730c0d2
Author: starocean999 <[email protected]>
AuthorDate: Wed May 15 17:48:20 2024 +0800
[fix](nereids)4 phase agg may lost parameter in some case (#34826)
---
.../apache/doris/nereids/rules/implementation/AggregateStrategies.java | 2 +-
regression-test/suites/nereids_syntax_p0/agg_4_phase.groovy | 1 +
2 files changed, 2 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 10b21d0b979..7f31585fd66 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
@@ -1734,7 +1734,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..a9a10e66992 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,5 @@ 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: [email protected]
For additional commands, e-mail: [email protected]