This is an automated email from the ASF dual-hosted git repository.
starocean999 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 6b39275cea0 [fix](nereids)4 phase agg may lost parameter in some case
(#34816)
6b39275cea0 is described below
commit 6b39275cea048f65044873a134092b6a33c2e33c
Author: starocean999 <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]