This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new ec8678a74b9 branch-4.0: [fix](nereids) setOperator column prunning bug
#58237 (#58318)
ec8678a74b9 is described below
commit ec8678a74b9d830e92c5fddfdddf30f23352ddc7
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Nov 25 09:53:02 2025 +0800
branch-4.0: [fix](nereids) setOperator column prunning bug #58237 (#58318)
Cherry-picked from #58237
Co-authored-by: minghong <[email protected]>
---
.../doris/nereids/rules/rewrite/ColumnPruning.java | 12 ++--
.../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(+), 438 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 90e94d578ba..d2baa213e8b 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
@@ -217,7 +217,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
@@ -256,12 +256,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
@@ -284,7 +284,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
@@ -325,8 +325,8 @@ public class ColumnPruning extends
DefaultPlanRewriter<PruneContext> implements
return pruneChildren(fillUpAggregate, new RoaringBitmap());
}
- private Plan skipPruneThisAndFirstLevelChildren(Plan plan) {
- return pruneChildren(plan, plan.getChildrenOutputExprIdBitSet());
+ private Plan skipPruneThis(Plan plan) {
+ return pruneChildren(plan, plan.getOutputExprIdBitSet());
}
// some rules want to match the aggregate which contains all the group by
keys and aggregate functions
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 5a103e684eb..d4857e3c0cd 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 RFV2: RF6[c_last_name->c_last_name]
RF7[c_last_name->c_last_name]
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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] RFV2: RF6
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF6
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF7
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF7
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 19f7e59f537..0af75be03b5 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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 ab623089a49..fa43188e97d 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 RFV2: RF6[c_last_name->c_last_name]
RF7[c_last_name->c_last_name]
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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] RFV2: RF6
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF6
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF7
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF7
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 10a3c4a3e35..b67550c0227 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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 5a103e684eb..d4857e3c0cd 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 RFV2: RF6[c_last_name->c_last_name]
RF7[c_last_name->c_last_name]
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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] RFV2: RF6
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF6
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF7
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF7
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 477b102ee79..00d730cfd4c 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 RFV2: RF6[c_last_name->c_last_name]
RF7[c_last_name->c_last_name]
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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] RFV2: RF6
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF6
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF7
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF7
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 ab623089a49..fa43188e97d 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 RFV2: RF6[c_last_name->c_last_name]
RF7[c_last_name->c_last_name]
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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] RFV2: RF6
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF6
----------------PhysicalDistribute[DistributionSpecHash]
-------------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF7
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF7
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 bd1f7347fd3..cfd1a87f7da 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 RFV2: RF6[c_last_name->c_last_name]
RF7[c_last_name->c_last_name]
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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] RFV2: RF6
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF6
------------PhysicalDistribute[DistributionSpecHash]
---------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF7
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN bucketShuffle]
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] RFV2: RF7
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 5b01f5ff8b4..1a49401e891 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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 b015e93babb..4f102613865 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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 5b01f5ff8b4..1a49401e891 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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 b015e93babb..4f102613865 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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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 bucketShuffle]
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]