This is an automated email from the ASF dual-hosted git repository.

morrysnow 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 6de9d27edb3 [fix](nereids) fix bug of LogicalRepeat computing uniform 
datatrait (#46352)
6de9d27edb3 is described below

commit 6de9d27edb388e61b6a48848bac9a16390ca8c08
Author: feiniaofeiafei <moail...@selectdb.com>
AuthorDate: Wed Jan 8 10:03:02 2025 +0800

    [fix](nereids) fix bug of LogicalRepeat computing uniform datatrait (#46352)
    
    ### What problem does this PR solve?
    
    Related PR: #43391
    
    Problem Summary:
    repeat's uniform is not right, remove it temprarily
---
 .../doris/nereids/trees/plans/logical/LogicalRepeat.java       |  3 ++-
 .../org/apache/doris/nereids/properties/DataTraitTest.java     |  3 +--
 .../eliminate_gby_key/eliminate_group_by_key_by_uniform.out    | 10 ++++++++++
 .../eliminate_gby_key/eliminate_group_by_key_by_uniform.groovy |  3 +++
 4 files changed, 16 insertions(+), 3 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalRepeat.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalRepeat.java
index 10695f65550..005ac35cf99 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalRepeat.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalRepeat.java
@@ -190,7 +190,8 @@ public class LogicalRepeat<CHILD_TYPE extends Plan> extends 
LogicalUnary<CHILD_T
 
     @Override
     public void computeUniform(DataTrait.Builder builder) {
-        builder.addUniformSlot(child(0).getLogicalProperties().getTrait());
+        // don't generate uniform slot
+        // TODO: this need be supported later
     }
 
     @Override
diff --git 
a/fe/fe-core/src/test/java/org/apache/doris/nereids/properties/DataTraitTest.java
 
b/fe/fe-core/src/test/java/org/apache/doris/nereids/properties/DataTraitTest.java
index 04e8ec7fc32..246495c659d 100644
--- 
a/fe/fe-core/src/test/java/org/apache/doris/nereids/properties/DataTraitTest.java
+++ 
b/fe/fe-core/src/test/java/org/apache/doris/nereids/properties/DataTraitTest.java
@@ -242,8 +242,7 @@ class DataTraitTest extends TestWithFeService {
                 .rewrite()
                 .getPlan();
         System.out.println(plan.getLogicalProperties().getTrait());
-        Assertions.assertTrue(plan.getLogicalProperties()
-                .getTrait().isUniform(plan.getOutput().get(0)));
+        // 
Assertions.assertTrue(plan.getLogicalProperties().getTrait().isUniform(plan.getOutput().get(0)));
     }
 
     @Test
diff --git 
a/regression-test/data/nereids_rules_p0/eliminate_gby_key/eliminate_group_by_key_by_uniform.out
 
b/regression-test/data/nereids_rules_p0/eliminate_gby_key/eliminate_group_by_key_by_uniform.out
index 94cebafa4e9..625b8e75488 100644
--- 
a/regression-test/data/nereids_rules_p0/eliminate_gby_key/eliminate_group_by_key_by_uniform.out
+++ 
b/regression-test/data/nereids_rules_p0/eliminate_gby_key/eliminate_group_by_key_by_uniform.out
@@ -267,3 +267,13 @@ cherry     3
 
 -- !right_anti_right_side --
 
+-- !grouping --
+\N     \N
+\N     1
+\N     2
+\N     3
+1      \N
+1      1
+1      2
+1      3
+
diff --git 
a/regression-test/suites/nereids_rules_p0/eliminate_gby_key/eliminate_group_by_key_by_uniform.groovy
 
b/regression-test/suites/nereids_rules_p0/eliminate_gby_key/eliminate_group_by_key_by_uniform.groovy
index 4375aac316d..399be417c8b 100644
--- 
a/regression-test/suites/nereids_rules_p0/eliminate_gby_key/eliminate_group_by_key_by_uniform.groovy
+++ 
b/regression-test/suites/nereids_rules_p0/eliminate_gby_key/eliminate_group_by_key_by_uniform.groovy
@@ -218,4 +218,7 @@ suite("eliminate_group_by_key_by_uniform") {
     qt_left_anti_left_side "select t1.b from test1 t1 left anti join (select * 
from test2 where b=105)  t2 on t1.a=t2.a where t1.b=1 group by t1.b,t1.a order 
by 1;"
     qt_right_semi_right_side "select t2.b from test1 t1 right semi join 
(select * from test2 where b=105)  t2 on t1.a=t2.a  group by t2.b,t2.a order by 
1;"
     qt_right_anti_right_side "select t2.b from test1 t1 right anti join 
(select * from test2 where b=105)  t2 on t1.a=t2.a  group by t2.b,t2.a order by 
1;"
+
+    //grouping
+    qt_grouping "select k, k3 from (select 1 as k, a k3, sum(b) as sum_k1 from 
 test1  group by cube(k,a)) t group by k,k3 order by 1,2"
 }
\ 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

Reply via email to