This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 f5a305bdbc5 [fix](planner) retain groupingSlotIds as materialized for
aggregate (#33064)
f5a305bdbc5 is described below
commit f5a305bdbc56a6d447fd11a44cd5ab27bc19ba45
Author: xueweizhang <[email protected]>
AuthorDate: Sat Mar 30 19:34:22 2024 +0800
[fix](planner) retain groupingSlotIds as materialized for aggregate (#33064)
Signed-off-by: nextdreamblue <[email protected]>
---
.../org/apache/doris/planner/AggregationNode.java | 1 +
.../test_inlineview_with_project.out | 3 ++
.../test_inlineview_with_project.groovy | 61 ++++++++++++++++++++++
3 files changed, 65 insertions(+)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/planner/AggregationNode.java
b/fe/fe-core/src/main/java/org/apache/doris/planner/AggregationNode.java
index 56683c79196..d82527ae9b4 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/AggregationNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/AggregationNode.java
@@ -381,6 +381,7 @@ public class AggregationNode extends PlanNode {
}
}
allRequestIds.forEach(allUnRequestIds::remove);
+ groupingSlotIds.forEach(allUnRequestIds::remove);
allUnRequestIds.forEach(result::remove);
}
return result;
diff --git
a/regression-test/data/correctness_p0/test_inlineview_with_project.out
b/regression-test/data/correctness_p0/test_inlineview_with_project.out
index fad0b3fe446..e6ed3ee5706 100644
--- a/regression-test/data/correctness_p0/test_inlineview_with_project.out
+++ b/regression-test/data/correctness_p0/test_inlineview_with_project.out
@@ -26,3 +26,6 @@
-- !select5 --
3
+-- !select5 --
+3
+
diff --git
a/regression-test/suites/correctness_p0/test_inlineview_with_project.groovy
b/regression-test/suites/correctness_p0/test_inlineview_with_project.groovy
index 07d274ed1a1..387898b25f5 100644
--- a/regression-test/suites/correctness_p0/test_inlineview_with_project.groovy
+++ b/regression-test/suites/correctness_p0/test_inlineview_with_project.groovy
@@ -603,6 +603,67 @@ suite("test_inlineview_with_project") {
) as a;
"""
+ qt_select5 """
+ select
+ count(*)
+ from
+ (
+ select
+ cast(random() * 10000000000000000 as bigint) as id,
+ ga.column1 as column1,
+ ga.column6 as column2,
+ CAST(count(CAST(ga.column1 AS CHAR)) AS CHAR) as column3
+ from
+ (
+ select
+ t1.id as id,
+ upper(t1.caseId) as column1,
+ t1.`timestamp` as column2,
+ lower(t1.content) as column6
+ from
+ (
+ select
+ id,
+ caseId,
+ content,
+ `timestamp`
+ from
+ (
+ select
+ id,
+ caseId,
+ content,
+ `timestamp`
+ from
+ dr_user_test_t2
+ ) aaa
+ ) t1
+ left join (
+ select
+ id,
+ caseId,
+ content,
+ `timestamp`
+ from
+ (
+ select
+ id,
+ caseId,
+ content,
+ `timestamp`
+ from
+ dr_user_test_t2
+ ) bbb
+ ) t2 on t1.id = t2.id
+ ) as ga
+ group by
+ ga.column1,
+ ga.column6
+ ) as tda;
+
+
+ """
+
sql """DROP TABLE IF EXISTS `dr_user_test_t1`;"""
sql """DROP TABLE IF EXISTS `dr_user_test_t2`;"""
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]