This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new a466b4c8647 branch-3.1: [fix](nereids) setOperator column prunning bug
#58237 (#58343)
a466b4c8647 is described below
commit a466b4c86475123a4e069929dee1d1e19a78dcdf
Author: minghong <[email protected]>
AuthorDate: Wed Nov 26 10:45:21 2025 +0800
branch-3.1: [fix](nereids) setOperator column prunning bug #58237 (#58343)
picked from #58237
---
.../doris/nereids/rules/rewrite/ColumnPruning.java | 16 ++---
.../tpcds_sf100/noStatsRfPrune/query38.out | 78 ++++++++++++----------
.../tpcds_sf100/noStatsRfPrune/query87.out | 78 ++++++++++++----------
.../tpcds_sf100/no_stats_shape/query38.out | 78 ++++++++++++----------
.../tpcds_sf100/no_stats_shape/query87.out | 78 ++++++++++++----------
.../shape_check/tpcds_sf100/rf_prune/query38.out | 78 ++++++++++++----------
.../shape_check/tpcds_sf100/rf_prune/query87.out | 78 ++++++++++++----------
.../data/shape_check/tpcds_sf100/shape/query38.out | 78 ++++++++++++----------
.../data/shape_check/tpcds_sf100/shape/query87.out | 78 ++++++++++++----------
.../data/shape_check/tpcds_sf1000/hint/query38.out | 78 ++++++++++++----------
.../data/shape_check/tpcds_sf1000/hint/query87.out | 78 ++++++++++++----------
.../shape_check/tpcds_sf1000/shape/query38.out | 78 ++++++++++++----------
.../shape_check/tpcds_sf1000/shape/query87.out | 78 ++++++++++++----------
13 files changed, 510 insertions(+), 442 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ColumnPruning.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ColumnPruning.java
index 4fc02581ca4..6af16fd5751 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ColumnPruning.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ColumnPruning.java
@@ -180,7 +180,7 @@ public class ColumnPruning extends
DefaultPlanRewriter<PruneContext> implements
@Override
public Plan visitLogicalUnion(LogicalUnion union, PruneContext context) {
if (union.getQualifier() == Qualifier.DISTINCT) {
- return skipPruneThisAndFirstLevelChildren(union);
+ return skipPruneThis(union);
}
LogicalUnion prunedOutputUnion = pruneUnionOutput(union, context);
// start prune children of union
@@ -209,12 +209,12 @@ public class ColumnPruning extends
DefaultPlanRewriter<PruneContext> implements
// we should keep the output of LogicalSetOperation and all the children
@Override
public Plan visitLogicalExcept(LogicalExcept except, PruneContext context)
{
- return skipPruneThisAndFirstLevelChildren(except);
+ return skipPruneThis(except);
}
@Override
public Plan visitLogicalIntersect(LogicalIntersect intersect, PruneContext
context) {
- return skipPruneThisAndFirstLevelChildren(intersect);
+ return skipPruneThis(intersect);
}
@Override
@@ -237,7 +237,7 @@ public class ColumnPruning extends
DefaultPlanRewriter<PruneContext> implements
@Override
public Plan visitLogicalCTEProducer(LogicalCTEProducer<? extends Plan>
cteProducer, PruneContext context) {
- return skipPruneThisAndFirstLevelChildren(cteProducer);
+ return skipPruneThis(cteProducer);
}
@Override
@@ -276,12 +276,8 @@ public class ColumnPruning extends
DefaultPlanRewriter<PruneContext> implements
return pruneChildren(fillUpAggregate);
}
- private Plan skipPruneThisAndFirstLevelChildren(Plan plan) {
- ImmutableSet.Builder<Slot> requireAllOutputOfChildren =
ImmutableSet.builder();
- for (Plan child : plan.children()) {
- requireAllOutputOfChildren.addAll(child.getOutput());
- }
- return pruneChildren(plan, requireAllOutputOfChildren.build());
+ private Plan skipPruneThis(Plan plan) {
+ return pruneChildren(plan, plan.getOutputSet());
}
private static Aggregate<? extends Plan>
fillUpGroupByAndOutput(Aggregate<? extends Plan> prunedOutputAgg) {
diff --git
a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query38.out
b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query38.out
index b0bda7f927c..05b9462da2e 100644
--- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query38.out
+++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query38.out
@@ -9,42 +9,48 @@ PhysicalResultSink
------------PhysicalProject
--------------PhysicalIntersect
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=()
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=()
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=()
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=()
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[catalog_sales] apply RFs:
RF2
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=()
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=()
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
diff --git
a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query87.out
b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query87.out
index 431debd06c4..cd22ffb406d 100644
--- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query87.out
+++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query87.out
@@ -7,42 +7,48 @@ PhysicalResultSink
--------PhysicalProject
----------PhysicalExcept
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=()
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=()
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=()
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=()
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=()
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[web_sales] apply RFs: RF4
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=()
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
diff --git
a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query38.out
b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query38.out
index 2bc9d9fecbc..22eb1135d05 100644
--- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query38.out
+++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query38.out
@@ -9,42 +9,48 @@ PhysicalResultSink
------------PhysicalProject
--------------PhysicalIntersect
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF1 c_customer_sk->[ws_bill_customer_sk]
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF1 c_customer_sk->[ws_bill_customer_sk]
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
RF1
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk]
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
RF3
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk]
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[catalog_sales] apply RFs:
RF2 RF3
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk]
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4
RF5
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk]
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4
RF5
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
diff --git
a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query87.out
b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query87.out
index a71098a0210..73e0891e441 100644
--- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query87.out
+++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query87.out
@@ -7,42 +7,48 @@ PhysicalResultSink
--------PhysicalProject
----------PhysicalExcept
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk]
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk]
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk]
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk]
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
RF3
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk]
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk]
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query38.out
b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query38.out
index 26d52e9fae9..fbfd24e4988 100644
--- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query38.out
+++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query38.out
@@ -9,42 +9,48 @@ PhysicalResultSink
------------PhysicalProject
--------------PhysicalIntersect
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN shuffle]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=()
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN shuffle]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=()
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN shuffle]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=()
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=()
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[catalog_sales] apply RFs:
RF2
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=()
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=()
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query87.out
b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query87.out
index 9bfa302e37c..44b72f131e0 100644
--- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query87.out
+++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query87.out
@@ -7,42 +7,48 @@ PhysicalResultSink
--------PhysicalProject
----------PhysicalExcept
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=()
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=()
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN shuffle]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=()
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=()
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN shuffle]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=()
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[web_sales] apply RFs: RF4
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN shuffle]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=()
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query38.out
b/regression-test/data/shape_check/tpcds_sf100/shape/query38.out
index ef2051eb2d0..55f286d916e 100644
--- a/regression-test/data/shape_check/tpcds_sf100/shape/query38.out
+++ b/regression-test/data/shape_check/tpcds_sf100/shape/query38.out
@@ -9,42 +9,48 @@ PhysicalResultSink
------------PhysicalProject
--------------PhysicalIntersect
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN shuffle]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF1 c_customer_sk->[ws_bill_customer_sk]
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN shuffle]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF1 c_customer_sk->[ws_bill_customer_sk]
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
RF1
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN shuffle]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk]
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
RF3
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk]
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[catalog_sales] apply RFs:
RF2 RF3
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk]
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4
RF5
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk]
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4
RF5
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1194) and
(date_dim.d_month_seq >= 1183))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query87.out
b/regression-test/data/shape_check/tpcds_sf100/shape/query87.out
index e16cd1ad45b..0eff245a8ef 100644
--- a/regression-test/data/shape_check/tpcds_sf100/shape/query87.out
+++ b/regression-test/data/shape_check/tpcds_sf100/shape/query87.out
@@ -7,42 +7,48 @@ PhysicalResultSink
--------PhysicalProject
----------PhysicalExcept
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk]
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk]
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN shuffle]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk]
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk]
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
RF3
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN shuffle]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk]
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN shuffle]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk]
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1195) and
(date_dim.d_month_seq >= 1184))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query38.out
b/regression-test/data/shape_check/tpcds_sf1000/hint/query38.out
index dc794c95f97..a65cf3988bf 100644
--- a/regression-test/data/shape_check/tpcds_sf1000/hint/query38.out
+++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query38.out
@@ -9,42 +9,48 @@ PhysicalResultSink
------------PhysicalProject
--------------PhysicalIntersect
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN shuffle]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF1 c_customer_sk->[ws_bill_customer_sk]
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1200) and
(date_dim.d_month_seq >= 1189))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF1 c_customer_sk->[ws_bill_customer_sk]
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
RF1
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1200) and
(date_dim.d_month_seq >= 1189))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk]
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
RF3
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1200) and
(date_dim.d_month_seq >= 1189))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk]
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[catalog_sales] apply RFs:
RF2 RF3
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1200) and
(date_dim.d_month_seq >= 1189))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk]
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4
RF5
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1200) and
(date_dim.d_month_seq >= 1189))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk]
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4
RF5
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1200) and
(date_dim.d_month_seq >= 1189))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query87.out
b/regression-test/data/shape_check/tpcds_sf1000/hint/query87.out
index d21bcaff8be..bc85be8dc53 100644
--- a/regression-test/data/shape_check/tpcds_sf1000/hint/query87.out
+++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query87.out
@@ -7,42 +7,48 @@ PhysicalResultSink
--------PhysicalProject
----------PhysicalExcept
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk]
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1213) and
(date_dim.d_month_seq >= 1202))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk]
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1213) and
(date_dim.d_month_seq >= 1202))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk]
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1213) and
(date_dim.d_month_seq >= 1202))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk]
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
RF3
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1213) and
(date_dim.d_month_seq >= 1202))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN shuffle]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk]
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1213) and
(date_dim.d_month_seq >= 1202))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk]
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1213) and
(date_dim.d_month_seq >= 1202))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query38.out
b/regression-test/data/shape_check/tpcds_sf1000/shape/query38.out
index dc794c95f97..a65cf3988bf 100644
--- a/regression-test/data/shape_check/tpcds_sf1000/shape/query38.out
+++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query38.out
@@ -9,42 +9,48 @@ PhysicalResultSink
------------PhysicalProject
--------------PhysicalIntersect
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN shuffle]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF1 c_customer_sk->[ws_bill_customer_sk]
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1200) and
(date_dim.d_month_seq >= 1189))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF1 c_customer_sk->[ws_bill_customer_sk]
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
RF1
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1200) and
(date_dim.d_month_seq >= 1189))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk]
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
RF3
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1200) and
(date_dim.d_month_seq >= 1189))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk]
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[catalog_sales] apply RFs:
RF2 RF3
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1200) and
(date_dim.d_month_seq >= 1189))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk]
---------------------hashAgg[GLOBAL]
-----------------------PhysicalDistribute[DistributionSpecHash]
-------------------------hashAgg[LOCAL]
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4
RF5
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_month_seq <= 1200) and
(date_dim.d_month_seq >= 1189))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------PhysicalOlapScan[customer]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk]
+----------------------hashAgg[GLOBAL]
+------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------hashAgg[LOCAL]
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4
RF5
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_month_seq <= 1200) and
(date_dim.d_month_seq >= 1189))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query87.out
b/regression-test/data/shape_check/tpcds_sf1000/shape/query87.out
index d21bcaff8be..bc85be8dc53 100644
--- a/regression-test/data/shape_check/tpcds_sf1000/shape/query87.out
+++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query87.out
@@ -7,42 +7,48 @@ PhysicalResultSink
--------PhysicalProject
----------PhysicalExcept
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk]
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1213) and
(date_dim.d_month_seq >= 1202))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk]
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1213) and
(date_dim.d_month_seq >= 1202))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk]
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1213) and
(date_dim.d_month_seq >= 1202))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk]
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
RF3
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1213) and
(date_dim.d_month_seq >= 1202))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN shuffle]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk]
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute[DistributionSpecHash]
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk]
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5
---------------------------PhysicalProject
-----------------------------filter((date_dim.d_month_seq <= 1213) and
(date_dim.d_month_seq >= 1202))
-------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalOlapScan[customer]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk))
otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk]
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute[DistributionSpecHash]
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast]
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk))
otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_month_seq <= 1213) and
(date_dim.d_month_seq >= 1202))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------PhysicalProject
+--------------------PhysicalOlapScan[customer]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]