You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/06/10 07:02:20 UTC
[incubator-doris] branch master updated: [Bug] [Vectorized] code dump on aggregate node over union node (#10040)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 495c34fa29 [Bug] [Vectorized] code dump on aggregate node over union node (#10040)
495c34fa29 is described below
commit 495c34fa293e688cd02211efe12f5fdf5215f08f
Author: Pxl <px...@qq.com>
AuthorDate: Fri Jun 10 15:02:14 2022 +0800
[Bug] [Vectorized] code dump on aggregate node over union node (#10040)
* miss check passthrough on vectorized
* format and add test
* update
---
.../src/main/java/org/apache/doris/planner/SetOperationNode.java | 7 +++++++
regression-test/data/query/union/test_union.out | 9 +++++++++
regression-test/suites/query/union/test_union.groovy | 1 +
3 files changed, 17 insertions(+)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/SetOperationNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/SetOperationNode.java
index 12b3a93fe9..257ff517cc 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/SetOperationNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/SetOperationNode.java
@@ -284,9 +284,16 @@ public abstract class SetOperationNode extends PlanNode {
return false;
}
if (VectorizedUtil.isVectorized()) {
+ // On vectorized engine, we have more chance to do passthrough.
if (childSlotRef.getDesc().getSlotOffset() != setOpSlotRef.getDesc().getSlotOffset()) {
return false;
}
+ if (childSlotRef.isNullable() != setOpSlotRef.isNullable()) {
+ return false;
+ }
+ if (childSlotRef.getDesc().getType() != setOpSlotRef.getDesc().getType()) {
+ return false;
+ }
} else {
if (!childSlotRef.getDesc().layoutEquals(setOpSlotRef.getDesc())) {
return false;
diff --git a/regression-test/data/query/union/test_union.out b/regression-test/data/query/union/test_union.out
index 56538122b0..9dd5905feb 100644
--- a/regression-test/data/query/union/test_union.out
+++ b/regression-test/data/query/union/test_union.out
@@ -20,3 +20,12 @@
8 255
9 1991
+-- !select --
+1985 1
+1986 2
+1989 2
+1991 1
+1992 1
+255 1
+32767 1
+
diff --git a/regression-test/suites/query/union/test_union.groovy b/regression-test/suites/query/union/test_union.groovy
index 52ea4c3127..300f3a484b 100644
--- a/regression-test/suites/query/union/test_union.groovy
+++ b/regression-test/suites/query/union/test_union.groovy
@@ -17,4 +17,5 @@
suite("test_union", "query") {
order_qt_select "select k1, k2 from test_query_db.baseall union select k2, k3 from test_query_db.test"
+ order_qt_select "select k2, count(k1) from ((select k2, avg(k1) k1 from test_query_db.baseall group by k2) union all (select k2, count(k1) k1 from test_query_db.test group by k2) )b group by k2 having k2 > 0 order by k2;"
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org