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

jakevin 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 410441b5162 [enhancement](Nereids): remove LAsscom in Bushy Tree 
RuleSet (#25465)
410441b5162 is described below

commit 410441b5162befc690b3a4a9620762364abd59e6
Author: jakevin <jakevin...@gmail.com>
AuthorDate: Tue Oct 17 11:22:52 2023 +0800

    [enhancement](Nereids): remove LAsscom in Bushy Tree RuleSet (#25465)
    
    - Bushy Tree RuleSet don't need LAsscom
    - fix bug: rule pattern shouldn't use same name
---
 .../org/apache/doris/nereids/rules/RuleSet.java    |  2 -
 .../org/apache/doris/nereids/rules/RuleType.java   | 12 +++--
 .../join/InnerJoinLeftAssociateProject.java        |  2 +-
 .../join/InnerJoinRightAssociateProject.java       |  2 +-
 .../exploration/join/JoinExchangeBothProject.java  |  2 +-
 .../exploration/join/JoinExchangeLeftProject.java  |  2 +-
 .../exploration/join/JoinExchangeRightProject.java |  2 +-
 .../join/LogicalJoinSemiJoinTranspose.java         |  4 +-
 .../join/LogicalJoinSemiJoinTransposeProject.java  |  4 +-
 .../join/PushdownProjectThroughInnerOuterJoin.java |  8 +--
 .../join/PushdownProjectThroughSemiJoin.java       |  8 +--
 .../org/apache/doris/nereids/memo/RankTest.java    | 11 +++--
 .../data/nereids_ssb_shape_sf100_p0/shape/q2.1.out | 21 ++++----
 .../data/nereids_ssb_shape_sf100_p0/shape/q4.1.out | 39 +++++++--------
 .../nereids_tpcds_shape_sf100_p0/shape/query11.out | 23 ++++-----
 .../nereids_tpcds_shape_sf100_p0/shape/query21.out | 19 ++++----
 .../nereids_tpcds_shape_sf100_p0/shape/query23.out | 13 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query26.out | 13 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query27.out | 13 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query32.out | 13 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query34.out | 13 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query36.out | 25 +++++-----
 .../nereids_tpcds_shape_sf100_p0/shape/query37.out | 15 +++---
 .../nereids_tpcds_shape_sf100_p0/shape/query39.out | 17 ++++---
 .../nereids_tpcds_shape_sf100_p0/shape/query43.out | 13 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query44.out | 57 +++++++++++-----------
 .../nereids_tpcds_shape_sf100_p0/shape/query46.out | 18 ++++---
 .../nereids_tpcds_shape_sf100_p0/shape/query50.out | 14 +++---
 .../nereids_tpcds_shape_sf100_p0/shape/query65.out | 55 +++++++++++----------
 .../nereids_tpcds_shape_sf100_p0/shape/query67.out | 13 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query68.out | 13 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query7.out  | 13 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query70.out | 13 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query73.out | 13 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query75.out | 39 ++++++++-------
 .../nereids_tpcds_shape_sf100_p0/shape/query79.out | 13 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query8.out  | 13 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query81.out | 10 ++--
 .../nereids_tpcds_shape_sf100_p0/shape/query82.out | 15 +++---
 .../nereids_tpcds_shape_sf100_p0/shape/query89.out | 13 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query92.out | 13 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query99.out |  8 +--
 .../nereids_tpch_shape_sf1000_p0/shape/q21.out     | 10 ++--
 .../nereids_tpcds_shape_sf100_p0/rf/ds_rf46.groovy |  3 +-
 .../nereids_tpcds_shape_sf100_p0/rf/ds_rf50.groovy |  3 +-
 .../nereids_tpcds_shape_sf100_p0/rf/ds_rf99.groovy |  3 +-
 .../nereids_tpch_shape_sf1000_p0/rf/h_rf21.groovy  |  2 +-
 47 files changed, 340 insertions(+), 310 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/RuleSet.java 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/RuleSet.java
index d10f0cde79c..b8bb9e8c46e 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/RuleSet.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/RuleSet.java
@@ -188,8 +188,6 @@ public class RuleSet {
 
     public static final List<Rule> BUSHY_TREE_JOIN_REORDER = 
planRuleFactories()
             .add(JoinCommute.BUSHY)
-            .add(InnerJoinLAsscom.INSTANCE)
-            .add(InnerJoinLAsscomProject.INSTANCE)
             .add(InnerJoinLeftAssociate.INSTANCE)
             .add(InnerJoinLeftAssociateProject.INSTANCE)
             .add(InnerJoinRightAssociate.INSTANCE)
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/RuleType.java 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/RuleType.java
index eeec3d30fb9..617cb352908 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/RuleType.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/RuleType.java
@@ -290,8 +290,10 @@ public enum RuleType {
     LOGICAL_OUTER_JOIN_LASSCOM_PROJECT(RuleTypeClass.EXPLORATION),
     LOGICAL_OUTER_JOIN_ASSOC(RuleTypeClass.EXPLORATION),
     LOGICAL_OUTER_JOIN_ASSOC_PROJECT(RuleTypeClass.EXPLORATION),
-    LOGICAL_JOIN_LOGICAL_SEMI_JOIN_TRANSPOSE(RuleTypeClass.EXPLORATION),
-    
LOGICAL_JOIN_LOGICAL_SEMI_JOIN_TRANSPOSE_PROJECT(RuleTypeClass.EXPLORATION),
+    LOGICAL_JOIN_LOGICAL_SEMI_JOIN_TRANSPOSE_LEFT(RuleTypeClass.EXPLORATION),
+    LOGICAL_JOIN_LOGICAL_SEMI_JOIN_TRANSPOSE_RIGHT(RuleTypeClass.EXPLORATION),
+    
LOGICAL_JOIN_LOGICAL_SEMI_JOIN_TRANSPOSE_LEFT_PROJECT(RuleTypeClass.EXPLORATION),
+    
LOGICAL_JOIN_LOGICAL_SEMI_JOIN_TRANSPOSE_RIGHT_PROJECT(RuleTypeClass.EXPLORATION),
     LOGICAL_SEMI_JOIN_SEMI_JOIN_TRANSPOSE(RuleTypeClass.EXPLORATION),
     LOGICAL_SEMI_JOIN_SEMI_JOIN_TRANSPOSE_PROJECT(RuleTypeClass.EXPLORATION),
     LOGICAL_JOIN_EXCHANGE(RuleTypeClass.EXPLORATION),
@@ -305,8 +307,10 @@ public enum RuleType {
     TRANSPOSE_LOGICAL_AGG_SEMI_JOIN(RuleTypeClass.EXPLORATION),
     TRANSPOSE_LOGICAL_AGG_SEMI_JOIN_PROJECT(RuleTypeClass.EXPLORATION),
     TRANSPOSE_LOGICAL_JOIN_UNION(RuleTypeClass.EXPLORATION),
-    PUSHDOWN_PROJECT_THROUGH_SEMI_JOIN(RuleTypeClass.EXPLORATION),
-    PUSHDOWN_PROJECT_THROUGH_INNER_OUTER_JOIN(RuleTypeClass.EXPLORATION),
+    PUSHDOWN_PROJECT_THROUGH_SEMI_JOIN_LEFT(RuleTypeClass.EXPLORATION),
+    PUSHDOWN_PROJECT_THROUGH_SEMI_JOIN_RIGHT(RuleTypeClass.EXPLORATION),
+    PUSHDOWN_PROJECT_THROUGH_INNER_OUTER_JOIN_LEFT(RuleTypeClass.EXPLORATION),
+    PUSHDOWN_PROJECT_THROUGH_INNER_OUTER_JOIN_RIGHT(RuleTypeClass.EXPLORATION),
     EAGER_COUNT(RuleTypeClass.EXPLORATION),
     EAGER_GROUP_BY(RuleTypeClass.EXPLORATION),
     EAGER_GROUP_BY_COUNT(RuleTypeClass.EXPLORATION),
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLeftAssociateProject.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLeftAssociateProject.java
index 58e098e9907..35effb34c68 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLeftAssociateProject.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLeftAssociateProject.java
@@ -92,6 +92,6 @@ public class InnerJoinLeftAssociateProject extends 
OneExplorationRuleFactory {
                     InnerJoinLeftAssociate.setNewTopJoinReorder(newTopJoin, 
topJoin);
 
                     return 
CBOUtils.projectOrSelf(ImmutableList.copyOf(topJoin.getOutput()), newTopJoin);
-                }).toRule(RuleType.LOGICAL_INNER_JOIN_LEFT_ASSOCIATIVE);
+                
}).toRule(RuleType.LOGICAL_INNER_JOIN_LEFT_ASSOCIATIVE_PROJECT);
     }
 }
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinRightAssociateProject.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinRightAssociateProject.java
index 82a4a53a6b2..6b8d918af6b 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinRightAssociateProject.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinRightAssociateProject.java
@@ -89,7 +89,7 @@ public class InnerJoinRightAssociateProject extends 
OneExplorationRuleFactory {
                     setNewTopJoinReorder(newTopJoin, topJoin);
 
                     return 
CBOUtils.projectOrSelf(ImmutableList.copyOf(topJoin.getOutput()), newTopJoin);
-                }).toRule(RuleType.LOGICAL_INNER_JOIN_RIGHT_ASSOCIATIVE);
+                
}).toRule(RuleType.LOGICAL_INNER_JOIN_RIGHT_ASSOCIATIVE_PROJECT);
     }
 
     /**
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeBothProject.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeBothProject.java
index f0c1f7e5de5..0e5a010b1bf 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeBothProject.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeBothProject.java
@@ -106,7 +106,7 @@ public class JoinExchangeBothProject extends 
OneExplorationRuleFactory {
                     JoinExchange.setNewTopJoinReorder(newTopJoin, topJoin);
 
                     return 
CBOUtils.projectOrSelf(ImmutableList.copyOf(topJoin.getOutput()), newTopJoin);
-                }).toRule(RuleType.LOGICAL_JOIN_EXCHANGE);
+                }).toRule(RuleType.LOGICAL_JOIN_EXCHANGE_BOTH_PROJECT);
     }
 
     /**
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeLeftProject.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeLeftProject.java
index 94878fd7c32..52ecf6338c4 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeLeftProject.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeLeftProject.java
@@ -106,7 +106,7 @@ public class JoinExchangeLeftProject extends 
OneExplorationRuleFactory {
                     JoinExchange.setNewTopJoinReorder(newTopJoin, topJoin);
 
                     return 
CBOUtils.projectOrSelf(ImmutableList.copyOf(topJoin.getOutput()), newTopJoin);
-                }).toRule(RuleType.LOGICAL_JOIN_EXCHANGE);
+                }).toRule(RuleType.LOGICAL_JOIN_EXCHANGE_LEFT_PROJECT);
     }
 
     /**
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeRightProject.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeRightProject.java
index 5b7b62b3127..60be54b820d 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeRightProject.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinExchangeRightProject.java
@@ -106,7 +106,7 @@ public class JoinExchangeRightProject extends 
OneExplorationRuleFactory {
                     JoinExchange.setNewTopJoinReorder(newTopJoin, topJoin);
 
                     return 
CBOUtils.projectOrSelf(ImmutableList.copyOf(topJoin.getOutput()), newTopJoin);
-                }).toRule(RuleType.LOGICAL_JOIN_EXCHANGE);
+                }).toRule(RuleType.LOGICAL_JOIN_EXCHANGE_RIGHT_PROJECT);
     }
 
     /**
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/LogicalJoinSemiJoinTranspose.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/LogicalJoinSemiJoinTranspose.java
index 0f0df1567ba..a1631386b83 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/LogicalJoinSemiJoinTranspose.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/LogicalJoinSemiJoinTranspose.java
@@ -54,7 +54,7 @@ public class LogicalJoinSemiJoinTranspose implements 
ExplorationRuleFactory {
 
                             Plan newBottomJoin = 
topJoin.withChildrenNoContext(a, c);
                             return 
bottomJoin.withChildrenNoContext(newBottomJoin, b);
-                        
}).toRule(RuleType.LOGICAL_JOIN_LOGICAL_SEMI_JOIN_TRANSPOSE),
+                        
}).toRule(RuleType.LOGICAL_JOIN_LOGICAL_SEMI_JOIN_TRANSPOSE_LEFT),
 
                 logicalJoin(group(), logicalJoin())
                         .when(topJoin -> 
(topJoin.right().getJoinType().isLeftSemiOrAntiJoin()
@@ -71,7 +71,7 @@ public class LogicalJoinSemiJoinTranspose implements 
ExplorationRuleFactory {
 
                             Plan newBottomJoin = 
topJoin.withChildrenNoContext(a, b);
                             return 
bottomJoin.withChildrenNoContext(newBottomJoin, c);
-                        
}).toRule(RuleType.LOGICAL_JOIN_LOGICAL_SEMI_JOIN_TRANSPOSE)
+                        
}).toRule(RuleType.LOGICAL_JOIN_LOGICAL_SEMI_JOIN_TRANSPOSE_RIGHT)
         );
     }
 }
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/LogicalJoinSemiJoinTransposeProject.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/LogicalJoinSemiJoinTransposeProject.java
index 8d0ef36ef38..3986cc8bb56 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/LogicalJoinSemiJoinTransposeProject.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/LogicalJoinSemiJoinTransposeProject.java
@@ -59,7 +59,7 @@ public class LogicalJoinSemiJoinTransposeProject implements 
ExplorationRuleFacto
                             Plan newTopJoin = 
bottomJoin.withChildrenNoContext(newBottomJoin, b);
                             return 
CBOUtils.projectOrSelf(ImmutableList.copyOf(topJoin.getOutput()),
                                     newTopJoin);
-                        
}).toRule(RuleType.LOGICAL_JOIN_LOGICAL_SEMI_JOIN_TRANSPOSE_PROJECT),
+                        
}).toRule(RuleType.LOGICAL_JOIN_LOGICAL_SEMI_JOIN_TRANSPOSE_LEFT_PROJECT),
 
                 logicalJoin(group(), logicalProject(logicalJoin()))
                         .when(topJoin -> 
(topJoin.right().child().getJoinType().isLeftSemiOrAntiJoin()
@@ -80,7 +80,7 @@ public class LogicalJoinSemiJoinTransposeProject implements 
ExplorationRuleFacto
                             Plan newTopJoin = 
bottomJoin.withChildrenNoContext(newBottomJoin, c);
                             return 
CBOUtils.projectOrSelf(ImmutableList.copyOf(topJoin.getOutput()),
                                     newTopJoin);
-                        
}).toRule(RuleType.LOGICAL_JOIN_LOGICAL_SEMI_JOIN_TRANSPOSE_PROJECT)
+                        
}).toRule(RuleType.LOGICAL_JOIN_LOGICAL_SEMI_JOIN_TRANSPOSE_RIGHT_PROJECT)
         );
     }
 }
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughInnerOuterJoin.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughInnerOuterJoin.java
index 5c39097108d..03fd3e8a8d8 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughInnerOuterJoin.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughInnerOuterJoin.java
@@ -56,7 +56,7 @@ public class PushdownProjectThroughInnerOuterJoin implements 
ExplorationRuleFact
     @Override
     public List<Rule> buildRules() {
         return ImmutableList.of(
-                logicalJoin(logicalProject(logicalJoin()), group())
+                
logicalJoin(logicalProject(logicalJoin().whenNot(LogicalJoin::isMarkJoin)), 
group())
                         .when(j -> j.left().child().getJoinType().isOuterJoin()
                                 || 
j.left().child().getJoinType().isInnerJoin())
                         // Just pushdown project with non-column expr like 
(t.id + 1)
@@ -69,8 +69,8 @@ public class PushdownProjectThroughInnerOuterJoin implements 
ExplorationRuleFact
                                 return null;
                             }
                             return topJoin.withChildren(newLeft, 
topJoin.right());
-                        
}).toRule(RuleType.PUSHDOWN_PROJECT_THROUGH_INNER_OUTER_JOIN),
-                logicalJoin(group(), logicalProject(logicalJoin()))
+                        
}).toRule(RuleType.PUSHDOWN_PROJECT_THROUGH_INNER_OUTER_JOIN_LEFT),
+                logicalJoin(group(), 
logicalProject(logicalJoin().whenNot(LogicalJoin::isMarkJoin)))
                         .when(j -> 
j.right().child().getJoinType().isOuterJoin()
                                 || 
j.right().child().getJoinType().isInnerJoin())
                         // Just pushdown project with non-column expr like 
(t.id + 1)
@@ -83,7 +83,7 @@ public class PushdownProjectThroughInnerOuterJoin implements 
ExplorationRuleFact
                                 return null;
                             }
                             return topJoin.withChildren(topJoin.left(), 
newRight);
-                        
}).toRule(RuleType.PUSHDOWN_PROJECT_THROUGH_INNER_OUTER_JOIN)
+                        
}).toRule(RuleType.PUSHDOWN_PROJECT_THROUGH_INNER_OUTER_JOIN_RIGHT)
         );
     }
 
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughSemiJoin.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughSemiJoin.java
index 485631cb11b..12199408236 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughSemiJoin.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughSemiJoin.java
@@ -54,7 +54,7 @@ public class PushdownProjectThroughSemiJoin implements 
ExplorationRuleFactory {
     @Override
     public List<Rule> buildRules() {
         return ImmutableList.of(
-                logicalJoin(logicalProject(logicalJoin()), group())
+                
logicalJoin(logicalProject(logicalJoin().whenNot(LogicalJoin::isMarkJoin)), 
group())
                     .when(j -> 
j.left().child().getJoinType().isLeftSemiOrAntiJoin())
                     // Just pushdown project with non-column expr like (t.id + 
1)
                     .whenNot(j -> j.left().isAllSlots())
@@ -63,9 +63,9 @@ public class PushdownProjectThroughSemiJoin implements 
ExplorationRuleFactory {
                         LogicalProject<LogicalJoin<GroupPlan, GroupPlan>> 
project = topJoin.left();
                         Plan newLeft = pushdownProject(project);
                         return topJoin.withChildren(newLeft, topJoin.right());
-                    }).toRule(RuleType.PUSHDOWN_PROJECT_THROUGH_SEMI_JOIN),
+                    
}).toRule(RuleType.PUSHDOWN_PROJECT_THROUGH_SEMI_JOIN_LEFT),
 
-                logicalJoin(group(), logicalProject(logicalJoin()))
+                logicalJoin(group(), 
logicalProject(logicalJoin().whenNot(LogicalJoin::isMarkJoin)))
                     .when(j -> 
j.right().child().getJoinType().isLeftSemiOrAntiJoin())
                     // Just pushdown project with non-column expr like (t.id + 
1)
                     .whenNot(j -> j.right().isAllSlots())
@@ -74,7 +74,7 @@ public class PushdownProjectThroughSemiJoin implements 
ExplorationRuleFactory {
                         LogicalProject<LogicalJoin<GroupPlan, GroupPlan>> 
project = topJoin.right();
                         Plan newRight = pushdownProject(project);
                         return topJoin.withChildren(topJoin.left(), newRight);
-                    }).toRule(RuleType.PUSHDOWN_PROJECT_THROUGH_SEMI_JOIN)
+                    
}).toRule(RuleType.PUSHDOWN_PROJECT_THROUGH_SEMI_JOIN_RIGHT)
                 );
     }
 
diff --git 
a/fe/fe-core/src/test/java/org/apache/doris/nereids/memo/RankTest.java 
b/fe/fe-core/src/test/java/org/apache/doris/nereids/memo/RankTest.java
index 4c81c0f6cc0..ba0f4bd26c0 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/nereids/memo/RankTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/memo/RankTest.java
@@ -34,14 +34,15 @@ import org.junit.jupiter.api.Test;
 import java.util.HashSet;
 import java.util.Set;
 
-public class RankTest extends TestWithFeService {
+class RankTest extends TestWithFeService {
     @Test
     void test() {
         HyperGraphBuilder hyperGraphBuilder = new 
HyperGraphBuilder(Sets.newHashSet(JoinType.INNER_JOIN));
         hyperGraphBuilder.init(0, 1, 2);
-        Plan plan = hyperGraphBuilder.addEdge(JoinType.INNER_JOIN, 1, 2)
-                                     .addEdge(JoinType.INNER_JOIN, 0, 1)
-                                     .buildPlan();
+        Plan plan = hyperGraphBuilder
+                .addEdge(JoinType.INNER_JOIN, 0, 1)
+                .addEdge(JoinType.INNER_JOIN, 1, 2)
+                .buildPlan();
         plan = new LogicalProject(plan.getOutput(), plan);
         CascadesContext cascadesContext = 
MemoTestUtils.createCascadesContext(connectContext, plan);
         hyperGraphBuilder.initStats(cascadesContext);
@@ -54,7 +55,7 @@ public class RankTest extends TestWithFeService {
             shape.add(memo.unrank(memo.rank(i + 1).first).shape(""));
         }
         System.out.println(shape);
-        Assertions.assertEquals(3, shape.size());
+        Assertions.assertEquals(4, shape.size());
         Assertions.assertEquals(bestPlan.shape(""), 
memo.unrank(memo.rank(1).first).shape(""));
     }
 }
diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.1.out 
b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.1.out
index 0f686b1356b..5bd7275b448 100644
--- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.1.out
+++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.1.out
@@ -9,18 +9,19 @@ PhysicalResultSink
 ------------hashAgg[LOCAL]
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = 
dates.d_datekey))otherCondition=()
-------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = 
supplier.s_suppkey))otherCondition=()
---------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey 
= part.p_partkey))otherCondition=()
-----------------------PhysicalProject
-------------------------PhysicalOlapScan[lineorder]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey 
= supplier.s_suppkey))otherCondition=()
+----------------------hashJoin[INNER_JOIN] 
hashCondition=((lineorder.lo_partkey = part.p_partkey))otherCondition=()
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[lineorder]
+------------------------PhysicalDistribute
+--------------------------PhysicalProject
+----------------------------filter((part.p_category = 'MFGR#12'))
+------------------------------PhysicalOlapScan[part]
 ----------------------PhysicalDistribute
 ------------------------PhysicalProject
---------------------------filter((part.p_category = 'MFGR#12'))
-----------------------------PhysicalOlapScan[part]
---------------------PhysicalDistribute
-----------------------PhysicalProject
-------------------------filter((supplier.s_region = 'AMERICA'))
---------------------------PhysicalOlapScan[supplier]
+--------------------------filter((supplier.s_region = 'AMERICA'))
+----------------------------PhysicalOlapScan[supplier]
 ------------------PhysicalDistribute
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[dates]
diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.1.out 
b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.1.out
index 07111ec2da3..e8c9005addf 100644
--- a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.1.out
+++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.1.out
@@ -9,26 +9,27 @@ PhysicalResultSink
 ------------hashAgg[LOCAL]
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = 
dates.d_datekey))otherCondition=()
-------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = 
part.p_partkey))otherCondition=()
---------------------PhysicalDistribute
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN] 
hashCondition=((lineorder.lo_custkey = customer.c_custkey))otherCondition=()
---------------------------PhysicalDistribute
-----------------------------hashJoin[INNER_JOIN] 
hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey))otherCondition=()
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[lineorder]
-------------------------------PhysicalDistribute
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey 
= part.p_partkey))otherCondition=()
+----------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN] 
hashCondition=((lineorder.lo_custkey = customer.c_custkey))otherCondition=()
+----------------------------PhysicalDistribute
+------------------------------hashJoin[INNER_JOIN] 
hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey))otherCondition=()
 --------------------------------PhysicalProject
-----------------------------------filter((supplier.s_region = 'AMERICA'))
-------------------------------------PhysicalOlapScan[supplier]
---------------------------PhysicalDistribute
-----------------------------PhysicalProject
-------------------------------filter((customer.c_region = 'AMERICA'))
---------------------------------PhysicalOlapScan[customer]
---------------------PhysicalDistribute
-----------------------PhysicalProject
-------------------------filter(p_mfgr IN ('MFGR#1', 'MFGR#2'))
---------------------------PhysicalOlapScan[part]
+----------------------------------PhysicalOlapScan[lineorder]
+--------------------------------PhysicalDistribute
+----------------------------------PhysicalProject
+------------------------------------filter((supplier.s_region = 'AMERICA'))
+--------------------------------------PhysicalOlapScan[supplier]
+----------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------filter((customer.c_region = 'AMERICA'))
+----------------------------------PhysicalOlapScan[customer]
+----------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------filter(p_mfgr IN ('MFGR#1', 'MFGR#2'))
+----------------------------PhysicalOlapScan[part]
 ------------------PhysicalDistribute
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[dates]
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query11.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query11.out
index 3cb337bdcdb..661b975e08a 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query11.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query11.out
@@ -43,20 +43,21 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------PhysicalTopN
 ----------PhysicalProject
 ------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = 
t_w_secyear.customer_id))otherCondition=((if((year_total > 0.00), 
(cast(year_total as DOUBLE) / cast(year_total as DOUBLE)), 0) > if((year_total 
> 0.00), (cast(year_total as DOUBLE) / cast(year_total as DOUBLE)), 0)))
---------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = 
t_s_firstyear.customer_id))otherCondition=()
-----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id 
= t_w_firstyear.customer_id))otherCondition=()
-------------------PhysicalDistribute
---------------------PhysicalProject
-----------------------filter((t_s_firstyear.dyear = 2001) and 
(t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.00))
-------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = 
t_s_firstyear.customer_id))otherCondition=()
+------------------hashJoin[INNER_JOIN] 
hashCondition=((t_s_firstyear.customer_id = 
t_w_firstyear.customer_id))otherCondition=()
+--------------------PhysicalDistribute
+----------------------PhysicalProject
+------------------------filter((t_s_firstyear.dyear = 2001) and 
(t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.00))
+--------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+--------------------PhysicalDistribute
+----------------------PhysicalProject
+------------------------filter((t_w_firstyear.dyear = 2001) and 
(t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.00))
+--------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 ------------------PhysicalDistribute
 --------------------PhysicalProject
-----------------------filter((t_w_firstyear.dyear = 2001) and 
(t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.00))
+----------------------filter((t_s_secyear.dyear = 2002) and 
(t_s_secyear.sale_type = 's'))
 ------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
-----------------PhysicalDistribute
-------------------PhysicalProject
---------------------filter((t_s_secyear.dyear = 2002) and 
(t_s_secyear.sale_type = 's'))
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 --------------PhysicalDistribute
 ----------------PhysicalProject
 ------------------filter((t_w_secyear.dyear = 2002) and (t_w_secyear.sale_type 
= 'w'))
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query21.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query21.out
index cbc9beeca21..fcbd2facf03 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query21.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query21.out
@@ -10,17 +10,18 @@ PhysicalResultSink
 --------------hashAgg[LOCAL]
 ----------------PhysicalProject
 ------------------hashJoin[INNER_JOIN] 
hashCondition=((inventory.inv_warehouse_sk = 
warehouse.w_warehouse_sk))otherCondition=()
---------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk 
= date_dim.d_date_sk))otherCondition=()
-----------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = 
inventory.inv_item_sk))otherCondition=()
-------------------------PhysicalOlapScan[inventory]
+--------------------PhysicalProject
+----------------------hashJoin[INNER_JOIN] 
hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk))otherCondition=()
+------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = 
inventory.inv_item_sk))otherCondition=()
+--------------------------PhysicalOlapScan[inventory]
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
+--------------------------------PhysicalOlapScan[item]
 ------------------------PhysicalDistribute
 --------------------------PhysicalProject
-----------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
-------------------------------PhysicalOlapScan[item]
-----------------------PhysicalDistribute
-------------------------PhysicalProject
---------------------------filter((date_dim.d_date <= '2002-03-29') and 
(date_dim.d_date >= '2002-01-28'))
-----------------------------PhysicalOlapScan[date_dim]
+----------------------------filter((date_dim.d_date <= '2002-03-29') and 
(date_dim.d_date >= '2002-01-28'))
+------------------------------PhysicalOlapScan[date_dim]
 --------------------PhysicalDistribute
 ----------------------PhysicalProject
 ------------------------PhysicalOlapScan[warehouse]
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query23.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query23.out
index 23c76188a03..35891e403ca 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query23.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query23.out
@@ -9,13 +9,14 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------------hashAgg[LOCAL]
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = 
item.i_item_sk))otherCondition=()
-------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
---------------------PhysicalProject
-----------------------PhysicalOlapScan[store_sales]
---------------------PhysicalDistribute
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
 ----------------------PhysicalProject
-------------------------filter(d_year IN (2000, 2001, 2002, 2003))
---------------------------PhysicalOlapScan[date_dim]
+------------------------PhysicalOlapScan[store_sales]
+----------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------filter(d_year IN (2000, 2001, 2002, 2003))
+----------------------------PhysicalOlapScan[date_dim]
 ------------------PhysicalDistribute
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[item]
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query26.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query26.out
index fc26df24565..14dc8172528 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query26.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query26.out
@@ -13,13 +13,14 @@ PhysicalResultSink
 --------------------hashJoin[INNER_JOIN] 
hashCondition=((catalog_sales.cs_promo_sk = 
promotion.p_promo_sk))otherCondition=()
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN] 
hashCondition=((catalog_sales.cs_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
---------------------------hashJoin[INNER_JOIN] 
hashCondition=((catalog_sales.cs_bill_cdemo_sk = 
customer_demographics.cd_demo_sk))otherCondition=()
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[catalog_sales]
-----------------------------PhysicalDistribute
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN] 
hashCondition=((catalog_sales.cs_bill_cdemo_sk = 
customer_demographics.cd_demo_sk))otherCondition=()
 ------------------------------PhysicalProject
---------------------------------filter((customer_demographics.cd_education_status
 = 'Unknown') and (customer_demographics.cd_gender = 'M') and 
(customer_demographics.cd_marital_status = 'S'))
-----------------------------------PhysicalOlapScan[customer_demographics]
+--------------------------------PhysicalOlapScan[catalog_sales]
+------------------------------PhysicalDistribute
+--------------------------------PhysicalProject
+----------------------------------filter((customer_demographics.cd_education_status
 = 'Unknown') and (customer_demographics.cd_gender = 'M') and 
(customer_demographics.cd_marital_status = 'S'))
+------------------------------------PhysicalOlapScan[customer_demographics]
 --------------------------PhysicalDistribute
 ----------------------------PhysicalProject
 ------------------------------filter((date_dim.d_year = 2001))
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query27.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query27.out
index 8f295b0cd56..17b027ff75d 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query27.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query27.out
@@ -15,13 +15,14 @@ PhysicalResultSink
 ------------------------PhysicalDistribute
 --------------------------PhysicalProject
 ----------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
-------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_cdemo_sk = 
customer_demographics.cd_demo_sk))otherCondition=()
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[store_sales]
---------------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_cdemo_sk = 
customer_demographics.cd_demo_sk))otherCondition=()
 ----------------------------------PhysicalProject
-------------------------------------filter((customer_demographics.cd_education_status
 = 'Secondary') and (customer_demographics.cd_gender = 'F') and 
(customer_demographics.cd_marital_status = 'D'))
---------------------------------------PhysicalOlapScan[customer_demographics]
+------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------PhysicalDistribute
+------------------------------------PhysicalProject
+--------------------------------------filter((customer_demographics.cd_education_status
 = 'Secondary') and (customer_demographics.cd_gender = 'F') and 
(customer_demographics.cd_marital_status = 'D'))
+----------------------------------------PhysicalOlapScan[customer_demographics]
 ------------------------------PhysicalDistribute
 --------------------------------PhysicalProject
 ----------------------------------filter((date_dim.d_year = 1999))
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query32.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query32.out
index 51b789a35f0..8c33b8f02d4 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query32.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query32.out
@@ -13,13 +13,14 @@ PhysicalResultSink
 --------------------PhysicalDistribute
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN] 
hashCondition=((date_dim.d_date_sk = 
catalog_sales.cs_sold_date_sk))otherCondition=()
---------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk 
= catalog_sales.cs_item_sk))otherCondition=()
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[catalog_sales]
-----------------------------PhysicalDistribute
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN] 
hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk))otherCondition=()
 ------------------------------PhysicalProject
---------------------------------filter((item.i_manufact_id = 29))
-----------------------------------PhysicalOlapScan[item]
+--------------------------------PhysicalOlapScan[catalog_sales]
+------------------------------PhysicalDistribute
+--------------------------------PhysicalProject
+----------------------------------filter((item.i_manufact_id = 29))
+------------------------------------PhysicalOlapScan[item]
 --------------------------PhysicalDistribute
 ----------------------------PhysicalProject
 ------------------------------filter((date_dim.d_date <= '1999-04-07') and 
(date_dim.d_date >= '1999-01-07'))
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query34.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query34.out
index 4ef89bd92c1..2773c40224d 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query34.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query34.out
@@ -16,13 +16,14 @@ PhysicalResultSink
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_store_sk = store.s_store_sk))otherCondition=()
 --------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_hdemo_sk = 
household_demographics.hd_demo_sk))otherCondition=()
-----------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[store_sales]
-------------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
 --------------------------------PhysicalProject
-----------------------------------filter((((date_dim.d_dom >= 1) AND 
(date_dim.d_dom <= 3)) OR ((date_dim.d_dom >= 25) AND (date_dim.d_dom <= 28))) 
and d_year IN (1998, 1999, 2000))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[store_sales]
+--------------------------------PhysicalDistribute
+----------------------------------PhysicalProject
+------------------------------------filter((((date_dim.d_dom >= 1) AND 
(date_dim.d_dom <= 3)) OR ((date_dim.d_dom >= 25) AND (date_dim.d_dom <= 28))) 
and d_year IN (1998, 1999, 2000))
+--------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------PhysicalDistribute
 ------------------------------PhysicalProject
 
--------------------------------filter((household_demographics.hd_vehicle_count 
> 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / 
cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN 
('0-500', '1001-5000'))
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query36.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query36.out
index 395003d42c0..7e5d2e91d8d 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query36.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query36.out
@@ -16,19 +16,20 @@ PhysicalResultSink
 --------------------------PhysicalRepeat
 ----------------------------PhysicalProject
 ------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store.s_store_sk = store_sales.ss_store_sk))otherCondition=()
---------------------------------hashJoin[INNER_JOIN] 
hashCondition=((item.i_item_sk = store_sales.ss_item_sk))otherCondition=()
-----------------------------------PhysicalDistribute
-------------------------------------PhysicalProject
---------------------------------------hashJoin[INNER_JOIN] 
hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk))otherCondition=()
-----------------------------------------PhysicalProject
-------------------------------------------PhysicalOlapScan[store_sales]
-----------------------------------------PhysicalDistribute
+--------------------------------PhysicalProject
+----------------------------------hashJoin[INNER_JOIN] 
hashCondition=((item.i_item_sk = store_sales.ss_item_sk))otherCondition=()
+------------------------------------PhysicalDistribute
+--------------------------------------PhysicalProject
+----------------------------------------hashJoin[INNER_JOIN] 
hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk))otherCondition=()
 ------------------------------------------PhysicalProject
---------------------------------------------filter((d1.d_year = 2002))
-----------------------------------------------PhysicalOlapScan[date_dim]
-----------------------------------PhysicalDistribute
-------------------------------------PhysicalProject
---------------------------------------PhysicalOlapScan[item]
+--------------------------------------------PhysicalOlapScan[store_sales]
+------------------------------------------PhysicalDistribute
+--------------------------------------------PhysicalProject
+----------------------------------------------filter((d1.d_year = 2002))
+------------------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------PhysicalDistribute
+--------------------------------------PhysicalProject
+----------------------------------------PhysicalOlapScan[item]
 --------------------------------PhysicalDistribute
 ----------------------------------PhysicalProject
 ------------------------------------filter(s_state IN ('AL', 'GA', 'MI', 'MO', 
'OH', 'SC', 'SD', 'TN'))
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query37.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query37.out
index 1debda4ceed..309892d8df5 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query37.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query37.out
@@ -14,14 +14,15 @@ PhysicalResultSink
 ------------------PhysicalDistribute
 --------------------PhysicalProject
 ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk 
= inventory.inv_date_sk))otherCondition=()
-------------------------hashJoin[INNER_JOIN] 
hashCondition=((inventory.inv_item_sk = item.i_item_sk))otherCondition=()
---------------------------PhysicalProject
-----------------------------filter((inventory.inv_quantity_on_hand <= 500) and 
(inventory.inv_quantity_on_hand >= 100))
-------------------------------PhysicalOlapScan[inventory]
---------------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN] 
hashCondition=((inventory.inv_item_sk = item.i_item_sk))otherCondition=()
 ----------------------------PhysicalProject
-------------------------------filter((item.i_current_price <= 75.00) and 
(item.i_current_price >= 45.00) and i_manufact_id IN (1000, 707, 747, 856))
---------------------------------PhysicalOlapScan[item]
+------------------------------filter((inventory.inv_quantity_on_hand <= 500) 
and (inventory.inv_quantity_on_hand >= 100))
+--------------------------------PhysicalOlapScan[inventory]
+----------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------filter((item.i_current_price <= 75.00) and 
(item.i_current_price >= 45.00) and i_manufact_id IN (1000, 707, 747, 856))
+----------------------------------PhysicalOlapScan[item]
 ------------------------PhysicalDistribute
 --------------------------PhysicalProject
 ----------------------------filter((date_dim.d_date <= '1999-04-22') and 
(date_dim.d_date >= '1999-02-21'))
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query39.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query39.out
index 5852f1e29cb..a40db2ce116 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query39.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query39.out
@@ -9,16 +9,17 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------------hashAgg[LOCAL]
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN] 
hashCondition=((inventory.inv_warehouse_sk = 
warehouse.w_warehouse_sk))otherCondition=()
-------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk = 
item.i_item_sk))otherCondition=()
---------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_date_sk 
= date_dim.d_date_sk))otherCondition=()
-----------------------PhysicalOlapScan[inventory]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN] hashCondition=((inventory.inv_item_sk 
= item.i_item_sk))otherCondition=()
+----------------------hashJoin[INNER_JOIN] 
hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk))otherCondition=()
+------------------------PhysicalOlapScan[inventory]
+------------------------PhysicalDistribute
+--------------------------PhysicalProject
+----------------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 
2))
+------------------------------PhysicalOlapScan[date_dim]
 ----------------------PhysicalDistribute
 ------------------------PhysicalProject
---------------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2))
-----------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalDistribute
-----------------------PhysicalProject
-------------------------PhysicalOlapScan[item]
+--------------------------PhysicalOlapScan[item]
 ------------------PhysicalDistribute
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[warehouse]
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query43.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query43.out
index 894dc43670d..ff88ac67fdd 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query43.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query43.out
@@ -9,13 +9,14 @@ PhysicalResultSink
 ------------hashAgg[LOCAL]
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = 
store_sales.ss_store_sk))otherCondition=()
-------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = 
store_sales.ss_sold_date_sk))otherCondition=()
---------------------PhysicalProject
-----------------------PhysicalOlapScan[store_sales]
---------------------PhysicalDistribute
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = 
store_sales.ss_sold_date_sk))otherCondition=()
 ----------------------PhysicalProject
-------------------------filter((date_dim.d_year = 2000))
---------------------------PhysicalOlapScan[date_dim]
+------------------------PhysicalOlapScan[store_sales]
+----------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------filter((date_dim.d_year = 2000))
+----------------------------PhysicalOlapScan[date_dim]
 ------------------PhysicalDistribute
 --------------------PhysicalProject
 ----------------------filter((store.s_gmt_offset = -5.00))
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query44.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query44.out
index 7b4e8c0686b..4d147f0b312 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query44.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query44.out
@@ -7,36 +7,37 @@ PhysicalResultSink
 --------PhysicalProject
 ----------hashJoin[INNER_JOIN] hashCondition=((asceding.rnk = 
descending.rnk))otherCondition=()
 ------------PhysicalDistribute
---------------hashJoin[INNER_JOIN] hashCondition=((i1.i_item_sk = 
asceding.item_sk))otherCondition=()
-----------------PhysicalProject
-------------------PhysicalOlapScan[item]
-----------------PhysicalDistribute
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN] hashCondition=((i1.i_item_sk = 
asceding.item_sk))otherCondition=()
 ------------------PhysicalProject
---------------------filter((rnk < 11))
-----------------------PhysicalWindow
-------------------------PhysicalQuickSort
---------------------------PhysicalDistribute
-----------------------------PhysicalQuickSort
-------------------------------PhysicalPartitionTopN
---------------------------------PhysicalProject
-----------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as 
DOUBLE) > cast((0.9 * rank_col) as DOUBLE))
-------------------------------------PhysicalProject
---------------------------------------hashAgg[GLOBAL]
-----------------------------------------PhysicalDistribute
-------------------------------------------hashAgg[LOCAL]
+--------------------PhysicalOlapScan[item]
+------------------PhysicalDistribute
+--------------------PhysicalProject
+----------------------filter((rnk < 11))
+------------------------PhysicalWindow
+--------------------------PhysicalQuickSort
+----------------------------PhysicalDistribute
+------------------------------PhysicalQuickSort
+--------------------------------PhysicalPartitionTopN
+----------------------------------PhysicalProject
+------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col 
as DOUBLE) > cast((0.9 * rank_col) as DOUBLE))
+--------------------------------------PhysicalProject
+----------------------------------------hashAgg[GLOBAL]
+------------------------------------------PhysicalDistribute
+--------------------------------------------hashAgg[LOCAL]
+----------------------------------------------PhysicalProject
+------------------------------------------------filter((ss1.ss_store_sk = 146))
+--------------------------------------------------PhysicalOlapScan[store_sales]
+--------------------------------------PhysicalDistribute
+----------------------------------------PhysicalAssertNumRows
+------------------------------------------PhysicalDistribute
 --------------------------------------------PhysicalProject
-----------------------------------------------filter((ss1.ss_store_sk = 146))
-------------------------------------------------PhysicalOlapScan[store_sales]
-------------------------------------PhysicalDistribute
---------------------------------------PhysicalAssertNumRows
-----------------------------------------PhysicalDistribute
-------------------------------------------PhysicalProject
---------------------------------------------hashAgg[GLOBAL]
-----------------------------------------------PhysicalDistribute
-------------------------------------------------hashAgg[LOCAL]
---------------------------------------------------PhysicalProject
-----------------------------------------------------filter((store_sales.ss_store_sk
 = 146) and ss_addr_sk IS NULL)
-------------------------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------------------hashAgg[GLOBAL]
+------------------------------------------------PhysicalDistribute
+--------------------------------------------------hashAgg[LOCAL]
+----------------------------------------------------PhysicalProject
+------------------------------------------------------filter((store_sales.ss_store_sk
 = 146) and ss_addr_sk IS NULL)
+--------------------------------------------------------PhysicalOlapScan[store_sales]
 ------------PhysicalDistribute
 --------------hashJoin[INNER_JOIN] hashCondition=((i2.i_item_sk = 
descending.item_sk))otherCondition=()
 ----------------PhysicalProject
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query46.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query46.out
index 60542cf4c2e..8b2da870aa2 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query46.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query46.out
@@ -15,13 +15,14 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_store_sk = store.s_store_sk))otherCondition=()
 ----------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_hdemo_sk = 
household_demographics.hd_demo_sk))otherCondition=()
-------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[store_sales]
---------------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
 ----------------------------------PhysicalProject
-------------------------------------filter(d_dow IN (0, 6) and d_year IN 
(1999, 2000, 2001))
---------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------PhysicalDistribute
+------------------------------------PhysicalProject
+--------------------------------------filter(d_dow IN (0, 6) and d_year IN 
(1999, 2000, 2001))
+----------------------------------------PhysicalOlapScan[date_dim]
 ------------------------------PhysicalDistribute
 --------------------------------PhysicalProject
 ----------------------------------filter(((household_demographics.hd_dep_count 
= 6) OR (household_demographics.hd_vehicle_count = 0)))
@@ -35,9 +36,10 @@ PhysicalResultSink
 --------------------------PhysicalOlapScan[customer_address]
 ------------PhysicalDistribute
 --------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk 
= current_addr.ca_address_sk))otherCondition=()
-----------------PhysicalProject
-------------------PhysicalOlapScan[customer_address]
 ----------------PhysicalDistribute
 ------------------PhysicalProject
 --------------------PhysicalOlapScan[customer]
+----------------PhysicalDistribute
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer_address]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query50.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query50.out
index a21e720046b..5c67a1f42ba 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query50.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query50.out
@@ -9,13 +9,10 @@ PhysicalResultSink
 ------------hashAgg[LOCAL]
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = 
store.s_store_sk))otherCondition=()
-------------------PhysicalDistribute
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk))otherCondition=()
-------------------------PhysicalDistribute
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[date_dim]
-------------------------PhysicalDistribute
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk))otherCondition=()
+----------------------PhysicalDistribute
+------------------------PhysicalProject
 --------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and 
(store_sales.ss_item_sk = store_returns.sr_item_sk) and 
(store_sales.ss_ticket_number = 
store_returns.sr_ticket_number))otherCondition=()
 ----------------------------PhysicalProject
 ------------------------------PhysicalOlapScan[store_sales]
@@ -26,6 +23,9 @@ PhysicalResultSink
 --------------------------------PhysicalProject
 ----------------------------------filter((d2.d_moy = 8) and (d2.d_year = 2001))
 ------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[date_dim]
 ------------------PhysicalDistribute
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[store]
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query65.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query65.out
index 9f860e83565..373b32c7314 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query65.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query65.out
@@ -6,39 +6,40 @@ PhysicalResultSink
 ------PhysicalTopN
 --------PhysicalProject
 ----------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = 
sc.ss_store_sk))otherCondition=()
-------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = 
sc.ss_item_sk))otherCondition=()
---------------PhysicalDistribute
-----------------hashJoin[INNER_JOIN] hashCondition=((sb.ss_store_sk = 
sc.ss_store_sk))otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as 
DOUBLE)))
-------------------hashAgg[GLOBAL]
---------------------PhysicalDistribute
-----------------------hashAgg[LOCAL]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[store_sales]
-----------------------------PhysicalDistribute
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1232) and 
(date_dim.d_month_seq >= 1221))
-----------------------------------PhysicalOlapScan[date_dim]
-------------------PhysicalDistribute
+------------PhysicalProject
+--------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = 
sc.ss_item_sk))otherCondition=()
+----------------PhysicalDistribute
+------------------hashJoin[INNER_JOIN] hashCondition=((sb.ss_store_sk = 
sc.ss_store_sk))otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as 
DOUBLE)))
 --------------------hashAgg[GLOBAL]
 ----------------------PhysicalDistribute
 ------------------------hashAgg[LOCAL]
 --------------------------PhysicalProject
-----------------------------hashAgg[GLOBAL]
+----------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
+------------------------------PhysicalProject
+--------------------------------PhysicalOlapScan[store_sales]
 ------------------------------PhysicalDistribute
---------------------------------hashAgg[LOCAL]
-----------------------------------PhysicalProject
-------------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
---------------------------------------PhysicalProject
-----------------------------------------PhysicalOlapScan[store_sales]
---------------------------------------PhysicalDistribute
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1232) and 
(date_dim.d_month_seq >= 1221))
+------------------------------------PhysicalOlapScan[date_dim]
+--------------------PhysicalDistribute
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashAgg[GLOBAL]
+--------------------------------PhysicalDistribute
+----------------------------------hashAgg[LOCAL]
+------------------------------------PhysicalProject
+--------------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
 ----------------------------------------PhysicalProject
-------------------------------------------filter((date_dim.d_month_seq <= 
1232) and (date_dim.d_month_seq >= 1221))
---------------------------------------------PhysicalOlapScan[date_dim]
---------------PhysicalDistribute
-----------------PhysicalProject
-------------------PhysicalOlapScan[item]
+------------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------------PhysicalDistribute
+------------------------------------------PhysicalProject
+--------------------------------------------filter((date_dim.d_month_seq <= 
1232) and (date_dim.d_month_seq >= 1221))
+----------------------------------------------PhysicalOlapScan[date_dim]
+----------------PhysicalDistribute
+------------------PhysicalProject
+--------------------PhysicalOlapScan[item]
 ------------PhysicalDistribute
 --------------PhysicalProject
 ----------------PhysicalOlapScan[store]
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query67.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query67.out
index 0c95aeed5d2..95b508c4187 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query67.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query67.out
@@ -17,13 +17,14 @@ PhysicalResultSink
 ----------------------------PhysicalProject
 ------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_store_sk = store.s_store_sk))otherCondition=()
 --------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_item_sk = item.i_item_sk))otherCondition=()
-----------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
-------------------------------------PhysicalProject
---------------------------------------PhysicalOlapScan[store_sales]
-------------------------------------PhysicalDistribute
+----------------------------------PhysicalProject
+------------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
 --------------------------------------PhysicalProject
-----------------------------------------filter((date_dim.d_month_seq <= 1217) 
and (date_dim.d_month_seq >= 1206))
-------------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------------PhysicalOlapScan[store_sales]
+--------------------------------------PhysicalDistribute
+----------------------------------------PhysicalProject
+------------------------------------------filter((date_dim.d_month_seq <= 
1217) and (date_dim.d_month_seq >= 1206))
+--------------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------------PhysicalDistribute
 ------------------------------------PhysicalProject
 --------------------------------------PhysicalOlapScan[item]
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query68.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query68.out
index f0ae1101924..69571f4745b 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query68.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query68.out
@@ -26,13 +26,14 @@ PhysicalResultSink
 --------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_hdemo_sk = 
household_demographics.hd_demo_sk))otherCondition=()
 ----------------------------------PhysicalProject
 ------------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_store_sk = store.s_store_sk))otherCondition=()
---------------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
-----------------------------------------PhysicalProject
-------------------------------------------PhysicalOlapScan[store_sales]
-----------------------------------------PhysicalDistribute
+--------------------------------------PhysicalProject
+----------------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
 ------------------------------------------PhysicalProject
---------------------------------------------filter((date_dim.d_dom <= 2) and 
(date_dim.d_dom >= 1) and d_year IN (1998, 1999, 2000))
-----------------------------------------------PhysicalOlapScan[date_dim]
+--------------------------------------------PhysicalOlapScan[store_sales]
+------------------------------------------PhysicalDistribute
+--------------------------------------------PhysicalProject
+----------------------------------------------filter((date_dim.d_dom <= 2) and 
(date_dim.d_dom >= 1) and d_year IN (1998, 1999, 2000))
+------------------------------------------------PhysicalOlapScan[date_dim]
 --------------------------------------PhysicalDistribute
 ----------------------------------------PhysicalProject
 ------------------------------------------filter(s_city IN ('Five Points', 
'Pleasant Hill'))
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query7.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query7.out
index e73080c00e2..7a6fb1ff5ff 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query7.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query7.out
@@ -13,13 +13,14 @@ PhysicalResultSink
 --------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_promo_sk = 
promotion.p_promo_sk))otherCondition=()
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
---------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_cdemo_sk = 
customer_demographics.cd_demo_sk))otherCondition=()
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[store_sales]
-----------------------------PhysicalDistribute
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_cdemo_sk = 
customer_demographics.cd_demo_sk))otherCondition=()
 ------------------------------PhysicalProject
---------------------------------filter((customer_demographics.cd_education_status
 = 'College') and (customer_demographics.cd_gender = 'F') and 
(customer_demographics.cd_marital_status = 'W'))
-----------------------------------PhysicalOlapScan[customer_demographics]
+--------------------------------PhysicalOlapScan[store_sales]
+------------------------------PhysicalDistribute
+--------------------------------PhysicalProject
+----------------------------------filter((customer_demographics.cd_education_status
 = 'College') and (customer_demographics.cd_gender = 'F') and 
(customer_demographics.cd_marital_status = 'W'))
+------------------------------------PhysicalOlapScan[customer_demographics]
 --------------------------PhysicalDistribute
 ----------------------------PhysicalProject
 ------------------------------filter((date_dim.d_year = 2001))
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query70.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query70.out
index 21bf7714e48..8960570d8a1 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query70.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query70.out
@@ -16,13 +16,14 @@ PhysicalResultSink
 --------------------------PhysicalRepeat
 ----------------------------PhysicalProject
 ------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store.s_store_sk = store_sales.ss_store_sk))otherCondition=()
---------------------------------hashJoin[INNER_JOIN] 
hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk))otherCondition=()
-----------------------------------PhysicalProject
-------------------------------------PhysicalOlapScan[store_sales]
-----------------------------------PhysicalDistribute
+--------------------------------PhysicalProject
+----------------------------------hashJoin[INNER_JOIN] 
hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk))otherCondition=()
 ------------------------------------PhysicalProject
---------------------------------------filter((d1.d_month_seq <= 1224) and 
(d1.d_month_seq >= 1213))
-----------------------------------------PhysicalOlapScan[date_dim]
+--------------------------------------PhysicalOlapScan[store_sales]
+------------------------------------PhysicalDistribute
+--------------------------------------PhysicalProject
+----------------------------------------filter((d1.d_month_seq <= 1224) and 
(d1.d_month_seq >= 1213))
+------------------------------------------PhysicalOlapScan[date_dim]
 --------------------------------PhysicalDistribute
 ----------------------------------hashJoin[LEFT_SEMI_JOIN] 
hashCondition=((store.s_state = tmp1.s_state))otherCondition=()
 ------------------------------------PhysicalDistribute
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query73.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query73.out
index 7a1b4590aff..87f4763b993 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query73.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query73.out
@@ -16,13 +16,14 @@ PhysicalResultSink
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_store_sk = store.s_store_sk))otherCondition=()
 --------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_hdemo_sk = 
household_demographics.hd_demo_sk))otherCondition=()
-----------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[store_sales]
-------------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_dom <= 2) and 
(date_dim.d_dom >= 1) and d_year IN (2000, 2001, 2002))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[store_sales]
+--------------------------------PhysicalDistribute
+----------------------------------PhysicalProject
+------------------------------------filter((date_dim.d_dom <= 2) and 
(date_dim.d_dom >= 1) and d_year IN (2000, 2001, 2002))
+--------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------PhysicalDistribute
 ------------------------------PhysicalProject
 
--------------------------------filter((household_demographics.hd_vehicle_count 
> 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / 
cast(hd_vehicle_count as DOUBLE)), NULL) > 1) and hd_buy_potential IN 
('501-1000', 'Unknown'))
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query75.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query75.out
index 069dcb2c3c5..11412b8ea16 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query75.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query75.out
@@ -14,13 +14,14 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------------------PhysicalOlapScan[catalog_returns]
 --------------------PhysicalProject
 ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk 
= catalog_sales.cs_sold_date_sk))otherCondition=()
-------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = 
catalog_sales.cs_item_sk))otherCondition=()
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[catalog_sales]
---------------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk 
= catalog_sales.cs_item_sk))otherCondition=()
 ----------------------------PhysicalProject
-------------------------------filter((item.i_category = 'Home'))
---------------------------------PhysicalOlapScan[item]
+------------------------------PhysicalOlapScan[catalog_sales]
+----------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------filter((item.i_category = 'Home'))
+----------------------------------PhysicalOlapScan[item]
 ------------------------PhysicalDistribute
 --------------------------PhysicalProject
 ----------------------------filter(d_year IN (1998, 1999))
@@ -32,13 +33,14 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------------------PhysicalOlapScan[store_returns]
 --------------------PhysicalProject
 ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk 
= store_sales.ss_sold_date_sk))otherCondition=()
-------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = 
store_sales.ss_item_sk))otherCondition=()
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[store_sales]
---------------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk 
= store_sales.ss_item_sk))otherCondition=()
 ----------------------------PhysicalProject
-------------------------------filter((item.i_category = 'Home'))
---------------------------------PhysicalOlapScan[item]
+------------------------------PhysicalOlapScan[store_sales]
+----------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------filter((item.i_category = 'Home'))
+----------------------------------PhysicalOlapScan[item]
 ------------------------PhysicalDistribute
 --------------------------PhysicalProject
 ----------------------------filter(d_year IN (1998, 1999))
@@ -50,13 +52,14 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------------------PhysicalOlapScan[web_returns]
 --------------------PhysicalProject
 ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk 
= web_sales.ws_sold_date_sk))otherCondition=()
-------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = 
web_sales.ws_item_sk))otherCondition=()
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[web_sales]
---------------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk 
= web_sales.ws_item_sk))otherCondition=()
 ----------------------------PhysicalProject
-------------------------------filter((item.i_category = 'Home'))
---------------------------------PhysicalOlapScan[item]
+------------------------------PhysicalOlapScan[web_sales]
+----------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------filter((item.i_category = 'Home'))
+----------------------------------PhysicalOlapScan[item]
 ------------------------PhysicalDistribute
 --------------------------PhysicalProject
 ----------------------------filter(d_year IN (1998, 1999))
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query79.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query79.out
index 2351430d3b5..f1746cd950f 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query79.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query79.out
@@ -14,13 +14,14 @@ PhysicalResultSink
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_store_sk = store.s_store_sk))otherCondition=()
 --------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_hdemo_sk = 
household_demographics.hd_demo_sk))otherCondition=()
-----------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[store_sales]
-------------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_dow = 1) and d_year IN 
(1998, 1999, 2000))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[store_sales]
+--------------------------------PhysicalDistribute
+----------------------------------PhysicalProject
+------------------------------------filter((date_dim.d_dow = 1) and d_year IN 
(1998, 1999, 2000))
+--------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------PhysicalDistribute
 ------------------------------PhysicalProject
 --------------------------------filter(((household_demographics.hd_dep_count = 
5) OR (household_demographics.hd_vehicle_count > 4)))
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query8.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query8.out
index 2dc2925913e..0fa9438af18 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query8.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query8.out
@@ -11,13 +11,14 @@ PhysicalResultSink
 ----------------hashJoin[INNER_JOIN] hashCondition=((expr_substring(s_zip, 1, 
2) = expr_substring(ca_zip, 1, 2)))otherCondition=()
 ------------------PhysicalProject
 --------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_store_sk = store.s_store_sk))otherCondition=()
-----------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
-------------------------PhysicalProject
---------------------------PhysicalOlapScan[store_sales]
-------------------------PhysicalDistribute
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
 --------------------------PhysicalProject
-----------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 
1998))
-------------------------------PhysicalOlapScan[date_dim]
+----------------------------PhysicalOlapScan[store_sales]
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year 
= 1998))
+--------------------------------PhysicalOlapScan[date_dim]
 ----------------------PhysicalDistribute
 ------------------------PhysicalProject
 --------------------------PhysicalOlapScan[store]
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query81.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query81.out
index 5f8da78aec6..d7a42aa7ee1 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query81.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query81.out
@@ -26,11 +26,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------PhysicalTopN
 ----------PhysicalProject
 ------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_state = 
ctr2.ctr_state))otherCondition=((cast(ctr_total_return as DOUBLE) > 
cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
---------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = 
customer.c_customer_sk))otherCondition=()
-----------------PhysicalDistribute
-------------------PhysicalCteConsumer ( cteId=CTEId#0 )
-----------------PhysicalDistribute
-------------------PhysicalProject
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN] hashCondition=((ctr1.ctr_customer_sk = 
customer.c_customer_sk))otherCondition=()
+------------------PhysicalDistribute
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+------------------PhysicalDistribute
 --------------------hashJoin[INNER_JOIN] 
hashCondition=((customer_address.ca_address_sk = 
customer.c_current_addr_sk))otherCondition=()
 ----------------------PhysicalProject
 ------------------------PhysicalOlapScan[customer]
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query82.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query82.out
index 8932f8bde1d..eda98164b62 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query82.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query82.out
@@ -14,14 +14,15 @@ PhysicalResultSink
 ------------------PhysicalDistribute
 --------------------PhysicalProject
 ----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk 
= inventory.inv_date_sk))otherCondition=()
-------------------------hashJoin[INNER_JOIN] 
hashCondition=((inventory.inv_item_sk = item.i_item_sk))otherCondition=()
---------------------------PhysicalProject
-----------------------------filter((inventory.inv_quantity_on_hand <= 500) and 
(inventory.inv_quantity_on_hand >= 100))
-------------------------------PhysicalOlapScan[inventory]
---------------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN] 
hashCondition=((inventory.inv_item_sk = item.i_item_sk))otherCondition=()
 ----------------------------PhysicalProject
-------------------------------filter((item.i_current_price <= 47.00) and 
(item.i_current_price >= 17.00) and i_manufact_id IN (138, 169, 339, 639))
---------------------------------PhysicalOlapScan[item]
+------------------------------filter((inventory.inv_quantity_on_hand <= 500) 
and (inventory.inv_quantity_on_hand >= 100))
+--------------------------------PhysicalOlapScan[inventory]
+----------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------filter((item.i_current_price <= 47.00) and 
(item.i_current_price >= 17.00) and i_manufact_id IN (138, 169, 339, 639))
+----------------------------------PhysicalOlapScan[item]
 ------------------------PhysicalDistribute
 --------------------------PhysicalProject
 ----------------------------filter((date_dim.d_date <= '1999-09-07') and 
(date_dim.d_date >= '1999-07-09'))
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query89.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query89.out
index db67dd55133..2865c0b68bb 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query89.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query89.out
@@ -18,13 +18,14 @@ PhysicalResultSink
 ------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_store_sk = store.s_store_sk))otherCondition=()
 --------------------------------PhysicalProject
 ----------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = 
date_dim.d_date_sk))otherCondition=()
-------------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_item_sk = item.i_item_sk))otherCondition=()
---------------------------------------PhysicalProject
-----------------------------------------PhysicalOlapScan[store_sales]
---------------------------------------PhysicalDistribute
+------------------------------------PhysicalProject
+--------------------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_item_sk = item.i_item_sk))otherCondition=()
 ----------------------------------------PhysicalProject
-------------------------------------------filter(((i_category IN 
('Electronics', 'Jewelry', 'Shoes') AND i_class IN ('athletic', 'portable', 
'semi-precious')) OR (i_category IN ('Men', 'Music', 'Women') AND i_class IN 
('accessories', 'maternity', 'rock'))))
---------------------------------------------PhysicalOlapScan[item]
+------------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------------PhysicalDistribute
+------------------------------------------PhysicalProject
+--------------------------------------------filter(((i_category IN 
('Electronics', 'Jewelry', 'Shoes') AND i_class IN ('athletic', 'portable', 
'semi-precious')) OR (i_category IN ('Men', 'Music', 'Women') AND i_class IN 
('accessories', 'maternity', 'rock'))))
+----------------------------------------------PhysicalOlapScan[item]
 ------------------------------------PhysicalDistribute
 --------------------------------------PhysicalProject
 ----------------------------------------filter((date_dim.d_year = 1999))
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query92.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query92.out
index 5ae2cf3a124..e2fbc35b428 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query92.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query92.out
@@ -13,13 +13,14 @@ PhysicalResultSink
 --------------------PhysicalDistribute
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN] 
hashCondition=((date_dim.d_date_sk = 
web_sales.ws_sold_date_sk))otherCondition=()
---------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk 
= web_sales.ws_item_sk))otherCondition=()
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales]
-----------------------------PhysicalDistribute
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN] 
hashCondition=((item.i_item_sk = web_sales.ws_item_sk))otherCondition=()
 ------------------------------PhysicalProject
---------------------------------filter((item.i_manufact_id = 320))
-----------------------------------PhysicalOlapScan[item]
+--------------------------------PhysicalOlapScan[web_sales]
+------------------------------PhysicalDistribute
+--------------------------------PhysicalProject
+----------------------------------filter((item.i_manufact_id = 320))
+------------------------------------PhysicalOlapScan[item]
 --------------------------PhysicalDistribute
 ----------------------------PhysicalProject
 ------------------------------filter((date_dim.d_date <= '2002-05-27') and 
(date_dim.d_date >= '2002-02-26'))
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query99.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query99.out
index ef4fd9d0b95..47b42b5159e 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query99.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query99.out
@@ -8,10 +8,10 @@ PhysicalResultSink
 ----------PhysicalDistribute
 ------------hashAgg[LOCAL]
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN] 
hashCondition=((catalog_sales.cs_call_center_sk = 
call_center.cc_call_center_sk))otherCondition=()
+----------------hashJoin[INNER_JOIN] 
hashCondition=((catalog_sales.cs_warehouse_sk = 
warehouse.w_warehouse_sk))otherCondition=()
 ------------------PhysicalProject
 --------------------hashJoin[INNER_JOIN] 
hashCondition=((catalog_sales.cs_ship_mode_sk = 
ship_mode.sm_ship_mode_sk))otherCondition=()
-----------------------hashJoin[INNER_JOIN] 
hashCondition=((catalog_sales.cs_warehouse_sk = 
warehouse.w_warehouse_sk))otherCondition=()
+----------------------hashJoin[INNER_JOIN] 
hashCondition=((catalog_sales.cs_call_center_sk = 
call_center.cc_call_center_sk))otherCondition=()
 ------------------------hashJoin[INNER_JOIN] 
hashCondition=((catalog_sales.cs_ship_date_sk = 
date_dim.d_date_sk))otherCondition=()
 --------------------------PhysicalProject
 ----------------------------PhysicalOlapScan[catalog_sales]
@@ -21,11 +21,11 @@ PhysicalResultSink
 --------------------------------PhysicalOlapScan[date_dim]
 ------------------------PhysicalDistribute
 --------------------------PhysicalProject
-----------------------------PhysicalOlapScan[warehouse]
+----------------------------PhysicalOlapScan[call_center]
 ----------------------PhysicalDistribute
 ------------------------PhysicalProject
 --------------------------PhysicalOlapScan[ship_mode]
 ------------------PhysicalDistribute
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[call_center]
+----------------------PhysicalOlapScan[warehouse]
 
diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q21.out 
b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q21.out
index 8cf86dcf6e7..b1c0c548051 100644
--- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q21.out
+++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q21.out
@@ -8,13 +8,13 @@ PhysicalResultSink
 ----------PhysicalDistribute
 ------------hashAgg[LOCAL]
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = 
l1.l_orderkey))otherCondition=()
+----------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((l2.l_orderkey = 
l1.l_orderkey))otherCondition=(( not (l_suppkey = l_suppkey)))
 ------------------PhysicalProject
---------------------filter((orders.o_orderstatus = 'F'))
-----------------------PhysicalOlapScan[orders]
-------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((l2.l_orderkey = 
l1.l_orderkey))otherCondition=(( not (l_suppkey = l_suppkey)))
+--------------------PhysicalOlapScan[lineitem]
+------------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = 
l1.l_orderkey))otherCondition=()
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[lineitem]
+----------------------filter((orders.o_orderstatus = 'F'))
+------------------------PhysicalOlapScan[orders]
 --------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((l3.l_orderkey = 
l1.l_orderkey))otherCondition=(( not (l_suppkey = l_suppkey)))
 ----------------------PhysicalProject
 ------------------------filter((l3.l_receiptdate > l3.l_commitdate))
diff --git 
a/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf46.groovy 
b/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf46.groovy
index 9fb9712a21d..500bcc18d42 100644
--- a/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf46.groovy
+++ b/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf46.groovy
@@ -86,6 +86,5 @@ suite("ds_rf46") {
     // def outFile = 
"regression-test/suites/nereids_tpcds_shape_sf100_p0/ddl/rf/rf.46"
     // File file = new File(outFile)
     // file.write(getRuntimeFilters(plan))
-    
-     
assertEquals("RF5[c_customer_sk->[ss_customer_sk],RF4[ca_address_sk->[ss_addr_sk],RF3[s_store_sk->[ss_store_sk],RF2[hd_demo_sk->[ss_hdemo_sk],RF1[d_date_sk->[ss_sold_date_sk],RF0[c_current_addr_sk->[ca_address_sk]",
 getRuntimeFilters(plan))
+     
assertEquals("RF5[c_customer_sk->[ss_customer_sk],RF4[ca_address_sk->[ss_addr_sk],RF3[s_store_sk->[ss_store_sk],RF2[hd_demo_sk->[ss_hdemo_sk],RF1[d_date_sk->[ss_sold_date_sk],RF0[ca_address_sk->[c_current_addr_sk]",
 getRuntimeFilters(plan))
 }
diff --git 
a/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf50.groovy 
b/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf50.groovy
index 2e107e4893f..db546e6e399 100644
--- a/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf50.groovy
+++ b/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf50.groovy
@@ -110,6 +110,5 @@ limit 100;
     // def outFile = 
"regression-test/suites/nereids_tpcds_shape_sf100_p0/ddl/rf/rf.50"
     // File file = new File(outFile)
     // file.write(getRuntimeFilters(plan))
-    
-     
assertEquals("RF5[s_store_sk->[ss_store_sk],RF4[ss_sold_date_sk->[d_date_sk],RF1[sr_customer_sk->[ss_customer_sk],RF2[sr_item_sk->[ss_item_sk],RF3[sr_ticket_number->[ss_ticket_number],RF0[d_date_sk->[sr_returned_date_sk]",
 getRuntimeFilters(plan))
+     
assertEquals("RF5[s_store_sk->[ss_store_sk],RF4[d_date_sk->[ss_sold_date_sk],RF1[sr_customer_sk->[ss_customer_sk],RF2[sr_item_sk->[ss_item_sk],RF3[sr_ticket_number->[ss_ticket_number],RF0[d_date_sk->[sr_returned_date_sk]",
 getRuntimeFilters(plan))
 }
diff --git 
a/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf99.groovy 
b/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf99.groovy
index 9999be39541..449777dc014 100644
--- a/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf99.groovy
+++ b/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf99.groovy
@@ -86,6 +86,5 @@ limit 100;
     // def outFile = 
"regression-test/suites/nereids_tpcds_shape_sf100_p0/ddl/rf/rf.99"
     // File file = new File(outFile)
     // file.write(getRuntimeFilters(plan))
-    
-     
assertEquals("RF3[cc_call_center_sk->[cs_call_center_sk],RF2[sm_ship_mode_sk->[cs_ship_mode_sk],RF1[w_warehouse_sk->[cs_warehouse_sk],RF0[d_date_sk->[cs_ship_date_sk]",
 getRuntimeFilters(plan))
+     
assertEquals("RF3[w_warehouse_sk->[cs_warehouse_sk],RF2[sm_ship_mode_sk->[cs_ship_mode_sk],RF1[cc_call_center_sk->[cs_call_center_sk],RF0[d_date_sk->[cs_ship_date_sk]",
 getRuntimeFilters(plan))
 }
diff --git 
a/regression-test/suites/nereids_tpch_shape_sf1000_p0/rf/h_rf21.groovy 
b/regression-test/suites/nereids_tpch_shape_sf1000_p0/rf/h_rf21.groovy
index 34da1d1deab..4cded7417f8 100644
--- a/regression-test/suites/nereids_tpch_shape_sf1000_p0/rf/h_rf21.groovy
+++ b/regression-test/suites/nereids_tpch_shape_sf1000_p0/rf/h_rf21.groovy
@@ -110,5 +110,5 @@ limit 100;
     // def outFile = 
"regression-test/suites/nereids_tpch_shape_sf1000_p0/ddl/rf/rf.21"
     // File file = new File(outFile)
     // file.write(getRuntimeFilters(plan))
-    
assertEquals("RF4[l_orderkey->[o_orderkey],RF3[l_orderkey->[l_orderkey],RF2[l_orderkey->[l_orderkey],RF1[s_suppkey->[l_suppkey],RF0[n_nationkey->[s_nationkey]",
 getRuntimeFilters(plan))
+    
assertEquals("RF4[l_orderkey->[l_orderkey],RF3[l_orderkey->[o_orderkey],RF2[l_orderkey->[l_orderkey],RF1[s_suppkey->[l_suppkey],RF0[n_nationkey->[s_nationkey]",
 getRuntimeFilters(plan))
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org


Reply via email to