This is an automated email from the ASF dual-hosted git repository.
jakevin pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 023fc156bb0 [enhancement](Nereids): remove LAsscom in Bushy Tree
RuleSet (#25465)
023fc156bb0 is described below
commit 023fc156bb0185bb36e38e0715a85163d6b7f486
Author: jakevin <[email protected]>
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
(cherry picked from commit 410441b5162befc690b3a4a9620762364abd59e6)
---
.../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 +-
.../nereids_tpcds_shape_sf100_p0/shape/query11.out | 23 +++--
.../nereids_tpcds_shape_sf100_p0/shape/query18.out | 14 +--
.../nereids_tpcds_shape_sf100_p0/shape/query21.out | 19 ++--
.../nereids_tpcds_shape_sf100_p0/shape/query26.out | 13 +--
.../nereids_tpcds_shape_sf100_p0/shape/query27.out | 13 +--
.../nereids_tpcds_shape_sf100_p0/shape/query30.out | 10 +-
.../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/query43.out | 13 +--
.../nereids_tpcds_shape_sf100_p0/shape/query44.out | 105 +++++++++----------
.../nereids_tpcds_shape_sf100_p0/shape/query46.out | 18 ++--
.../nereids_tpcds_shape_sf100_p0/shape/query65.out | 55 +++++-----
.../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/query71.out | 34 +++----
.../nereids_tpcds_shape_sf100_p0/shape/query72.out | 110 ++++++--------------
.../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/query99.out | 8 +-
.../data/nereids_tpch_shape_sf1000_p0/shape/q2.out | 25 ++---
.../data/nereids_tpch_shape_sf1000_p0/shape/q8.out | 49 +++++----
.../nereids_tpcds_shape_sf100_p0/rf/ds_rf1.groovy | 47 +++++----
.../nereids_tpcds_shape_sf100_p0/rf/ds_rf14.groovy | 112 ++++++++++-----------
.../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_rf2.groovy | 2 +-
.../nereids_tpch_shape_sf1000_p0/rf/h_rf21.groovy | 2 +-
.../nereids_tpch_shape_sf1000_p0/rf/h_rf8.groovy | 2 +-
48 files changed, 463 insertions(+), 489 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 64244fe6e84..0ae8c0e3ddd 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
@@ -186,8 +186,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 654fd51f0b1..408f1962542 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
@@ -270,8 +270,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),
@@ -285,8 +287,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),
- PUSH_DOWN_PROJECT_THROUGH_SEMI_JOIN(RuleTypeClass.EXPLORATION),
- PUSH_DOWN_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 8a480c67dd4..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.PUSH_DOWN_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.PUSH_DOWN_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 aa27774b8b0..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.PUSH_DOWN_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.PUSH_DOWN_PROJECT_THROUGH_SEMI_JOIN)
+
}).toRule(RuleType.PUSHDOWN_PROJECT_THROUGH_SEMI_JOIN_RIGHT)
);
}
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 cd7071884b2..ffca4cbc9f8 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](t_s_firstyear.customer_id =
t_w_secyear.customer_id)(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](t_s_secyear.customer_id =
t_s_firstyear.customer_id)
-----------------hashJoin[INNER_JOIN](t_s_firstyear.customer_id =
t_w_firstyear.customer_id)
-------------------PhysicalDistribute
---------------------PhysicalProject
-----------------------filter((t_s_firstyear.dyear =
2001)(t_s_firstyear.sale_type = 's')(t_s_firstyear.year_total > 0.00))
-------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN](t_s_secyear.customer_id =
t_s_firstyear.customer_id)
+------------------hashJoin[INNER_JOIN](t_s_firstyear.customer_id =
t_w_firstyear.customer_id)
+--------------------PhysicalDistribute
+----------------------PhysicalProject
+------------------------filter((t_s_firstyear.dyear =
2001)(t_s_firstyear.sale_type = 's')(t_s_firstyear.year_total > 0.00))
+--------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+--------------------PhysicalDistribute
+----------------------PhysicalProject
+------------------------filter((t_w_firstyear.year_total >
0.00)(t_w_firstyear.sale_type = 'w')(t_w_firstyear.dyear = 2001))
+--------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
------------------PhysicalDistribute
--------------------PhysicalProject
-----------------------filter((t_w_firstyear.year_total >
0.00)(t_w_firstyear.sale_type = 'w')(t_w_firstyear.dyear = 2001))
+----------------------filter((t_s_secyear.sale_type = 's')(t_s_secyear.dyear =
2002))
------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
-----------------PhysicalDistribute
-------------------PhysicalProject
---------------------filter((t_s_secyear.sale_type = 's')(t_s_secyear.dyear =
2002))
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
--------------PhysicalDistribute
----------------PhysicalProject
------------------filter((t_w_secyear.dyear = 2002)(t_w_secyear.sale_type =
'w'))
diff --git
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query18.out
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query18.out
index 2ce64b0b73c..f7e24486fd6 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query18.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query18.out
@@ -10,15 +10,15 @@ PhysicalResultSink
--------------hashAgg[LOCAL]
----------------PhysicalRepeat
------------------PhysicalProject
---------------------hashJoin[INNER_JOIN](catalog_sales.cs_item_sk =
item.i_item_sk)
-----------------------PhysicalProject
-------------------------PhysicalOlapScan[item]
+--------------------hashJoin[INNER_JOIN](customer.c_current_cdemo_sk =
cd2.cd_demo_sk)
----------------------PhysicalDistribute
------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN](customer.c_current_cdemo_sk =
cd2.cd_demo_sk)
-----------------------------PhysicalDistribute
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[customer_demographics]
+--------------------------PhysicalOlapScan[customer_demographics]
+----------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN](catalog_sales.cs_item_sk =
item.i_item_sk)
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[item]
----------------------------PhysicalDistribute
------------------------------PhysicalProject
--------------------------------hashJoin[INNER_JOIN](catalog_sales.cs_sold_date_sk
= date_dim.d_date_sk)
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 dd4e01aa106..7e04b2502b1 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](inventory.inv_warehouse_sk =
warehouse.w_warehouse_sk)
---------------------hashJoin[INNER_JOIN](inventory.inv_date_sk =
date_dim.d_date_sk)
-----------------------hashJoin[INNER_JOIN](item.i_item_sk =
inventory.inv_item_sk)
-------------------------PhysicalOlapScan[inventory]
+--------------------PhysicalProject
+----------------------hashJoin[INNER_JOIN](inventory.inv_date_sk =
date_dim.d_date_sk)
+------------------------hashJoin[INNER_JOIN](item.i_item_sk =
inventory.inv_item_sk)
+--------------------------PhysicalOlapScan[inventory]
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------filter((item.i_current_price <=
1.49)(item.i_current_price >= 0.99))
+--------------------------------PhysicalOlapScan[item]
------------------------PhysicalDistribute
--------------------------PhysicalProject
-----------------------------filter((item.i_current_price <=
1.49)(item.i_current_price >= 0.99))
-------------------------------PhysicalOlapScan[item]
-----------------------PhysicalDistribute
-------------------------PhysicalProject
---------------------------filter((date_dim.d_date >=
'2002-01-28')(date_dim.d_date <= '2002-03-29'))
-----------------------------PhysicalOlapScan[date_dim]
+----------------------------filter((date_dim.d_date >=
'2002-01-28')(date_dim.d_date <= '2002-03-29'))
+------------------------------PhysicalOlapScan[date_dim]
--------------------PhysicalDistribute
----------------------PhysicalProject
------------------------PhysicalOlapScan[warehouse]
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 08103873824..c827c6f8235 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
@@ -14,13 +14,14 @@ PhysicalResultSink
----------------------PhysicalDistribute
------------------------PhysicalProject
--------------------------hashJoin[INNER_JOIN](catalog_sales.cs_sold_date_sk =
date_dim.d_date_sk)
-----------------------------hashJoin[INNER_JOIN](catalog_sales.cs_bill_cdemo_sk
= customer_demographics.cd_demo_sk)
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[catalog_sales]
-------------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN](catalog_sales.cs_bill_cdemo_sk
= customer_demographics.cd_demo_sk)
--------------------------------PhysicalProject
-----------------------------------filter((customer_demographics.cd_gender =
'M')(customer_demographics.cd_marital_status =
'S')(customer_demographics.cd_education_status = 'Unknown'))
-------------------------------------PhysicalOlapScan[customer_demographics]
+----------------------------------PhysicalOlapScan[catalog_sales]
+--------------------------------PhysicalDistribute
+----------------------------------PhysicalProject
+------------------------------------filter((customer_demographics.cd_gender =
'M')(customer_demographics.cd_marital_status =
'S')(customer_demographics.cd_education_status = 'Unknown'))
+--------------------------------------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 5a7a3e63938..9b58820f014 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](store_sales.ss_sold_date_sk =
date_dim.d_date_sk)
-------------------------------hashJoin[INNER_JOIN](store_sales.ss_cdemo_sk =
customer_demographics.cd_demo_sk)
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[store_sales]
---------------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------hashJoin[INNER_JOIN](store_sales.ss_cdemo_sk =
customer_demographics.cd_demo_sk)
----------------------------------PhysicalProject
-------------------------------------filter((customer_demographics.cd_education_status
= 'Secondary')(customer_demographics.cd_marital_status =
'D')(customer_demographics.cd_gender = 'F'))
---------------------------------------PhysicalOlapScan[customer_demographics]
+------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------PhysicalDistribute
+------------------------------------PhysicalProject
+--------------------------------------filter((customer_demographics.cd_education_status
= 'Secondary')(customer_demographics.cd_marital_status =
'D')(customer_demographics.cd_gender = 'F'))
+----------------------------------------PhysicalOlapScan[customer_demographics]
------------------------------PhysicalDistribute
--------------------------------PhysicalProject
----------------------------------filter((date_dim.d_year = 1999))
diff --git
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query30.out
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query30.out
index 166ead3330f..b3d184b6480 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query30.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query30.out
@@ -26,11 +26,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
--------PhysicalTopN
----------PhysicalProject
------------hashJoin[INNER_JOIN](ctr1.ctr_state =
ctr2.ctr_state)(cast(ctr_total_return as DOUBLE) >
cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))
---------------hashJoin[INNER_JOIN](ctr1.ctr_customer_sk =
customer.c_customer_sk)
-----------------PhysicalDistribute
-------------------PhysicalCteConsumer ( cteId=CTEId#0 )
-----------------PhysicalDistribute
-------------------PhysicalProject
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN](ctr1.ctr_customer_sk =
customer.c_customer_sk)
+------------------PhysicalDistribute
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+------------------PhysicalDistribute
--------------------hashJoin[INNER_JOIN](customer_address.ca_address_sk =
customer.c_current_addr_sk)
----------------------PhysicalDistribute
------------------------PhysicalProject
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 f94ce4430ca..a799bdb4ebb 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](date_dim.d_date_sk =
catalog_sales.cs_sold_date_sk)
---------------------------hashJoin[INNER_JOIN](item.i_item_sk =
catalog_sales.cs_item_sk)
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[catalog_sales]
-----------------------------PhysicalDistribute
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN](item.i_item_sk =
catalog_sales.cs_item_sk)
------------------------------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-01-07')(date_dim.d_date <= '1999-04-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 504194d074f..f76d2a4d397 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](store_sales.ss_store_sk =
store.s_store_sk)
--------------------------hashJoin[INNER_JOIN](store_sales.ss_hdemo_sk =
household_demographics.hd_demo_sk)
-----------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk =
date_dim.d_date_sk)
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[store_sales]
-------------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk
= date_dim.d_date_sk)
--------------------------------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)))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)))d_year IN (1998, 1999, 2000))
+--------------------------------------PhysicalOlapScan[date_dim]
----------------------------PhysicalDistribute
------------------------------PhysicalProject
--------------------------------filter(hd_buy_potential IN ('1001-5000',
'0-500')(household_demographics.hd_vehicle_count > 0)(if((hd_vehicle_count >
0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) >
1.2))
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 60a0b05eb09..5507d052fb5 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](store.s_store_sk =
store_sales.ss_store_sk)
---------------------------------hashJoin[INNER_JOIN](item.i_item_sk =
store_sales.ss_item_sk)
-----------------------------------PhysicalDistribute
-------------------------------------PhysicalProject
---------------------------------------hashJoin[INNER_JOIN](d1.d_date_sk =
store_sales.ss_sold_date_sk)
-----------------------------------------PhysicalProject
-------------------------------------------PhysicalOlapScan[store_sales]
-----------------------------------------PhysicalDistribute
+--------------------------------PhysicalProject
+----------------------------------hashJoin[INNER_JOIN](item.i_item_sk =
store_sales.ss_item_sk)
+------------------------------------PhysicalDistribute
+--------------------------------------PhysicalProject
+----------------------------------------hashJoin[INNER_JOIN](d1.d_date_sk =
store_sales.ss_sold_date_sk)
------------------------------------------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 ('SD', 'TN', 'GA', 'SC',
'MO', 'AL', 'MI', 'OH'))
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 0b661ba0fea..60659efac43 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](date_dim.d_date_sk =
inventory.inv_date_sk)
-------------------------hashJoin[INNER_JOIN](inventory.inv_item_sk =
item.i_item_sk)
---------------------------PhysicalProject
-----------------------------filter((inventory.inv_quantity_on_hand >=
100)(inventory.inv_quantity_on_hand <= 500))
-------------------------------PhysicalOlapScan[inventory]
---------------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN](inventory.inv_item_sk =
item.i_item_sk)
----------------------------PhysicalProject
-------------------------------filter((item.i_current_price <=
75.00)i_manufact_id IN (707, 747, 856, 1000)(item.i_current_price >= 45.00))
---------------------------------PhysicalOlapScan[item]
+------------------------------filter((inventory.inv_quantity_on_hand >=
100)(inventory.inv_quantity_on_hand <= 500))
+--------------------------------PhysicalOlapScan[inventory]
+----------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------filter((item.i_current_price <=
75.00)i_manufact_id IN (707, 747, 856, 1000)(item.i_current_price >= 45.00))
+----------------------------------PhysicalOlapScan[item]
------------------------PhysicalDistribute
--------------------------PhysicalProject
----------------------------filter((date_dim.d_date >=
'1999-02-21')(date_dim.d_date <= '1999-04-22'))
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 53978bf7a7e..b27cffb1d50 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](store.s_store_sk =
store_sales.ss_store_sk)
-------------------hashJoin[INNER_JOIN](date_dim.d_date_sk =
store_sales.ss_sold_date_sk)
---------------------PhysicalProject
-----------------------PhysicalOlapScan[store_sales]
---------------------PhysicalDistribute
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN](date_dim.d_date_sk =
store_sales.ss_sold_date_sk)
----------------------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 e79bc819f07..3117cf83ba5 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
@@ -5,67 +5,68 @@ PhysicalResultSink
----PhysicalDistribute
------PhysicalTopN
--------PhysicalProject
-----------hashJoin[INNER_JOIN](i1.i_item_sk = asceding.item_sk)
+----------hashJoin[INNER_JOIN](i2.i_item_sk = descending.item_sk)
------------PhysicalProject
--------------PhysicalOlapScan[item]
------------PhysicalDistribute
---------------hashJoin[INNER_JOIN](asceding.rnk = descending.rnk)
-----------------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
+----------------hashJoin[INNER_JOIN](asceding.rnk = descending.rnk)
+------------------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
+----------------------------------------------hashAgg[GLOBAL]
+------------------------------------------------PhysicalDistribute
+--------------------------------------------------hashAgg[LOCAL]
+----------------------------------------------------PhysicalProject
+------------------------------------------------------filter(ss_addr_sk IS
NULL(store_sales.ss_store_sk = 146))
+--------------------------------------------------------PhysicalOlapScan[store_sales]
+------------------PhysicalDistribute
+--------------------hashJoin[INNER_JOIN](i1.i_item_sk = asceding.item_sk)
+----------------------PhysicalProject
+------------------------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(ss_addr_sk IS
NULL(store_sales.ss_store_sk = 146))
+----------------------------------------------------filter((ss1.ss_store_sk =
146))
------------------------------------------------------PhysicalOlapScan[store_sales]
-----------------PhysicalDistribute
-------------------hashJoin[INNER_JOIN](i2.i_item_sk = descending.item_sk)
---------------------PhysicalProject
-----------------------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]
+------------------------------------------PhysicalDistribute
+--------------------------------------------PhysicalAssertNumRows
+----------------------------------------------PhysicalDistribute
------------------------------------------------PhysicalProject
---------------------------------------------------filter((ss1.ss_store_sk =
146))
-----------------------------------------------------PhysicalOlapScan[store_sales]
-----------------------------------------PhysicalDistribute
-------------------------------------------PhysicalAssertNumRows
---------------------------------------------PhysicalDistribute
-----------------------------------------------PhysicalProject
-------------------------------------------------hashAgg[GLOBAL]
---------------------------------------------------PhysicalDistribute
-----------------------------------------------------hashAgg[LOCAL]
-------------------------------------------------------PhysicalProject
---------------------------------------------------------filter(ss_addr_sk IS
NULL(store_sales.ss_store_sk = 146))
-----------------------------------------------------------PhysicalOlapScan[store_sales]
+--------------------------------------------------hashAgg[GLOBAL]
+----------------------------------------------------PhysicalDistribute
+------------------------------------------------------hashAgg[LOCAL]
+--------------------------------------------------------PhysicalProject
+----------------------------------------------------------filter(ss_addr_sk IS
NULL(store_sales.ss_store_sk = 146))
+------------------------------------------------------------PhysicalOlapScan[store_sales]
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 a21333fa428..8a6e45f9139 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](store_sales.ss_store_sk =
store.s_store_sk)
----------------------------hashJoin[INNER_JOIN](store_sales.ss_hdemo_sk =
household_demographics.hd_demo_sk)
-------------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk
= date_dim.d_date_sk)
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[store_sales]
---------------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk
= date_dim.d_date_sk)
----------------------------------PhysicalProject
-------------------------------------filter(d_dow IN (0, 6)d_year IN (1999,
2000, 2001))
---------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------PhysicalDistribute
+------------------------------------PhysicalProject
+--------------------------------------filter(d_dow IN (0, 6)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](customer.c_current_addr_sk =
current_addr.ca_address_sk)
-----------------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/query65.out
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query65.out
index ae54fc7949a..d778908e03e 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](store.s_store_sk = sc.ss_store_sk)
-------------hashJoin[INNER_JOIN](item.i_item_sk = sc.ss_item_sk)
---------------PhysicalDistribute
-----------------hashJoin[INNER_JOIN](sb.ss_store_sk =
sc.ss_store_sk)(cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))
-------------------hashAgg[GLOBAL]
---------------------PhysicalDistribute
-----------------------hashAgg[LOCAL]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk =
date_dim.d_date_sk)
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[store_sales]
-----------------------------PhysicalDistribute
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <=
1232)(date_dim.d_month_seq >= 1221))
-----------------------------------PhysicalOlapScan[date_dim]
-------------------PhysicalDistribute
+------------PhysicalProject
+--------------hashJoin[INNER_JOIN](item.i_item_sk = sc.ss_item_sk)
+----------------PhysicalDistribute
+------------------hashJoin[INNER_JOIN](sb.ss_store_sk =
sc.ss_store_sk)(cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))
--------------------hashAgg[GLOBAL]
----------------------PhysicalDistribute
------------------------hashAgg[LOCAL]
--------------------------PhysicalProject
-----------------------------hashAgg[GLOBAL]
+----------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk =
date_dim.d_date_sk)
+------------------------------PhysicalProject
+--------------------------------PhysicalOlapScan[store_sales]
------------------------------PhysicalDistribute
---------------------------------hashAgg[LOCAL]
-----------------------------------PhysicalProject
-------------------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk
= date_dim.d_date_sk)
---------------------------------------PhysicalProject
-----------------------------------------PhysicalOlapScan[store_sales]
---------------------------------------PhysicalDistribute
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <=
1232)(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](store_sales.ss_sold_date_sk
= date_dim.d_date_sk)
----------------------------------------PhysicalProject
-------------------------------------------filter((date_dim.d_month_seq >=
1221)(date_dim.d_month_seq <= 1232))
---------------------------------------------PhysicalOlapScan[date_dim]
---------------PhysicalDistribute
-----------------PhysicalProject
-------------------PhysicalOlapScan[item]
+------------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------------PhysicalDistribute
+------------------------------------------PhysicalProject
+--------------------------------------------filter((date_dim.d_month_seq >=
1221)(date_dim.d_month_seq <= 1232))
+----------------------------------------------PhysicalOlapScan[date_dim]
+----------------PhysicalDistribute
+------------------PhysicalProject
+--------------------PhysicalOlapScan[item]
------------PhysicalDistribute
--------------PhysicalProject
----------------PhysicalOlapScan[store]
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 9a98918d915..d791a7fdba5 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](store_sales.ss_hdemo_sk =
household_demographics.hd_demo_sk)
----------------------------------PhysicalProject
------------------------------------hashJoin[INNER_JOIN](store_sales.ss_store_sk
= store.s_store_sk)
---------------------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk
= date_dim.d_date_sk)
-----------------------------------------PhysicalProject
-------------------------------------------PhysicalOlapScan[store_sales]
-----------------------------------------PhysicalDistribute
+--------------------------------------PhysicalProject
+----------------------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk
= date_dim.d_date_sk)
------------------------------------------PhysicalProject
---------------------------------------------filter((date_dim.d_dom >= 1)d_year
IN (1998, 1999, 2000)(date_dim.d_dom <= 2))
-----------------------------------------------PhysicalOlapScan[date_dim]
+--------------------------------------------PhysicalOlapScan[store_sales]
+------------------------------------------PhysicalDistribute
+--------------------------------------------PhysicalProject
+----------------------------------------------filter((date_dim.d_dom >=
1)d_year IN (1998, 1999, 2000)(date_dim.d_dom <= 2))
+------------------------------------------------PhysicalOlapScan[date_dim]
--------------------------------------PhysicalDistribute
----------------------------------------PhysicalProject
------------------------------------------filter(s_city IN ('Pleasant Hill',
'Five Points'))
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 279d0178403..58908af1bc5 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](store_sales.ss_promo_sk =
promotion.p_promo_sk)
----------------------PhysicalProject
------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk =
date_dim.d_date_sk)
---------------------------hashJoin[INNER_JOIN](store_sales.ss_cdemo_sk =
customer_demographics.cd_demo_sk)
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[store_sales]
-----------------------------PhysicalDistribute
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN](store_sales.ss_cdemo_sk =
customer_demographics.cd_demo_sk)
------------------------------PhysicalProject
---------------------------------filter((customer_demographics.cd_gender =
'F')(customer_demographics.cd_marital_status =
'W')(customer_demographics.cd_education_status = 'College'))
-----------------------------------PhysicalOlapScan[customer_demographics]
+--------------------------------PhysicalOlapScan[store_sales]
+------------------------------PhysicalDistribute
+--------------------------------PhysicalProject
+----------------------------------filter((customer_demographics.cd_gender =
'F')(customer_demographics.cd_marital_status =
'W')(customer_demographics.cd_education_status = 'College'))
+------------------------------------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 7c2cbb3b0dc..2771503c464 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](store.s_store_sk =
store_sales.ss_store_sk)
---------------------------------hashJoin[INNER_JOIN](d1.d_date_sk =
store_sales.ss_sold_date_sk)
-----------------------------------PhysicalProject
-------------------------------------PhysicalOlapScan[store_sales]
-----------------------------------PhysicalDistribute
+--------------------------------PhysicalProject
+----------------------------------hashJoin[INNER_JOIN](d1.d_date_sk =
store_sales.ss_sold_date_sk)
------------------------------------PhysicalProject
---------------------------------------filter((d1.d_month_seq <=
1224)(d1.d_month_seq >= 1213))
-----------------------------------------PhysicalOlapScan[date_dim]
+--------------------------------------PhysicalOlapScan[store_sales]
+------------------------------------PhysicalDistribute
+--------------------------------------PhysicalProject
+----------------------------------------filter((d1.d_month_seq <=
1224)(d1.d_month_seq >= 1213))
+------------------------------------------PhysicalOlapScan[date_dim]
--------------------------------PhysicalDistribute
----------------------------------hashJoin[LEFT_SEMI_JOIN](store.s_state =
tmp1.s_state)
------------------------------------PhysicalDistribute
diff --git
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query71.out
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query71.out
index 512604bb57e..d0348752655 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query71.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query71.out
@@ -4,15 +4,15 @@ PhysicalResultSink
--PhysicalQuickSort
----PhysicalDistribute
------PhysicalQuickSort
---------hashAgg[GLOBAL]
-----------PhysicalDistribute
-------------hashAgg[LOCAL]
---------------PhysicalProject
-----------------hashJoin[INNER_JOIN](tmp.time_sk = time_dim.t_time_sk)
-------------------PhysicalDistribute
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN](tmp.sold_item_sk = item.i_item_sk)
-------------------------PhysicalDistribute
+--------PhysicalProject
+----------hashAgg[GLOBAL]
+------------PhysicalDistribute
+--------------hashAgg[LOCAL]
+----------------PhysicalProject
+------------------hashJoin[INNER_JOIN](tmp.time_sk = time_dim.t_time_sk)
+--------------------PhysicalDistribute
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN](tmp.sold_item_sk = item.i_item_sk)
--------------------------PhysicalUnion
----------------------------PhysicalDistribute
------------------------------PhysicalProject
@@ -41,12 +41,12 @@ PhysicalResultSink
------------------------------------PhysicalProject
--------------------------------------filter((date_dim.d_moy =
12)(date_dim.d_year = 1998))
----------------------------------------PhysicalOlapScan[date_dim]
-------------------------PhysicalDistribute
---------------------------PhysicalProject
-----------------------------filter((item.i_manager_id = 1))
-------------------------------PhysicalOlapScan[item]
-------------------PhysicalDistribute
---------------------PhysicalProject
-----------------------filter(((cast(t_meal_time as VARCHAR(*)) = 'breakfast')
OR (cast(t_meal_time as VARCHAR(*)) = 'dinner')))
-------------------------PhysicalOlapScan[time_dim]
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------filter((item.i_manager_id = 1))
+--------------------------------PhysicalOlapScan[item]
+--------------------PhysicalDistribute
+----------------------PhysicalProject
+------------------------filter(t_meal_time IN ('breakfast', 'dinner'))
+--------------------------PhysicalOlapScan[time_dim]
diff --git
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query72.out
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query72.out
index 08abc4069e3..58fd6f5c4a8 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query72.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query72.out
@@ -13,53 +13,7 @@ PhysicalResultSink
--------------------PhysicalOlapScan[catalog_returns]
------------------PhysicalDistribute
--------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN](warehouse.w_warehouse_sk =
inventory.inv_warehouse_sk)
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN](catalog_sales.cs_item_sk =
inventory.inv_item_sk)(inventory.inv_date_sk =
d2.d_date_sk)(inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)
-----------------------------PhysicalDistribute
-------------------------------PhysicalOlapScan[inventory]
-----------------------------PhysicalDistribute
-------------------------------PhysicalProject
---------------------------------hashJoin[INNER_JOIN](d1.d_week_seq =
d2.d_week_seq)
-----------------------------------PhysicalDistribute
-------------------------------------PhysicalProject
---------------------------------------hashJoin[LEFT_OUTER_JOIN](catalog_sales.cs_promo_sk
= promotion.p_promo_sk)
-----------------------------------------PhysicalProject
-------------------------------------------hashJoin[INNER_JOIN](item.i_item_sk
= catalog_sales.cs_item_sk)
---------------------------------------------PhysicalDistribute
-----------------------------------------------PhysicalProject
-------------------------------------------------hashJoin[INNER_JOIN](catalog_sales.cs_ship_date_sk
= d3.d_date_sk)(d3.d_date > cast((cast(d_date as BIGINT) + 5) as DATEV2))
---------------------------------------------------PhysicalDistribute
-----------------------------------------------------hashJoin[INNER_JOIN](catalog_sales.cs_bill_cdemo_sk
= customer_demographics.cd_demo_sk)
-------------------------------------------------------PhysicalDistribute
---------------------------------------------------------hashJoin[INNER_JOIN](catalog_sales.cs_sold_date_sk
= d1.d_date_sk)
-----------------------------------------------------------hashJoin[INNER_JOIN](catalog_sales.cs_bill_hdemo_sk
= household_demographics.hd_demo_sk)
-------------------------------------------------------------PhysicalProject
---------------------------------------------------------------PhysicalOlapScan[catalog_sales]
-------------------------------------------------------------PhysicalDistribute
---------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------filter((cast(hd_buy_potential
as VARCHAR(*)) = '501-1000'))
-------------------------------------------------------------------PhysicalOlapScan[household_demographics]
-----------------------------------------------------------PhysicalDistribute
-------------------------------------------------------------PhysicalProject
---------------------------------------------------------------filter((d1.d_year
= 2002))
-----------------------------------------------------------------PhysicalOlapScan[date_dim]
-------------------------------------------------------PhysicalDistribute
---------------------------------------------------------PhysicalProject
-----------------------------------------------------------filter((cast(cd_marital_status
as VARCHAR(*)) = 'W'))
-------------------------------------------------------------PhysicalOlapScan[customer_demographics]
---------------------------------------------------PhysicalDistribute
-----------------------------------------------------PhysicalProject
-------------------------------------------------------PhysicalOlapScan[date_dim]
---------------------------------------------PhysicalDistribute
-----------------------------------------------PhysicalProject
-------------------------------------------------PhysicalOlapScan[item]
-----------------------------------------PhysicalDistribute
-------------------------------------------PhysicalProject
---------------------------------------------PhysicalOlapScan[promotion]
-----------------------------------PhysicalDistribute
-------------------------------------PhysicalProject
---------------------------------------PhysicalOlapScan[date_dim]
+----------------------hashJoin[LEFT_OUTER_JOIN](catalog_sales.cs_promo_sk =
promotion.p_promo_sk)
------------------------PhysicalDistribute
--------------------------PhysicalProject
----------------------------hashJoin[INNER_JOIN](warehouse.w_warehouse_sk =
inventory.inv_warehouse_sk)
@@ -69,38 +23,40 @@ PhysicalResultSink
------------------------------------PhysicalOlapScan[item]
----------------------------------PhysicalDistribute
------------------------------------PhysicalProject
---------------------------------------hashJoin[INNER_JOIN](inventory.inv_date_sk
= d2.d_date_sk)(d1.d_week_seq = d2.d_week_seq)
-----------------------------------------PhysicalProject
-------------------------------------------hashJoin[INNER_JOIN](catalog_sales.cs_item_sk
= inventory.inv_item_sk)(inventory.inv_quantity_on_hand <
catalog_sales.cs_quantity)
---------------------------------------------PhysicalOlapScan[inventory]
---------------------------------------------PhysicalDistribute
-----------------------------------------------PhysicalProject
-------------------------------------------------hashJoin[INNER_JOIN](catalog_sales.cs_ship_date_sk
= d3.d_date_sk)(d3.d_date > cast((cast(d_date as BIGINT) + 5) as DATEV2))
---------------------------------------------------PhysicalDistribute
-----------------------------------------------------hashJoin[INNER_JOIN](catalog_sales.cs_bill_cdemo_sk
= customer_demographics.cd_demo_sk)
-------------------------------------------------------PhysicalDistribute
---------------------------------------------------------hashJoin[INNER_JOIN](catalog_sales.cs_sold_date_sk
= d1.d_date_sk)
-----------------------------------------------------------hashJoin[INNER_JOIN](catalog_sales.cs_bill_hdemo_sk
= household_demographics.hd_demo_sk)
-------------------------------------------------------------PhysicalProject
---------------------------------------------------------------PhysicalOlapScan[catalog_sales]
-------------------------------------------------------------PhysicalDistribute
---------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------filter((household_demographics.hd_buy_potential
= '501-1000'))
-------------------------------------------------------------------PhysicalOlapScan[household_demographics]
-----------------------------------------------------------PhysicalDistribute
-------------------------------------------------------------PhysicalProject
---------------------------------------------------------------filter((d1.d_year
= 2002))
-----------------------------------------------------------------PhysicalOlapScan[date_dim]
-------------------------------------------------------PhysicalDistribute
---------------------------------------------------------PhysicalProject
-----------------------------------------------------------filter((customer_demographics.cd_marital_status
= 'W'))
-------------------------------------------------------------PhysicalOlapScan[customer_demographics]
---------------------------------------------------PhysicalDistribute
-----------------------------------------------------PhysicalProject
-------------------------------------------------------PhysicalOlapScan[date_dim]
+--------------------------------------hashJoin[INNER_JOIN](catalog_sales.cs_item_sk
= inventory.inv_item_sk)(inventory.inv_date_sk =
d2.d_date_sk)(inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)
+----------------------------------------PhysicalDistribute
+------------------------------------------PhysicalOlapScan[inventory]
----------------------------------------PhysicalDistribute
------------------------------------------PhysicalProject
---------------------------------------------PhysicalOlapScan[date_dim]
+--------------------------------------------hashJoin[INNER_JOIN](d1.d_week_seq
= d2.d_week_seq)
+----------------------------------------------PhysicalDistribute
+------------------------------------------------PhysicalProject
+--------------------------------------------------hashJoin[INNER_JOIN](catalog_sales.cs_ship_date_sk
= d3.d_date_sk)(d3.d_date > cast((cast(d_date as BIGINT) + 5) as DATEV2))
+----------------------------------------------------PhysicalDistribute
+------------------------------------------------------hashJoin[INNER_JOIN](catalog_sales.cs_bill_cdemo_sk
= customer_demographics.cd_demo_sk)
+--------------------------------------------------------PhysicalDistribute
+----------------------------------------------------------hashJoin[INNER_JOIN](catalog_sales.cs_sold_date_sk
= d1.d_date_sk)
+------------------------------------------------------------hashJoin[INNER_JOIN](catalog_sales.cs_bill_hdemo_sk
= household_demographics.hd_demo_sk)
+--------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------PhysicalOlapScan[catalog_sales]
+--------------------------------------------------------------PhysicalDistribute
+----------------------------------------------------------------PhysicalProject
+------------------------------------------------------------------filter((household_demographics.hd_buy_potential
= '501-1000'))
+--------------------------------------------------------------------PhysicalOlapScan[household_demographics]
+------------------------------------------------------------PhysicalDistribute
+--------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------filter((d1.d_year
= 2002))
+------------------------------------------------------------------PhysicalOlapScan[date_dim]
+--------------------------------------------------------PhysicalDistribute
+----------------------------------------------------------PhysicalProject
+------------------------------------------------------------filter((customer_demographics.cd_marital_status
= 'W'))
+--------------------------------------------------------------PhysicalOlapScan[customer_demographics]
+----------------------------------------------------PhysicalDistribute
+------------------------------------------------------PhysicalProject
+--------------------------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------------------PhysicalDistribute
+------------------------------------------------PhysicalProject
+--------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------PhysicalDistribute
--------------------------------PhysicalProject
----------------------------------PhysicalOlapScan[warehouse]
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 0b350fd5018..4d82cd3a79d 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](store_sales.ss_store_sk =
store.s_store_sk)
--------------------------hashJoin[INNER_JOIN](store_sales.ss_hdemo_sk =
household_demographics.hd_demo_sk)
-----------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk =
date_dim.d_date_sk)
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[store_sales]
-------------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk
= date_dim.d_date_sk)
--------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_dom >= 1)d_year IN (2000,
2001, 2002)(date_dim.d_dom <= 2))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[store_sales]
+--------------------------------PhysicalDistribute
+----------------------------------PhysicalProject
+------------------------------------filter((date_dim.d_dom >= 1)d_year IN
(2000, 2001, 2002)(date_dim.d_dom <= 2))
+--------------------------------------PhysicalOlapScan[date_dim]
----------------------------PhysicalDistribute
------------------------------PhysicalProject
--------------------------------filter(hd_buy_potential IN ('501-1000',
'Unknown')(household_demographics.hd_vehicle_count > 0)(if((hd_vehicle_count >
0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) >
1))
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 96fe757f6e9..59b860b0f73 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](date_dim.d_date_sk =
catalog_sales.cs_sold_date_sk)
-------------------------hashJoin[INNER_JOIN](item.i_item_sk =
catalog_sales.cs_item_sk)
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[catalog_sales]
---------------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN](item.i_item_sk =
catalog_sales.cs_item_sk)
----------------------------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](date_dim.d_date_sk =
store_sales.ss_sold_date_sk)
-------------------------hashJoin[INNER_JOIN](item.i_item_sk =
store_sales.ss_item_sk)
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[store_sales]
---------------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN](item.i_item_sk =
store_sales.ss_item_sk)
----------------------------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](date_dim.d_date_sk =
web_sales.ws_sold_date_sk)
-------------------------hashJoin[INNER_JOIN](item.i_item_sk =
web_sales.ws_item_sk)
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[web_sales]
---------------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN](item.i_item_sk =
web_sales.ws_item_sk)
----------------------------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 05f8bd4c577..98d3721aa86 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](store_sales.ss_store_sk =
store.s_store_sk)
--------------------------hashJoin[INNER_JOIN](store_sales.ss_hdemo_sk =
household_demographics.hd_demo_sk)
-----------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk =
date_dim.d_date_sk)
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[store_sales]
-------------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk
= date_dim.d_date_sk)
--------------------------------PhysicalProject
-----------------------------------filter(d_year IN (1998, 1999,
2000)(date_dim.d_dow = 1))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[store_sales]
+--------------------------------PhysicalDistribute
+----------------------------------PhysicalProject
+------------------------------------filter(d_year IN (1998, 1999,
2000)(date_dim.d_dow = 1))
+--------------------------------------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 8b1e9d5c7ba..f62569f65ff 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](expr_substring(s_zip, 1, 2) =
expr_substring(ca_zip, 1, 2))
------------------PhysicalProject
--------------------hashJoin[INNER_JOIN](store_sales.ss_store_sk =
store.s_store_sk)
-----------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk =
date_dim.d_date_sk)
-------------------------PhysicalProject
---------------------------PhysicalOlapScan[store_sales]
-------------------------PhysicalDistribute
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk =
date_dim.d_date_sk)
--------------------------PhysicalProject
-----------------------------filter((date_dim.d_year = 1998)(date_dim.d_qoy =
2))
-------------------------------PhysicalOlapScan[date_dim]
+----------------------------PhysicalOlapScan[store_sales]
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_year = 1998)(date_dim.d_qoy =
2))
+--------------------------------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 2ff73a4a350..42171740826 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](ctr1.ctr_state =
ctr2.ctr_state)(cast(ctr_total_return as DOUBLE) >
cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE))
---------------hashJoin[INNER_JOIN](ctr1.ctr_customer_sk =
customer.c_customer_sk)
-----------------PhysicalDistribute
-------------------PhysicalCteConsumer ( cteId=CTEId#0 )
-----------------PhysicalDistribute
-------------------PhysicalProject
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN](ctr1.ctr_customer_sk =
customer.c_customer_sk)
+------------------PhysicalDistribute
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+------------------PhysicalDistribute
--------------------hashJoin[INNER_JOIN](customer_address.ca_address_sk =
customer.c_current_addr_sk)
----------------------PhysicalDistribute
------------------------PhysicalProject
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 ea5b49eb75c..d624f43ddc7 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](date_dim.d_date_sk =
inventory.inv_date_sk)
-------------------------hashJoin[INNER_JOIN](inventory.inv_item_sk =
item.i_item_sk)
---------------------------PhysicalProject
-----------------------------filter((inventory.inv_quantity_on_hand >=
100)(inventory.inv_quantity_on_hand <= 500))
-------------------------------PhysicalOlapScan[inventory]
---------------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN](inventory.inv_item_sk =
item.i_item_sk)
----------------------------PhysicalProject
-------------------------------filter((item.i_current_price >=
17.00)(item.i_current_price <= 47.00)i_manufact_id IN (138, 169, 339, 639))
---------------------------------PhysicalOlapScan[item]
+------------------------------filter((inventory.inv_quantity_on_hand >=
100)(inventory.inv_quantity_on_hand <= 500))
+--------------------------------PhysicalOlapScan[inventory]
+----------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------filter((item.i_current_price >=
17.00)(item.i_current_price <= 47.00)i_manufact_id IN (138, 169, 339, 639))
+----------------------------------PhysicalOlapScan[item]
------------------------PhysicalDistribute
--------------------------PhysicalProject
----------------------------filter((date_dim.d_date <=
'1999-09-07')(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 4cb57595f36..56d66c5ac33 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](store_sales.ss_store_sk =
store.s_store_sk)
--------------------------------PhysicalProject
----------------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk
= date_dim.d_date_sk)
-------------------------------------hashJoin[INNER_JOIN](store_sales.ss_item_sk
= item.i_item_sk)
---------------------------------------PhysicalProject
-----------------------------------------PhysicalOlapScan[store_sales]
---------------------------------------PhysicalDistribute
+------------------------------------PhysicalProject
+--------------------------------------hashJoin[INNER_JOIN](store_sales.ss_item_sk
= item.i_item_sk)
----------------------------------------PhysicalProject
-------------------------------------------filter(((i_category IN ('Jewelry',
'Shoes', 'Electronics') AND i_class IN ('semi-precious', 'athletic',
'portable')) OR (i_category IN ('Men', 'Music', 'Women') AND i_class IN
('accessories', 'rock', 'maternity'))))
---------------------------------------------PhysicalOlapScan[item]
+------------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------------PhysicalDistribute
+------------------------------------------PhysicalProject
+--------------------------------------------filter(((i_category IN ('Jewelry',
'Shoes', 'Electronics') AND i_class IN ('semi-precious', 'athletic',
'portable')) OR (i_category IN ('Men', 'Music', 'Women') AND i_class IN
('accessories', 'rock', 'maternity'))))
+----------------------------------------------PhysicalOlapScan[item]
------------------------------------PhysicalDistribute
--------------------------------------PhysicalProject
----------------------------------------filter((date_dim.d_year = 1999))
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 919fdb60190..4f20f7bf82a 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](catalog_sales.cs_call_center_sk =
call_center.cc_call_center_sk)
+----------------hashJoin[INNER_JOIN](catalog_sales.cs_warehouse_sk =
warehouse.w_warehouse_sk)
------------------PhysicalProject
--------------------hashJoin[INNER_JOIN](catalog_sales.cs_ship_mode_sk =
ship_mode.sm_ship_mode_sk)
-----------------------hashJoin[INNER_JOIN](catalog_sales.cs_warehouse_sk =
warehouse.w_warehouse_sk)
+----------------------hashJoin[INNER_JOIN](catalog_sales.cs_call_center_sk =
call_center.cc_call_center_sk)
------------------------hashJoin[INNER_JOIN](catalog_sales.cs_ship_date_sk =
date_dim.d_date_sk)
--------------------------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/q2.out
b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q2.out
index 401b2d35c69..4c8fc44b7c2 100644
--- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q2.out
+++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q2.out
@@ -11,18 +11,6 @@ PhysicalResultSink
----------------PhysicalDistribute
------------------PhysicalProject
--------------------hashJoin[INNER_JOIN](supplier.s_suppkey =
partsupp.ps_suppkey)
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN](supplier.s_nationkey =
nation.n_nationkey)
---------------------------PhysicalOlapScan[supplier]
---------------------------PhysicalDistribute
-----------------------------hashJoin[INNER_JOIN](nation.n_regionkey =
region.r_regionkey)
-------------------------------PhysicalDistribute
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[nation]
-------------------------------PhysicalDistribute
---------------------------------PhysicalProject
-----------------------------------filter((region.r_name = 'EUROPE'))
-------------------------------------PhysicalOlapScan[region]
----------------------PhysicalDistribute
------------------------PhysicalProject
--------------------------hashJoin[INNER_JOIN](part.p_partkey =
partsupp.ps_partkey)
@@ -31,4 +19,17 @@ PhysicalResultSink
----------------------------PhysicalProject
------------------------------filter((part.p_size = 15)(p_type like '%BRASS'))
--------------------------------PhysicalOlapScan[part]
+----------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN](supplier.s_nationkey =
nation.n_nationkey)
+----------------------------PhysicalOlapScan[supplier]
+----------------------------PhysicalDistribute
+------------------------------hashJoin[INNER_JOIN](nation.n_regionkey =
region.r_regionkey)
+--------------------------------PhysicalDistribute
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[nation]
+--------------------------------PhysicalDistribute
+----------------------------------PhysicalProject
+------------------------------------filter((region.r_name = 'EUROPE'))
+--------------------------------------PhysicalOlapScan[region]
diff --git a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q8.out
b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q8.out
index e699fc97c2b..45c0360124e 100644
--- a/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q8.out
+++ b/regression-test/data/nereids_tpch_shape_sf1000_p0/shape/q8.out
@@ -16,36 +16,33 @@ PhysicalResultSink
--------------------------PhysicalOlapScan[supplier]
------------------------PhysicalDistribute
--------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN](lineitem.l_orderkey =
orders.o_orderkey)
-------------------------------PhysicalDistribute
---------------------------------PhysicalProject
-----------------------------------hashJoin[INNER_JOIN](orders.o_custkey =
customer.c_custkey)
-------------------------------------PhysicalDistribute
+----------------------------hashJoin[INNER_JOIN](n1.n_regionkey =
region.r_regionkey)
+------------------------------PhysicalProject
+--------------------------------hashJoin[INNER_JOIN](customer.c_nationkey =
n1.n_nationkey)
+----------------------------------PhysicalProject
+------------------------------------hashJoin[INNER_JOIN](orders.o_custkey =
customer.c_custkey)
--------------------------------------PhysicalProject
-----------------------------------------filter((orders.o_orderdate <=
1996-12-31)(orders.o_orderdate >= 1995-01-01))
-------------------------------------------PhysicalOlapScan[orders]
-------------------------------------PhysicalDistribute
---------------------------------------hashJoin[INNER_JOIN](customer.c_nationkey
= n1.n_nationkey)
-----------------------------------------PhysicalProject
-------------------------------------------PhysicalOlapScan[customer]
-----------------------------------------PhysicalDistribute
-------------------------------------------hashJoin[INNER_JOIN](n1.n_regionkey
= region.r_regionkey)
---------------------------------------------PhysicalDistribute
-----------------------------------------------PhysicalProject
-------------------------------------------------PhysicalOlapScan[nation]
---------------------------------------------PhysicalDistribute
+----------------------------------------PhysicalOlapScan[customer]
+--------------------------------------PhysicalDistribute
+----------------------------------------hashJoin[INNER_JOIN](lineitem.l_orderkey
= orders.o_orderkey)
+------------------------------------------PhysicalProject
+--------------------------------------------filter((orders.o_orderdate <=
'1996-12-31')(orders.o_orderdate >= '1995-01-01'))
+----------------------------------------------PhysicalOlapScan[orders]
+------------------------------------------PhysicalProject
+--------------------------------------------hashJoin[INNER_JOIN](part.p_partkey
= lineitem.l_partkey)
----------------------------------------------PhysicalProject
-------------------------------------------------filter((region.r_name =
'AMERICA'))
---------------------------------------------------PhysicalOlapScan[region]
+------------------------------------------------PhysicalOlapScan[lineitem]
+----------------------------------------------PhysicalDistribute
+------------------------------------------------PhysicalProject
+--------------------------------------------------filter((part.p_type =
'ECONOMY ANODIZED STEEL'))
+----------------------------------------------------PhysicalOlapScan[part]
+----------------------------------PhysicalDistribute
+------------------------------------PhysicalProject
+--------------------------------------PhysicalOlapScan[nation]
------------------------------PhysicalDistribute
--------------------------------PhysicalProject
-----------------------------------hashJoin[INNER_JOIN](part.p_partkey =
lineitem.l_partkey)
-------------------------------------PhysicalProject
---------------------------------------PhysicalOlapScan[lineitem]
-------------------------------------PhysicalDistribute
---------------------------------------PhysicalProject
-----------------------------------------filter((part.p_type = 'ECONOMY
ANODIZED STEEL'))
-------------------------------------------PhysicalOlapScan[part]
+----------------------------------filter((region.r_name = 'AMERICA'))
+------------------------------------PhysicalOlapScan[region]
--------------------PhysicalDistribute
----------------------PhysicalProject
------------------------PhysicalOlapScan[nation]
diff --git
a/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf1.groovy
b/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf1.groovy
index 9bb1877d1f2..fc2efbaf960 100644
--- a/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf1.groovy
+++ b/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf1.groovy
@@ -32,28 +32,28 @@ suite("ds_rf1") {
sql 'set enable_pipeline_engine=true'
String stmt = '''
explain physical plan
- with customer_total_return as
-(select sr_customer_sk as ctr_customer_sk
-,sr_store_sk as ctr_store_sk
-,sum(SR_FEE) as ctr_total_return
-from store_returns
-,date_dim
-where sr_returned_date_sk = d_date_sk
-and d_year =2000
-group by sr_customer_sk
-,sr_store_sk)
- select c_customer_id
-from customer_total_return ctr1
-,store
-,customer
-where ctr1.ctr_total_return > (select avg(ctr_total_return)*1.2
-from customer_total_return ctr2
-where ctr1.ctr_store_sk = ctr2.ctr_store_sk)
-and s_store_sk = ctr1.ctr_store_sk
-and s_state = 'SD'
-and ctr1.ctr_customer_sk = c_customer_sk
-order by c_customer_id
-limit 100;
+ with customer_total_return as
+(select sr_customer_sk as ctr_customer_sk
+,sr_store_sk as ctr_store_sk
+,sum(SR_FEE) as ctr_total_return
+from store_returns
+,date_dim
+where sr_returned_date_sk = d_date_sk
+and d_year =2000
+group by sr_customer_sk
+,sr_store_sk)
+ select c_customer_id
+from customer_total_return ctr1
+,store
+,customer
+where ctr1.ctr_total_return > (select avg(ctr_total_return)*1.2
+from customer_total_return ctr2
+where ctr1.ctr_store_sk = ctr2.ctr_store_sk)
+and s_store_sk = ctr1.ctr_store_sk
+and s_state = 'SD'
+and ctr1.ctr_customer_sk = c_customer_sk
+order by c_customer_id
+limit 100;
'''
String plan = sql "${stmt}"
@@ -74,6 +74,5 @@ limit 100;
// def outFile =
"regression-test/suites/nereids_tpcds_shape_sf100_p0/ddl/rf/rf.1"
// File file = new File(outFile)
// file.write(getRuntimeFilters(plan))
-
-
assertEquals("RF0[d_date_sk->[sr_returned_date_sk],RF2[ctr_customer_sk->[c_customer_sk],RF1[s_store_sk->[ctr_store_sk]",
getRuntimeFilters(plan))
+
assertEquals("RF0[d_date_sk->[sr_returned_date_sk],RF1[ctr_customer_sk->[c_customer_sk]",
getRuntimeFilters(plan))
}
diff --git
a/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf14.groovy
b/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf14.groovy
index 4f88f7b762c..503bbed8953 100644
--- a/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf14.groovy
+++ b/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf14.groovy
@@ -1,37 +1,37 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-suite("ds_rf14") {
- String db = context.config.getDbNameByFile(new File(context.file.parent))
- sql "use ${db}"
- sql 'set enable_nereids_planner=true'
- sql 'set enable_fallback_to_original_planner=false'
- sql 'set exec_mem_limit=21G'
- sql 'set be_number_for_test=3'
- sql 'set parallel_fragment_exec_instance_num=8; '
- sql 'set parallel_pipeline_task_num=8; '
- sql 'set forbid_unknown_col_stats=true'
- sql 'set broadcast_row_count_limit = 30000000'
- sql 'set enable_nereids_timeout = false'
- sql 'set enable_pipeline_engine=true'
- String stmt = '''
- explain physical plan
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+suite("ds_rf14") {
+ String db = context.config.getDbNameByFile(new File(context.file.parent))
+ sql "use ${db}"
+ sql 'set enable_nereids_planner=true'
+ sql 'set enable_fallback_to_original_planner=false'
+ sql 'set exec_mem_limit=21G'
+ sql 'set be_number_for_test=3'
+ sql 'set parallel_fragment_exec_instance_num=8; '
+ sql 'set parallel_pipeline_task_num=8; '
+ sql 'set forbid_unknown_col_stats=true'
+ sql 'set broadcast_row_count_limit = 30000000'
+ sql 'set enable_nereids_timeout = false'
+ sql 'set enable_pipeline_engine=true'
+ String stmt = '''
+ explain physical plan
with cross_items as
(select i_item_sk ss_item_sk
from item,
@@ -133,26 +133,24 @@ suite("ds_rf14") {
group by rollup (channel, i_brand_id,i_class_id,i_category_id)
order by channel,i_brand_id,i_class_id,i_category_id
limit 100;
-
- '''
- String plan = sql "${stmt}"
- println plan
- def getRuntimeFilters = { plantree ->
- {
- def lst = []
- plantree.eachMatch("RF\\d+\\[[^#]+#\\d+->\\[[^\\]]+\\]") {
- ch ->
- {
- lst.add(ch.replaceAll("#\\d+", ''))
- }
- }
- return lst.join(',')
- }
- }
-
- // def outFile =
"regression-test/suites/nereids_tpcds_shape_sf100_p0/ddl/rf/rf.14"
- // File file = new File(outFile)
- // file.write(getRuntimeFilters(plan))
-
-
assertEquals("RF6[class_id->[i_class_id],RF7[category_id->[i_category_id],RF8[brand_id->[i_brand_id],RF1[i_item_sk->[ss_item_sk],RF0[d_date_sk->[ss_sold_date_sk],RF3[i_item_sk->[cs_item_sk],RF2[d_date_sk->[cs_sold_date_sk],RF5[i_item_sk->[ws_item_sk],RF4[d_date_sk->[ws_sold_date_sk],RF9[d_date_sk->[ss_sold_date_sk],RF10[d_date_sk->[cs_sold_date_sk],RF11[d_date_sk->[ws_sold_date_sk],RF14[ss_item_sk->[ss_item_sk],RF13[i_item_sk->[ss_item_sk],RF12[d_date_sk->[ss_sold_date_sk],RF17[cs_i
[...]
-}
+
+ '''
+ String plan = sql "${stmt}"
+ println plan
+ def getRuntimeFilters = { plantree ->
+ {
+ def lst = []
+ plantree.eachMatch("RF\\d+\\[[^#]+#\\d+->\\[[^\\]]+\\]") {
+ ch ->
+ {
+ lst.add(ch.replaceAll("#\\d+", ''))
+ }
+ }
+ return lst.join(',')
+ }
+ }
+
+ // def outFile =
"regression-test/suites/nereids_tpcds_shape_sf100_p0/ddl/rf/rf.14"
+ // File file = new File(outFile)
+
assertEquals("RF3[i_item_sk->[ss_item_sk],RF2[d_date_sk->[ss_sold_date_sk],RF5[i_item_sk->[cs_item_sk],RF4[d_date_sk->[cs_sold_date_sk],RF7[i_item_sk->[ws_item_sk],RF6[d_date_sk->[ws_sold_date_sk],RF1[i_item_sk->[ss_item_sk],RF0[d_date_sk->[ss_sold_date_sk],RF9[i_item_sk->[cs_item_sk],RF8[d_date_sk->[cs_sold_date_sk],RF11[i_item_sk->[ws_item_sk],RF10[d_date_sk->[ws_sold_date_sk]",
getRuntimeFilters(plan))
+}
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 796ce479e46..6bc6203536b 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
@@ -84,6 +84,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 529dca01feb..4eaafd10903 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
@@ -108,6 +108,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 cb54204e6f3..45f1c7d5bc2 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
@@ -84,6 +84,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_rf2.groovy
b/regression-test/suites/nereids_tpch_shape_sf1000_p0/rf/h_rf2.groovy
index 9f06ce145a6..4e33498ace4 100644
--- a/regression-test/suites/nereids_tpch_shape_sf1000_p0/rf/h_rf2.groovy
+++ b/regression-test/suites/nereids_tpch_shape_sf1000_p0/rf/h_rf2.groovy
@@ -110,5 +110,5 @@ limit 100;
// def outFile =
"regression-test/suites/nereids_tpch_shape_sf1000_p0/ddl/rf/rf.2"
// File file = new File(outFile)
// file.write(getRuntimeFilters(plan))
-
assertEquals("RF3[ps_suppkey->[s_suppkey],RF2[n_nationkey->[s_nationkey],RF1[r_regionkey->[n_regionkey],RF0[p_partkey->[ps_partkey]",
getRuntimeFilters(plan))
+
assertEquals("RF3[s_suppkey->[ps_suppkey],RF2[p_partkey->[ps_partkey],RF1[n_nationkey->[s_nationkey],RF0[r_regionkey->[n_regionkey]",
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 4abc1c991d4..02f84d0526c 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
@@ -106,5 +106,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))
}
diff --git
a/regression-test/suites/nereids_tpch_shape_sf1000_p0/rf/h_rf8.groovy
b/regression-test/suites/nereids_tpch_shape_sf1000_p0/rf/h_rf8.groovy
index 208a1385a12..2524227d46d 100644
--- a/regression-test/suites/nereids_tpch_shape_sf1000_p0/rf/h_rf8.groovy
+++ b/regression-test/suites/nereids_tpch_shape_sf1000_p0/rf/h_rf8.groovy
@@ -104,5 +104,5 @@ order by
// def outFile =
"regression-test/suites/nereids_tpch_shape_sf1000_p0/ddl/rf/rf.8"
// File file = new File(outFile)
// file.write(getRuntimeFilters(plan))
-
assertEquals("RF6[n_nationkey->[s_nationkey],RF5[l_suppkey->[s_suppkey],RF4[l_orderkey->[o_orderkey],RF3[c_custkey->[o_custkey],RF2[n_nationkey->[c_nationkey],RF1[r_regionkey->[n_regionkey],RF0[p_partkey->[l_partkey]",
getRuntimeFilters(plan))
+
assertEquals("RF6[n_nationkey->[s_nationkey],RF5[l_suppkey->[s_suppkey],RF4[r_regionkey->[n_regionkey],RF3[n_nationkey->[c_nationkey],RF2[o_custkey->[c_custkey],RF1[l_orderkey->[o_orderkey],RF0[p_partkey->[l_partkey]",
getRuntimeFilters(plan))
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]