You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by da...@apache.org on 2024/09/27 12:38:10 UTC

(doris) branch branch-3.0 updated (90f14f2a80e -> f7db12b082a)

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

dataroaring pushed a change to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


    from 90f14f2a80e [fix] (inverted index) disable index compaction (#41427) (#41430)
     new 0ce43258fed [fix](Nereids) where of copy into should be optional (#41418)
     new f7db12b082a [opt](nereids)adjust aggregation cost to make it compatible to the cost of join and shuffle  (#39175)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../antlr4/org/apache/doris/nereids/DorisLexer.g4  |   2 +-
 .../antlr4/org/apache/doris/nereids/DorisParser.g4 |   2 +-
 .../org/apache/doris/nereids/cost/CostModelV1.java |  15 ++-
 .../doris/nereids/stats/ExpressionEstimation.java  |   6 +-
 .../doris/nereids/stats/FilterEstimation.java      |  22 ----
 .../doris/nereids/stats/StatsCalculator.java       |  10 +-
 .../trees/plans/physical/PhysicalFileScan.java     |   5 +-
 .../plans/physical/PhysicalHashAggregate.java      |   4 +-
 .../org/apache/doris/statistics/Statistics.java    |  28 ++++-
 .../data/nereids_hint_tpcds_p0/shape/query23.out   |  35 ++++---
 .../data/nereids_hint_tpcds_p0/shape/query64.out   |  50 ++++-----
 .../data/nereids_hint_tpcds_p0/shape/query9.out    |  47 ++++-----
 .../data/nereids_hint_tpch_p0/shape/q15.out        |   2 +-
 .../shape/query17.out                              |   2 +-
 .../nereids_tpcds_shape_sf1000_p0/shape/query2.out |   2 +-
 .../shape/query23.out                              |  35 ++++---
 .../shape/query51.out                              |   8 +-
 .../shape/query64.out                              |  46 ++++-----
 .../nereids_tpcds_shape_sf1000_p0/shape/query9.out |  47 ++++-----
 .../constraints/query23.out                        |  54 +++++-----
 .../noStatsRfPrune/query1.out                      |  22 ++--
 .../noStatsRfPrune/query10.out                     |  34 +++----
 .../noStatsRfPrune/query14.out                     |  70 +++++++------
 .../noStatsRfPrune/query16.out                     |  40 ++++----
 .../noStatsRfPrune/query23.out                     |  10 +-
 .../noStatsRfPrune/query30.out                     |  12 +--
 .../noStatsRfPrune/query34.out                     |   6 +-
 .../noStatsRfPrune/query35.out                     |  32 +++---
 .../noStatsRfPrune/query37.out                     |  14 +--
 .../noStatsRfPrune/query39.out                     |  20 ++--
 .../noStatsRfPrune/query5.out                      |  14 +--
 .../noStatsRfPrune/query64.out                     |  86 ++++++++--------
 .../noStatsRfPrune/query65.out                     |  36 +++----
 .../noStatsRfPrune/query69.out                     |  12 +--
 .../noStatsRfPrune/query73.out                     |   6 +-
 .../noStatsRfPrune/query74.out                     |  16 +--
 .../noStatsRfPrune/query75.out                     | 113 +++++++++++----------
 .../noStatsRfPrune/query81.out                     |  24 ++---
 .../noStatsRfPrune/query82.out                     |  14 +--
 .../noStatsRfPrune/query84.out                     |  12 +--
 .../noStatsRfPrune/query85.out                     |   2 +-
 .../noStatsRfPrune/query91.out                     |  12 +--
 .../noStatsRfPrune/query94.out                     |  40 ++++----
 .../noStatsRfPrune/query95.out                     |  42 ++++----
 .../no_stats_shape/query1.out                      |  20 ++--
 .../no_stats_shape/query10.out                     |  32 +++---
 .../no_stats_shape/query14.out                     |  72 +++++++------
 .../no_stats_shape/query16.out                     |  40 ++++----
 .../no_stats_shape/query23.out                     |  10 +-
 .../no_stats_shape/query30.out                     |  10 +-
 .../no_stats_shape/query34.out                     |   8 +-
 .../no_stats_shape/query35.out                     |  32 +++---
 .../no_stats_shape/query37.out                     |  14 +--
 .../no_stats_shape/query39.out                     |  20 ++--
 .../no_stats_shape/query5.out                      |  10 +-
 .../no_stats_shape/query64.out                     |  90 ++++++++--------
 .../no_stats_shape/query65.out                     |  34 +++----
 .../no_stats_shape/query69.out                     |  10 +-
 .../no_stats_shape/query73.out                     |   8 +-
 .../no_stats_shape/query74.out                     |  16 +--
 .../no_stats_shape/query75.out                     | 113 +++++++++++----------
 .../no_stats_shape/query81.out                     |  24 ++---
 .../no_stats_shape/query82.out                     |  14 +--
 .../no_stats_shape/query84.out                     |  10 +-
 .../no_stats_shape/query85.out                     |   2 +-
 .../no_stats_shape/query91.out                     |  10 +-
 .../no_stats_shape/query94.out                     |  40 ++++----
 .../no_stats_shape/query95.out                     |  42 ++++----
 .../rf_prune/query2.out                            |   2 +-
 .../rf_prune/query23.out                           |  35 ++++---
 .../rf_prune/query34.out                           |   2 +-
 .../rf_prune/query64.out                           |  28 ++---
 .../rf_prune/query74.out                           |   8 +-
 .../rf_prune/query9.out                            |  47 ++++-----
 .../nereids_tpcds_shape_sf100_p0/shape/query2.out  |   2 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query23.out |  35 ++++---
 .../nereids_tpcds_shape_sf100_p0/shape/query34.out |   2 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query64.out |  28 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query74.out |   8 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query9.out  |  47 ++++-----
 .../data/new_shapes_p0/hint_tpch/shape/q15.out     |   2 +-
 .../tpcds_sf100/constraints/query23.out            |  54 +++++-----
 .../tpcds_sf100/noStatsRfPrune/query1.out          |  22 ++--
 .../tpcds_sf100/noStatsRfPrune/query10.out         |  34 +++----
 .../tpcds_sf100/noStatsRfPrune/query14.out         |  81 ++++++++-------
 .../tpcds_sf100/noStatsRfPrune/query16.out         |  40 ++++----
 .../tpcds_sf100/noStatsRfPrune/query23.out         |  10 +-
 .../tpcds_sf100/noStatsRfPrune/query30.out         |  12 +--
 .../tpcds_sf100/noStatsRfPrune/query34.out         |   6 +-
 .../tpcds_sf100/noStatsRfPrune/query35.out         |  32 +++---
 .../tpcds_sf100/noStatsRfPrune/query39.out         |  20 ++--
 .../tpcds_sf100/noStatsRfPrune/query5.out          |  14 +--
 .../tpcds_sf100/noStatsRfPrune/query64.out         |  30 +++---
 .../tpcds_sf100/noStatsRfPrune/query65.out         |  36 +++----
 .../tpcds_sf100/noStatsRfPrune/query69.out         |  12 +--
 .../tpcds_sf100/noStatsRfPrune/query73.out         |   6 +-
 .../tpcds_sf100/noStatsRfPrune/query74.out         |  16 +--
 .../tpcds_sf100/noStatsRfPrune/query75.out         | 113 +++++++++++----------
 .../tpcds_sf100/noStatsRfPrune/query81.out         |  24 ++---
 .../tpcds_sf100/noStatsRfPrune/query84.out         |  12 +--
 .../tpcds_sf100/noStatsRfPrune/query85.out         |   2 +-
 .../tpcds_sf100/noStatsRfPrune/query91.out         |  12 +--
 .../tpcds_sf100/noStatsRfPrune/query94.out         |  40 ++++----
 .../tpcds_sf100/noStatsRfPrune/query95.out         |  42 ++++----
 .../tpcds_sf100/no_stats_shape/query1.out          |  20 ++--
 .../tpcds_sf100/no_stats_shape/query10.out         |  32 +++---
 .../tpcds_sf100/no_stats_shape/query14.out         |  81 ++++++++-------
 .../tpcds_sf100/no_stats_shape/query16.out         |  40 ++++----
 .../tpcds_sf100/no_stats_shape/query23.out         |  10 +-
 .../tpcds_sf100/no_stats_shape/query30.out         |  10 +-
 .../tpcds_sf100/no_stats_shape/query34.out         |   8 +-
 .../tpcds_sf100/no_stats_shape/query35.out         |  32 +++---
 .../tpcds_sf100/no_stats_shape/query39.out         |  20 ++--
 .../tpcds_sf100/no_stats_shape/query5.out          |  10 +-
 .../tpcds_sf100/no_stats_shape/query64.out         |  28 ++---
 .../tpcds_sf100/no_stats_shape/query65.out         |  34 +++----
 .../tpcds_sf100/no_stats_shape/query69.out         |  10 +-
 .../tpcds_sf100/no_stats_shape/query73.out         |   8 +-
 .../tpcds_sf100/no_stats_shape/query74.out         |  16 +--
 .../tpcds_sf100/no_stats_shape/query75.out         | 113 +++++++++++----------
 .../tpcds_sf100/no_stats_shape/query81.out         |  24 ++---
 .../tpcds_sf100/no_stats_shape/query84.out         |  10 +-
 .../tpcds_sf100/no_stats_shape/query85.out         |   2 +-
 .../tpcds_sf100/no_stats_shape/query91.out         |  10 +-
 .../tpcds_sf100/no_stats_shape/query94.out         |  40 ++++----
 .../tpcds_sf100/no_stats_shape/query95.out         |  42 ++++----
 .../new_shapes_p0/tpcds_sf100/rf_prune/query2.out  |   2 +-
 .../new_shapes_p0/tpcds_sf100/rf_prune/query23.out |  35 ++++---
 .../new_shapes_p0/tpcds_sf100/rf_prune/query34.out |   2 +-
 .../new_shapes_p0/tpcds_sf100/rf_prune/query64.out |  28 ++---
 .../new_shapes_p0/tpcds_sf100/rf_prune/query74.out |   8 +-
 .../new_shapes_p0/tpcds_sf100/rf_prune/query9.out  |  47 ++++-----
 .../new_shapes_p0/tpcds_sf100/shape/query2.out     |   2 +-
 .../new_shapes_p0/tpcds_sf100/shape/query23.out    |  35 ++++---
 .../new_shapes_p0/tpcds_sf100/shape/query34.out    |   2 +-
 .../new_shapes_p0/tpcds_sf100/shape/query64.out    |  28 ++---
 .../new_shapes_p0/tpcds_sf100/shape/query74.out    |   8 +-
 .../new_shapes_p0/tpcds_sf100/shape/query9.out     |  47 ++++-----
 .../new_shapes_p0/tpcds_sf1000/shape/query17.out   |   2 +-
 .../new_shapes_p0/tpcds_sf1000/shape/query2.out    |   2 +-
 .../new_shapes_p0/tpcds_sf1000/shape/query23.out   |  35 ++++---
 .../new_shapes_p0/tpcds_sf1000/shape/query29.out   |  10 +-
 .../new_shapes_p0/tpcds_sf1000/shape/query64.out   |  46 ++++-----
 .../new_shapes_p0/tpcds_sf1000/shape/query9.out    |  47 ++++-----
 .../tpch_sf1000/nostats_rf_prune/q19.out           |   2 +-
 .../tpch_sf1000/shape_no_stats/q19.out             |   2 +-
 146 files changed, 1875 insertions(+), 1823 deletions(-)


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


(doris) 01/02: [fix](Nereids) where of copy into should be optional (#41418)

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 0ce43258fedc05c77a4594598773d20b96816253
Author: morrySnow <10...@users.noreply.github.com>
AuthorDate: Fri Sep 27 20:12:44 2024 +0800

    [fix](Nereids) where of copy into should be optional (#41418)
---
 fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisLexer.g4  | 2 +-
 fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisLexer.g4 b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisLexer.g4
index 03997bfee23..34c3ee66e75 100644
--- a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisLexer.g4
+++ b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisLexer.g4
@@ -162,7 +162,7 @@ CONSISTENT: 'CONSISTENT';
 CONSTRAINT: 'CONSTRAINT';
 CONSTRAINTS: 'CONSTRAINTS';
 CONVERT: 'CONVERT';
-CONVERT_LSC: 'CONVERT_LSC';
+CONVERT_LSC: 'CONVERT_LIGHT_SCHEMA_CHANGE_PROCESS';
 COPY: 'COPY';
 COUNT: 'COUNT';
 CREATE: 'CREATE';
diff --git a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4 b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4
index c8b2415df62..bccac520eb2 100644
--- a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4
+++ b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4
@@ -850,7 +850,7 @@ unsupportedDmlStatement
     : TRUNCATE TABLE multipartIdentifier specifiedPartition?                        #truncateTable
     | COPY INTO name=multipartIdentifier columns=identifierList? FROM
         (stageAndPattern | (LEFT_PAREN SELECT selectColumnClause
-            FROM stageAndPattern whereClause RIGHT_PAREN))
+            FROM stageAndPattern whereClause? RIGHT_PAREN))
         properties=propertyClause?                                                  #copyInto
     ;
 


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


(doris) 02/02: [opt](nereids)adjust aggregation cost to make it compatible to the cost of join and shuffle (#39175)

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git

commit f7db12b082a85e5bb20e18700a9186484919b014
Author: minghong <en...@gmail.com>
AuthorDate: Tue Aug 27 17:08:36 2024 +0800

    [opt](nereids)adjust aggregation cost to make it compatible to the cost of join and shuffle  (#39175)
    
    ## Proposed changes
    1. set column stats for count() agg function to Unknown
    2. stats derive for having clause is adjusted. before, we use experenced
    factor 0.01. Now it is estimated as normal filter
    3. change DEFAULT_AGGREGATE_RATIO from 0.5 to 1/3
    4. support edge case for unionColumnStatistics when any side is Unknown,
    the result is unknown
    5. skip Unkown  column stats in Statistics.enforceValid()
    6. dataSizeFactor() if all col stats of visible slots are unkown, set
    the lower/upperbound (0.03, 0.07)
    
    
    release cluster 10BE
    tpcds 10t
    before 3057sec, after 3040sec
    
    before: 3057 sec
    query1  5521    3314    4581    3314
    query2  20157   19047   19545   19047
    query3  15812   22905   22734   22734
    query4  116065  109370  116286  109370
    query5  39214   38590   47209   38590
    query6  9620    8232    8759    8232
    query7  33301   37778   35619   35619
    query8  9441    7939    10316   7939
    query9  164140  169847  173415  169847
    query10 21638   27476   27143   27143
    query11 60017   60918   62195   60918
    query12 5826    4563    4664    4563
    query13 40385   46801   49380   46801
    query14 152567  150127  155888  150127
    query15 6220    6251    4885    4885
    query16 24634   36006   19540   19540
    query17 43044   37558   31283   31283
    query18 25276   21139   22313   21139
    query19 25106   26419   29907   26419
    query20 10267   6008    10332   6008
    query21 9307    3411    2934    2934
    query22 3711    3319    3318    3318
    query23 262386  263307  264084  263307
    query24 37475   38317   35238   35238
    query25 32888   37608   34260   34260
    query26 15592   18622   17922   17922
    query27 31244   42411   41540   41540
    query28 141031  141499  134866  134866
    query29 49133   50908   49850   49850
    query30 7119    4715    3346    3346
    query31 12503   12732   11773   11773
    query32 7847    9097    9520    9097
    query33 32739   52729   32124   32124
    query34 13677   19271   17114   17114
    query35 25557   25084   28002   25084
    query36 20629   20581   21652   20581
    query37 11944   11680   15140   11680
    query38 24456   24778   24408   24408
    query39 6370    6226    5707    5707
    query40 7915    15226   8983    8983
    query41 895     486     463     463
    query42 22312   18923   27068   18923
    query43 8106    8406    7463    7463
    query44 59617   59106   60050   59106
    query45 7202    5928    6285    5928
    query46 20796   19904   21178   19904
    query47 20069   19538   19480   19480
    query48 27015   25586   25766   25586
    query49 47576   45531   50639   45531
    query50 19361   18131   18091   18091
    query51 22185   19395   19730   19395
    query52 16939   20730   20165   20165
    query53 25739   25084   25184   25084
    query54 27170   28023   26363   26363
    query55 14617   13586   13886   13586
    query56 32906   34828   30251   30251
    query57 11332   10860   10901   10860
    query58 26999   29529   35555   29529
    query59 24765   25181   24145   24145
    query60 33905   33790   34612   33790
    query61 61628   57307   55993   55993
    query62 5666    5392    5980    5392
    query63 28810   29030   30400   29030
    query64 42222   40727   65072   40727
    query65 33951   33274   32996   32996
    query66 15410   16598   19878   16598
    query67 116222  116734  112534  112534
    query68 29394   34063   31045   31045
    query69 26376   24911   28309   24911
    query70 15846   18986   16639   16639
    query71 26249   27143   29661   27143
    query72 170     163     159     159
    query73 13519   13816   13342   13342
    query74 35905   34898   36680   34898
    query75 41561   41124   41236   41124
    query76 28142   31558   28384   28384
    query77 33883   28975   31949   28975
    query78 74649   113090  114924  113090
    query79 23562   22963   22637   22637
    query80 57645   55937   54879   54879
    query81 9027    4546    4001    4001
    query82 30456   28888   18990   18990
    query83 8726    7859    5473    5473
    query84 9886    2569    10050   2569
    query85 17076   11273   9113    9113
    query86 4842    4779    4518    4518
    query87 26629   26398   26718   26398
    query88 45880   45885   45108   45108
    query89 24468   28838   29466   28838
    query90 3791    14470   11761   11761
    query91 12266   9182    6818    6818
    query92 7058    6627    8129    6627
    query93 28489   26211   27101   26211
    query94 11315   18897   9364    9364
    query95 30993   25833   23754   23754
    query96 7983    6279    6184    6184
    query97 36275   38188   37766   37766
    query98 14681   23647   22776   22776
    query99 10844   10725   10826   10725
    Total cold run time: 3102775 ms
    Total hot run time: 3057783 ms
    
    
    after 3059 sec
    query1  4559    3275    3566    3275
    query2  18848   18784   19511   18784
    query3  22311   22156   23540   22156
    query4  114514  109474  110319  109474
    query5  44811   58148   35134   35134
    query6  11631   10018   9083    9083
    query7  31580   31799   36181   31799
    query8  9192    8669    8274    8274
    query9  157570  154174  61765   61765
    query10 17733   30374   25210   25210
    query11 60245   61130   58896   58896
    query12 7732    4607    5199    4607
    query13 37433   54115   54186   54115
    query14 135199  135486  134245  134245
    query15 6715    4768    5422    4768
    query16 16903   28680   32216   28680
    query17 41850   32683   30896   30896
    query18 23098   21658   22242   21658
    query19 31639   26636   30911   26636
    query20 5376    10867   6103    6103
    query21 8495    2785    4359    2785
    query22 3760    3737    3551    3551
    query23 264060  258855  264446  258855
    query24 39533   39318   35202   35202
    query25 32060   31363   32018   31363
    query26 15765   14336   16438   14336
    query27 37050   44031   47109   44031
    query28 144738  146493  146770  146493
    query29 48873   57416   48768   48768
    query30 7416    4006    3548    3548
    query31 13062   11585   12092   11585
    query32 6564    6343    5894    5894
    query33 35354   37197   33609   33609
    query34 13837   12701   12853   12701
    query35 23706   23610   25498   23610
    query36 20319   19597   20699   19597
    query37 9153    10540   9430    9430
    query38 26903   24213   25445   24213
    query39 7403    5802    5690    5690
    query40 7192    6713    9986    6713
    query41 1141    802     448     448
    query42 19819   21061   20148   20148
    query43 8290    7265    8088    7265
    query44 57570   54795   57409   54795
    query45 5561    6083    4374    4374
    query46 20027   19636   20500   19636
    query47 19948   19521   19383   19383
    query48 25115   26412   30895   26412
    query49 48725   56716   45787   45787
    query50 19554   17505   18479   17505
    query51 19522   19973   20381   19973
    query52 17017   20722   23037   20722
    query53 28236   26989   27023   26989
    query54 24224   26760   29639   26760
    query55 17575   15594   14232   14232
    query56 34584   73754   33905   33905
    query57 11578   10983   11510   10983
    query58 34545   34361   32886   32886
    query59 24736   24199   24820   24199
    query60 33267   35164   46649   35164
    query61 69805   59957   54374   54374
    query62 5705    5234    5893    5234
    query63 25949   25264   25390   25264
    query64 42141   42313   43791   42313
    query65 33707   33175   33913   33175
    query66 15765   16585   17916   16585
    query67 117101  113159  113392  113159
    query68 29726   28004   29223   28004
    query69 29079   28005   26951   26951
    query70 15543   15818   16449   15818
    query71 27782   28750   29451   28750
    query72 173     160     158     158
    query73 11479   12259   12920   12259
    query74 35979   35810   33981   33981
    query75 54487   54417   54914   54417
    query76 28332   30736   34253   30736
    query77 34140   32821   34632   32821
    query78 78448   115208  114110  114110
    query79 21112   20870   22570   20870
    query80 54250   52891   53305   52891
    query81 10335   4219    3987    3987
    query82 25262   18677   18569   18569
    query83 7053    8318    16596   8318
    query84 8190    3363    3043    3043
    query85 17596   14204   18524   14204
    query86 5260    4569    6338    4569
    query87 26375   26709   26144   26144
    query88 44883   44517   45421   44517
    query89 21123   27995   24258   24258
    query90 13886   10167   11079   10167
    query91 8981    3777    3861    3777
    query92 4338    4066    5427    4066
    query93 28991   26479   26210   26210
    query94 8936    19945   18665   18665
    query95 27332   27977   20673   20673
    query96 7330    7394    5927    5927
    query97 36101   37612   37980   37612
    query98 14861   22531   21610   21610
    query99 11746   11037   11072   11037
    Total cold run time: 3094498 ms
    Total hot run time: 2948321 ms
    query9 偶发报错 s3 读超时,所以q9以成功执行的时间计算,总时间是3040sec
    
    Issue Number: close #xxx
    
    <!--Describe your changes.-->
---
 .../org/apache/doris/nereids/cost/CostModelV1.java |  15 ++-
 .../doris/nereids/stats/ExpressionEstimation.java  |   6 +-
 .../doris/nereids/stats/FilterEstimation.java      |  22 ----
 .../doris/nereids/stats/StatsCalculator.java       |  10 +-
 .../trees/plans/physical/PhysicalFileScan.java     |   5 +-
 .../plans/physical/PhysicalHashAggregate.java      |   4 +-
 .../org/apache/doris/statistics/Statistics.java    |  28 ++++-
 .../data/nereids_hint_tpcds_p0/shape/query23.out   |  35 ++++---
 .../data/nereids_hint_tpcds_p0/shape/query64.out   |  50 ++++-----
 .../data/nereids_hint_tpcds_p0/shape/query9.out    |  47 ++++-----
 .../data/nereids_hint_tpch_p0/shape/q15.out        |   2 +-
 .../shape/query17.out                              |   2 +-
 .../nereids_tpcds_shape_sf1000_p0/shape/query2.out |   2 +-
 .../shape/query23.out                              |  35 ++++---
 .../shape/query51.out                              |   8 +-
 .../shape/query64.out                              |  46 ++++-----
 .../nereids_tpcds_shape_sf1000_p0/shape/query9.out |  47 ++++-----
 .../constraints/query23.out                        |  54 +++++-----
 .../noStatsRfPrune/query1.out                      |  22 ++--
 .../noStatsRfPrune/query10.out                     |  34 +++----
 .../noStatsRfPrune/query14.out                     |  70 +++++++------
 .../noStatsRfPrune/query16.out                     |  40 ++++----
 .../noStatsRfPrune/query23.out                     |  10 +-
 .../noStatsRfPrune/query30.out                     |  12 +--
 .../noStatsRfPrune/query34.out                     |   6 +-
 .../noStatsRfPrune/query35.out                     |  32 +++---
 .../noStatsRfPrune/query37.out                     |  14 +--
 .../noStatsRfPrune/query39.out                     |  20 ++--
 .../noStatsRfPrune/query5.out                      |  14 +--
 .../noStatsRfPrune/query64.out                     |  86 ++++++++--------
 .../noStatsRfPrune/query65.out                     |  36 +++----
 .../noStatsRfPrune/query69.out                     |  12 +--
 .../noStatsRfPrune/query73.out                     |   6 +-
 .../noStatsRfPrune/query74.out                     |  16 +--
 .../noStatsRfPrune/query75.out                     | 113 +++++++++++----------
 .../noStatsRfPrune/query81.out                     |  24 ++---
 .../noStatsRfPrune/query82.out                     |  14 +--
 .../noStatsRfPrune/query84.out                     |  12 +--
 .../noStatsRfPrune/query85.out                     |   2 +-
 .../noStatsRfPrune/query91.out                     |  12 +--
 .../noStatsRfPrune/query94.out                     |  40 ++++----
 .../noStatsRfPrune/query95.out                     |  42 ++++----
 .../no_stats_shape/query1.out                      |  20 ++--
 .../no_stats_shape/query10.out                     |  32 +++---
 .../no_stats_shape/query14.out                     |  72 +++++++------
 .../no_stats_shape/query16.out                     |  40 ++++----
 .../no_stats_shape/query23.out                     |  10 +-
 .../no_stats_shape/query30.out                     |  10 +-
 .../no_stats_shape/query34.out                     |   8 +-
 .../no_stats_shape/query35.out                     |  32 +++---
 .../no_stats_shape/query37.out                     |  14 +--
 .../no_stats_shape/query39.out                     |  20 ++--
 .../no_stats_shape/query5.out                      |  10 +-
 .../no_stats_shape/query64.out                     |  90 ++++++++--------
 .../no_stats_shape/query65.out                     |  34 +++----
 .../no_stats_shape/query69.out                     |  10 +-
 .../no_stats_shape/query73.out                     |   8 +-
 .../no_stats_shape/query74.out                     |  16 +--
 .../no_stats_shape/query75.out                     | 113 +++++++++++----------
 .../no_stats_shape/query81.out                     |  24 ++---
 .../no_stats_shape/query82.out                     |  14 +--
 .../no_stats_shape/query84.out                     |  10 +-
 .../no_stats_shape/query85.out                     |   2 +-
 .../no_stats_shape/query91.out                     |  10 +-
 .../no_stats_shape/query94.out                     |  40 ++++----
 .../no_stats_shape/query95.out                     |  42 ++++----
 .../rf_prune/query2.out                            |   2 +-
 .../rf_prune/query23.out                           |  35 ++++---
 .../rf_prune/query34.out                           |   2 +-
 .../rf_prune/query64.out                           |  28 ++---
 .../rf_prune/query74.out                           |   8 +-
 .../rf_prune/query9.out                            |  47 ++++-----
 .../nereids_tpcds_shape_sf100_p0/shape/query2.out  |   2 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query23.out |  35 ++++---
 .../nereids_tpcds_shape_sf100_p0/shape/query34.out |   2 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query64.out |  28 ++---
 .../nereids_tpcds_shape_sf100_p0/shape/query74.out |   8 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query9.out  |  47 ++++-----
 .../data/new_shapes_p0/hint_tpch/shape/q15.out     |   2 +-
 .../tpcds_sf100/constraints/query23.out            |  54 +++++-----
 .../tpcds_sf100/noStatsRfPrune/query1.out          |  22 ++--
 .../tpcds_sf100/noStatsRfPrune/query10.out         |  34 +++----
 .../tpcds_sf100/noStatsRfPrune/query14.out         |  81 ++++++++-------
 .../tpcds_sf100/noStatsRfPrune/query16.out         |  40 ++++----
 .../tpcds_sf100/noStatsRfPrune/query23.out         |  10 +-
 .../tpcds_sf100/noStatsRfPrune/query30.out         |  12 +--
 .../tpcds_sf100/noStatsRfPrune/query34.out         |   6 +-
 .../tpcds_sf100/noStatsRfPrune/query35.out         |  32 +++---
 .../tpcds_sf100/noStatsRfPrune/query39.out         |  20 ++--
 .../tpcds_sf100/noStatsRfPrune/query5.out          |  14 +--
 .../tpcds_sf100/noStatsRfPrune/query64.out         |  30 +++---
 .../tpcds_sf100/noStatsRfPrune/query65.out         |  36 +++----
 .../tpcds_sf100/noStatsRfPrune/query69.out         |  12 +--
 .../tpcds_sf100/noStatsRfPrune/query73.out         |   6 +-
 .../tpcds_sf100/noStatsRfPrune/query74.out         |  16 +--
 .../tpcds_sf100/noStatsRfPrune/query75.out         | 113 +++++++++++----------
 .../tpcds_sf100/noStatsRfPrune/query81.out         |  24 ++---
 .../tpcds_sf100/noStatsRfPrune/query84.out         |  12 +--
 .../tpcds_sf100/noStatsRfPrune/query85.out         |   2 +-
 .../tpcds_sf100/noStatsRfPrune/query91.out         |  12 +--
 .../tpcds_sf100/noStatsRfPrune/query94.out         |  40 ++++----
 .../tpcds_sf100/noStatsRfPrune/query95.out         |  42 ++++----
 .../tpcds_sf100/no_stats_shape/query1.out          |  20 ++--
 .../tpcds_sf100/no_stats_shape/query10.out         |  32 +++---
 .../tpcds_sf100/no_stats_shape/query14.out         |  81 ++++++++-------
 .../tpcds_sf100/no_stats_shape/query16.out         |  40 ++++----
 .../tpcds_sf100/no_stats_shape/query23.out         |  10 +-
 .../tpcds_sf100/no_stats_shape/query30.out         |  10 +-
 .../tpcds_sf100/no_stats_shape/query34.out         |   8 +-
 .../tpcds_sf100/no_stats_shape/query35.out         |  32 +++---
 .../tpcds_sf100/no_stats_shape/query39.out         |  20 ++--
 .../tpcds_sf100/no_stats_shape/query5.out          |  10 +-
 .../tpcds_sf100/no_stats_shape/query64.out         |  28 ++---
 .../tpcds_sf100/no_stats_shape/query65.out         |  34 +++----
 .../tpcds_sf100/no_stats_shape/query69.out         |  10 +-
 .../tpcds_sf100/no_stats_shape/query73.out         |   8 +-
 .../tpcds_sf100/no_stats_shape/query74.out         |  16 +--
 .../tpcds_sf100/no_stats_shape/query75.out         | 113 +++++++++++----------
 .../tpcds_sf100/no_stats_shape/query81.out         |  24 ++---
 .../tpcds_sf100/no_stats_shape/query84.out         |  10 +-
 .../tpcds_sf100/no_stats_shape/query85.out         |   2 +-
 .../tpcds_sf100/no_stats_shape/query91.out         |  10 +-
 .../tpcds_sf100/no_stats_shape/query94.out         |  40 ++++----
 .../tpcds_sf100/no_stats_shape/query95.out         |  42 ++++----
 .../new_shapes_p0/tpcds_sf100/rf_prune/query2.out  |   2 +-
 .../new_shapes_p0/tpcds_sf100/rf_prune/query23.out |  35 ++++---
 .../new_shapes_p0/tpcds_sf100/rf_prune/query34.out |   2 +-
 .../new_shapes_p0/tpcds_sf100/rf_prune/query64.out |  28 ++---
 .../new_shapes_p0/tpcds_sf100/rf_prune/query74.out |   8 +-
 .../new_shapes_p0/tpcds_sf100/rf_prune/query9.out  |  47 ++++-----
 .../new_shapes_p0/tpcds_sf100/shape/query2.out     |   2 +-
 .../new_shapes_p0/tpcds_sf100/shape/query23.out    |  35 ++++---
 .../new_shapes_p0/tpcds_sf100/shape/query34.out    |   2 +-
 .../new_shapes_p0/tpcds_sf100/shape/query64.out    |  28 ++---
 .../new_shapes_p0/tpcds_sf100/shape/query74.out    |   8 +-
 .../new_shapes_p0/tpcds_sf100/shape/query9.out     |  47 ++++-----
 .../new_shapes_p0/tpcds_sf1000/shape/query17.out   |   2 +-
 .../new_shapes_p0/tpcds_sf1000/shape/query2.out    |   2 +-
 .../new_shapes_p0/tpcds_sf1000/shape/query23.out   |  35 ++++---
 .../new_shapes_p0/tpcds_sf1000/shape/query29.out   |  10 +-
 .../new_shapes_p0/tpcds_sf1000/shape/query64.out   |  46 ++++-----
 .../new_shapes_p0/tpcds_sf1000/shape/query9.out    |  47 ++++-----
 .../tpch_sf1000/nostats_rf_prune/q19.out           |   2 +-
 .../tpch_sf1000/shape_no_stats/q19.out             |   2 +-
 144 files changed, 1873 insertions(+), 1821 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostModelV1.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostModelV1.java
index b5d7f78fdeb..943a404783c 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostModelV1.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostModelV1.java
@@ -283,13 +283,13 @@ class CostModelV1 extends PlanVisitor<Cost, PlanContext> {
         DistributionSpec spec = distribute.getDistributionSpec();
         // cost model is trained by clusters with more than 3 BE.
         int beNumForDist = Math.max(3, beNumber);
+        double dataSizeFactor = childStatistics.dataSizeFactor(distribute.child().getOutput());
         // shuffle
         if (spec instanceof DistributionSpecHash) {
             return CostV1.of(context.getSessionVariable(),
                     intputRowCount / beNumForDist,
                     0,
-                    intputRowCount * childStatistics.dataSizeFactor(
-                            distribute.child().getOutput()) / beNumForDist
+                    intputRowCount * dataSizeFactor / beNumForDist
                     );
         }
 
@@ -301,8 +301,7 @@ class CostModelV1 extends PlanVisitor<Cost, PlanContext> {
             return CostV1.of(context.getSessionVariable(),
                     0,
                     0,
-                    intputRowCount * childStatistics.dataSizeFactor(
-                            distribute.child().getOutput()));
+                    intputRowCount * dataSizeFactor);
 
         }
 
@@ -311,8 +310,7 @@ class CostModelV1 extends PlanVisitor<Cost, PlanContext> {
             return CostV1.of(context.getSessionVariable(),
                     0,
                     0,
-                    intputRowCount * childStatistics.dataSizeFactor(
-                            distribute.child().getOutput()) / beNumForDist);
+                    intputRowCount * dataSizeFactor / beNumForDist);
         }
 
         // any
@@ -320,7 +318,7 @@ class CostModelV1 extends PlanVisitor<Cost, PlanContext> {
         return CostV1.of(context.getSessionVariable(),
                 0,
                 0,
-                intputRowCount * childStatistics.dataSizeFactor(distribute.child().getOutput())
+                intputRowCount * dataSizeFactor
                         * RANDOM_SHUFFLE_TO_HASH_SHUFFLE_FACTOR / beNumForDist);
     }
 
@@ -346,7 +344,8 @@ class CostModelV1 extends PlanVisitor<Cost, PlanContext> {
                     inputStatistics.getRowCount() / beNumber, 0);
         } else {
             // global
-            return CostV1.of(context.getSessionVariable(), exprCost / 100 + inputStatistics.getRowCount(),
+            return CostV1.of(context.getSessionVariable(), exprCost / 100
+                            + inputStatistics.getRowCount(),
                     inputStatistics.getRowCount(), 0);
         }
     }
diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/ExpressionEstimation.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/ExpressionEstimation.java
index 14d5ae8b63d..1b98b09fb93 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/ExpressionEstimation.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/ExpressionEstimation.java
@@ -373,9 +373,9 @@ public class ExpressionEstimation extends ExpressionVisitor<ColumnStatistic, Sta
     @Override
     public ColumnStatistic visitCount(Count count, Statistics context) {
         double width = count.getDataType().width();
-        return new ColumnStatisticBuilder().setCount(1D).setAvgSizeByte(width).setNumNulls(0)
-                .setDataSize(width).setMinValue(0).setMaxValue(context.getRowCount())
-                .setMaxExpr(null).setMinExpr(null).build();
+        // for scalar agg, ndv and row count will be normalized by 1 in StatsCalculator.computeAggregate()
+        return new ColumnStatisticBuilder(ColumnStatistic.UNKNOWN).setCount(context.getRowCount())
+                .setAvgSizeByte(width).build();
     }
 
     // TODO: return a proper estimated stat after supports histogram
diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java
index d44e6198170..a405f7ac4db 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java
@@ -21,7 +21,6 @@ import org.apache.doris.analysis.DateLiteral;
 import org.apache.doris.analysis.LiteralExpr;
 import org.apache.doris.analysis.StringLiteral;
 import org.apache.doris.nereids.stats.FilterEstimation.EstimationContext;
-import org.apache.doris.nereids.trees.TreeNode;
 import org.apache.doris.nereids.trees.expressions.And;
 import org.apache.doris.nereids.trees.expressions.ComparisonPredicate;
 import org.apache.doris.nereids.trees.expressions.CompoundPredicate;
@@ -61,7 +60,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import java.util.Set;
-import java.util.function.Predicate;
 
 /**
  * Calculate selectivity of expression that produces boolean value.
@@ -71,8 +69,6 @@ public class FilterEstimation extends ExpressionVisitor<Statistics, EstimationCo
     public static final double DEFAULT_INEQUALITY_COEFFICIENT = 0.5;
     public static final double DEFAULT_IN_COEFFICIENT = 1.0 / 3.0;
 
-    public static final double DEFAULT_HAVING_COEFFICIENT = 0.01;
-
     public static final double DEFAULT_LIKE_COMPARISON_SELECTIVITY = 0.2;
     public static final double DEFAULT_ISNULL_SELECTIVITY = 0.005;
     private Set<Slot> aggSlots;
@@ -164,24 +160,6 @@ public class FilterEstimation extends ExpressionVisitor<Statistics, EstimationCo
         }
         ColumnStatistic statsForLeft = ExpressionEstimation.estimate(left, context.statistics);
         ColumnStatistic statsForRight = ExpressionEstimation.estimate(right, context.statistics);
-        if (aggSlots != null) {
-            Predicate<TreeNode<Expression>> containsAggSlot = e -> {
-                if (e instanceof SlotReference) {
-                    SlotReference slot = (SlotReference) e;
-                    return aggSlots.contains(slot);
-                }
-                return false;
-            };
-            boolean leftAgg = left.anyMatch(containsAggSlot);
-            boolean rightAgg = right.anyMatch(containsAggSlot);
-            // It means this predicate appears in HAVING clause.
-            if (leftAgg || rightAgg) {
-                double rowCount = context.statistics.getRowCount();
-                double newRowCount = Math.max(rowCount * DEFAULT_HAVING_COEFFICIENT,
-                        Math.max(statsForLeft.ndv, statsForRight.ndv));
-                return context.statistics.withRowCount(newRowCount);
-            }
-        }
         if (!left.isConstant() && !right.isConstant()) {
             return calculateWhenBothColumn(cp, context, statsForLeft, statsForRight);
         } else {
diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/StatsCalculator.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/StatsCalculator.java
index bfff21ab3a5..d7b5f284ecb 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/StatsCalculator.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/StatsCalculator.java
@@ -164,7 +164,7 @@ import java.util.stream.Collectors;
  * Used to calculate the stats for each plan
  */
 public class StatsCalculator extends DefaultPlanVisitor<Statistics, Void> {
-    public static double DEFAULT_AGGREGATE_RATIO = 0.5;
+    public static double DEFAULT_AGGREGATE_RATIO = 1 / 3.0;
     public static double AGGREGATE_COLUMN_CORRELATION_COEFFICIENT = 0.75;
     public static double DEFAULT_COLUMN_NDV_RATIO = 0.5;
 
@@ -1202,8 +1202,9 @@ public class StatsCalculator extends DefaultPlanVisitor<Statistics, Void> {
             builder.setDataSize(rowCount * outputExpression.getDataType().width());
             slotToColumnStats.put(outputExpression.toSlot(), columnStat);
         }
-        return new Statistics(rowCount, 1, slotToColumnStats);
-        // TODO: Update ColumnStats properly, add new mapping from output slot to ColumnStats
+        Statistics aggOutputStats = new Statistics(rowCount, 1, slotToColumnStats);
+        aggOutputStats.enforceValid();
+        return aggOutputStats;
     }
 
     private Statistics computeRepeat(Repeat<? extends Plan> repeat) {
@@ -1439,6 +1440,9 @@ public class StatsCalculator extends DefaultPlanVisitor<Statistics, Void> {
 
     private ColumnStatistic unionColumn(ColumnStatistic leftStats, double leftRowCount, ColumnStatistic rightStats,
             double rightRowCount, DataType dataType) {
+        if (leftStats.isUnKnown() || rightStats.isUnKnown()) {
+            return new ColumnStatisticBuilder(leftStats).setCount(leftRowCount + rightRowCount).build();
+        }
         ColumnStatisticBuilder columnStatisticBuilder = new ColumnStatisticBuilder();
         columnStatisticBuilder.setMaxValue(Math.max(leftStats.maxValue, rightStats.maxValue));
         columnStatisticBuilder.setMinValue(Math.min(leftStats.minValue, rightStats.minValue));
diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalFileScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalFileScan.java
index 639e026949e..c289f2beb35 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalFileScan.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalFileScan.java
@@ -125,10 +125,9 @@ public class PhysicalFileScan extends PhysicalCatalogRelation {
 
     @Override
     public String toString() {
-        return Utils.toSqlString("PhysicalFileScan",
+        return Utils.toSqlString("PhysicalFileScan[" + table.getName() + "]" + getGroupIdWithPrefix(),
+            "stats", statistics,
                 "qualified", Utils.qualifiedName(qualifier, table.getName()),
-                "output", getOutput(),
-                "stats", statistics,
                 "conjuncts", conjuncts,
                 "selected partitions num",
                 selectedPartitions.isPruned ? selectedPartitions.selectedPartitions.size() : "unknown"
diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalHashAggregate.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalHashAggregate.java
index 3e6f40cc0d4..fb3087e2608 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalHashAggregate.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalHashAggregate.java
@@ -195,13 +195,13 @@ public class PhysicalHashAggregate<CHILD_TYPE extends Plan> extends PhysicalUnar
         return Utils.toSqlString("PhysicalHashAggregate[" + id.asInt() + "]" + getGroupIdWithPrefix(),
                 "aggPhase", aggregateParam.aggPhase,
                 "aggMode", aggregateParam.aggMode,
+                "stats", statistics,
                 "maybeUseStreaming", maybeUsingStream,
                 "groupByExpr", groupByExpressions,
                 "outputExpr", outputExpressions,
                 "partitionExpr", partitionExpressions,
                 "requireProperties", requireProperties,
-                "topnOpt", topnPushInfo != null,
-                "stats", statistics
+                "topnOpt", topnPushInfo != null
         );
     }
 
diff --git a/fe/fe-core/src/main/java/org/apache/doris/statistics/Statistics.java b/fe/fe-core/src/main/java/org/apache/doris/statistics/Statistics.java
index 2df65d08670..7101fba5afe 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/statistics/Statistics.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/statistics/Statistics.java
@@ -17,15 +17,18 @@
 
 package org.apache.doris.statistics;
 
+import org.apache.doris.catalog.Column;
 import org.apache.doris.nereids.stats.StatsMathUtil;
 import org.apache.doris.nereids.trees.expressions.Expression;
 import org.apache.doris.nereids.trees.expressions.Slot;
+import org.apache.doris.nereids.trees.expressions.SlotReference;
 
 import java.text.DecimalFormat;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Optional;
 import java.util.Set;
 import java.util.stream.Collectors;
 
@@ -83,7 +86,7 @@ public class Statistics {
     public void enforceValid() {
         for (Entry<Expression, ColumnStatistic> entry : expressionToColumnStats.entrySet()) {
             ColumnStatistic columnStatistic = entry.getValue();
-            if (!checkColumnStatsValid(columnStatistic)) {
+            if (!checkColumnStatsValid(columnStatistic) && !columnStatistic.isUnKnown()) {
                 double ndv = Math.min(columnStatistic.ndv, rowCount);
                 ColumnStatisticBuilder columnStatisticBuilder = new ColumnStatisticBuilder(columnStatistic);
                 columnStatisticBuilder.setNdv(ndv);
@@ -130,7 +133,7 @@ public class Statistics {
             for (Slot slot : slots) {
                 ColumnStatistic s = expressionToColumnStats.get(slot);
                 if (s != null) {
-                    tempSize += s.avgSizeByte;
+                    tempSize += Math.max(1, Math.min(20, s.avgSizeByte));
                 }
             }
             tupleSize = Math.max(1, tempSize);
@@ -149,7 +152,26 @@ public class Statistics {
     }
 
     public double dataSizeFactor(List<Slot> slots) {
-        return 0.05 * computeTupleSize(slots);
+        boolean allUnknown = true;
+        for (Slot slot : slots) {
+            if (slot instanceof SlotReference) {
+                Optional<Column> colOpt = ((SlotReference) slot).getColumn();
+                if (colOpt.isPresent() && colOpt.get().isVisible()) {
+                    ColumnStatistic colStats = expressionToColumnStats.get(slot);
+                    if (colStats != null && !colStats.isUnKnown) {
+                        allUnknown = false;
+                        break;
+                    }
+                }
+            }
+        }
+        if (allUnknown) {
+            double lowerBound = 0.03;
+            double upperBound = 0.07;
+            return Math.min(Math.max(computeTupleSize(slots) / K_BYTES, lowerBound), upperBound);
+        } else {
+            return 0.05 * computeTupleSize(slots);
+        }
     }
 
     @Override
diff --git a/regression-test/data/nereids_hint_tpcds_p0/shape/query23.out b/regression-test/data/nereids_hint_tpcds_p0/shape/query23.out
index 6b6de578570..480608162ed 100644
--- a/regression-test/data/nereids_hint_tpcds_p0/shape/query23.out
+++ b/regression-test/data/nereids_hint_tpcds_p0/shape/query23.out
@@ -51,31 +51,30 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------PhysicalDistribute[DistributionSpecGather]
 ------------hashAgg[LOCAL]
 --------------PhysicalUnion
-----------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------PhysicalProject
---------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
-----------------------PhysicalProject
-------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 ----------------PhysicalProject
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF4 cs_item_sk->[item_sk]
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4
+--------------------PhysicalProject
+----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
+----------------PhysicalProject
+------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF6 ws_item_sk->[item_sk]
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6
 --------------------PhysicalProject
 ----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
 ------------------------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]
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
 ----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF5
 ----------------------------PhysicalProject
 ------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000))
 --------------------------------PhysicalOlapScan[date_dim]
 ------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
---------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/nereids_hint_tpcds_p0/shape/query64.out b/regression-test/data/nereids_hint_tpcds_p0/shape/query64.out
index 3b29ee537fe..2d246513ba5 100644
--- a/regression-test/data/nereids_hint_tpcds_p0/shape/query64.out
+++ b/regression-test/data/nereids_hint_tpcds_p0/shape/query64.out
@@ -7,13 +7,13 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 --------PhysicalDistribute[DistributionSpecHash]
 ----------hashAgg[LOCAL]
 ------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF20 p_promo_sk->[ss_promo_sk]
+--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF19 p_promo_sk->[ss_promo_sk]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = ad2.ca_address_sk)) otherCondition=() build RFs:RF19 ca_address_sk->[c_current_addr_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = ad2.ca_address_sk)) otherCondition=() build RFs:RF18 ca_address_sk->[c_current_addr_sk]
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF18 s_store_sk->[ss_store_sk]
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF17 s_store_sk->[ss_store_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF15 sr_item_sk->[ss_item_sk];RF16 sr_item_sk->[cr_item_sk,cs_item_sk,i_item_sk];RF17 sr_ticket_number->[ss_ticket_number]
+--------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF15 sr_item_sk->[cr_item_sk,cs_item_sk,i_item_sk,ss_item_sk];RF16 sr_ticket_number->[ss_ticket_number]
 ----------------------------PhysicalProject
 ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_first_shipto_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF14 d_date_sk->[c_first_shipto_date_sk]
 --------------------------------PhysicalProject
@@ -29,28 +29,28 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 ----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk]
 ------------------------------------------------------PhysicalProject
 --------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=(( not (cd_marital_status = cd_marital_status))) build RFs:RF7 cd_demo_sk->[c_current_cdemo_sk]
-----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF6 cs_item_sk->[ss_item_sk]
-------------------------------------------------------------PhysicalProject
---------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[ss_cdemo_sk]
-----------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk]
+----------------------------------------------------------PhysicalProject
+------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF6 c_customer_sk->[ss_customer_sk]
+--------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[ss_cdemo_sk]
+------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF4 cs_item_sk->[ss_item_sk]
 --------------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 RF6 RF8 RF9 RF10 RF13 RF15 RF17 RF18 RF20
+----------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 RF6 RF8 RF9 RF10 RF13 RF15 RF16 RF17 RF19
 --------------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF7 RF11 RF12 RF14 RF19
-----------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------PhysicalOlapScan[customer_demographics]
-------------------------------------------------------------PhysicalProject
---------------------------------------------------------------filter((sale > (2 * refund)))
-----------------------------------------------------------------hashAgg[GLOBAL]
-------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
---------------------------------------------------------------------hashAgg[LOCAL]
-----------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF2 cr_item_sk->[cs_item_sk];RF3 cr_order_number->[cs_order_number]
---------------------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF9 RF16
---------------------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF9 RF16
+----------------------------------------------------------------------filter((sale > (2 * refund)))
+------------------------------------------------------------------------hashAgg[GLOBAL]
+--------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
+----------------------------------------------------------------------------hashAgg[LOCAL]
+------------------------------------------------------------------------------PhysicalProject
+--------------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF2 cr_item_sk->[cs_item_sk];RF3 cr_order_number->[cs_order_number]
+----------------------------------------------------------------------------------PhysicalProject
+------------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF9 RF15
+----------------------------------------------------------------------------------PhysicalProject
+------------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF9 RF15
+------------------------------------------------------------------PhysicalProject
+--------------------------------------------------------------------PhysicalOlapScan[customer_demographics]
+--------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF7 RF11 RF12 RF14 RF18
 ----------------------------------------------------------PhysicalProject
 ------------------------------------------------------------PhysicalOlapScan[customer_demographics]
 ------------------------------------------------------PhysicalProject
@@ -58,7 +58,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 ----------------------------------------------------------PhysicalOlapScan[date_dim]
 --------------------------------------------------PhysicalProject
 ----------------------------------------------------filter((item.i_current_price <= 58.00) and (item.i_current_price >= 49.00) and i_color IN ('blush', 'lace', 'lawn', 'misty', 'orange', 'pink'))
-------------------------------------------------------PhysicalOlapScan[item] apply RFs: RF16
+------------------------------------------------------PhysicalOlapScan[item] apply RFs: RF15
 ------------------------------------------------PhysicalProject
 --------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd1.hd_income_band_sk = ib1.ib_income_band_sk)) otherCondition=() build RFs:RF1 ib_income_band_sk->[hd_income_band_sk]
 ----------------------------------------------------PhysicalProject
diff --git a/regression-test/data/nereids_hint_tpcds_p0/shape/query9.out b/regression-test/data/nereids_hint_tpcds_p0/shape/query9.out
index f159ed97647..06cd8f92785 100644
--- a/regression-test/data/nereids_hint_tpcds_p0/shape/query9.out
+++ b/regression-test/data/nereids_hint_tpcds_p0/shape/query9.out
@@ -1,8 +1,8 @@
 -- This file is automatically generated. You should know what you did if you want to edit this
 -- !ds_shape_9 --
 PhysicalResultSink
---PhysicalProject
-----NestedLoopJoin[CROSS_JOIN]
+--PhysicalDistribute[DistributionSpecGather]
+----PhysicalProject
 ------NestedLoopJoin[CROSS_JOIN]
 --------NestedLoopJoin[CROSS_JOIN]
 ----------NestedLoopJoin[CROSS_JOIN]
@@ -16,17 +16,24 @@ PhysicalResultSink
 --------------------------NestedLoopJoin[CROSS_JOIN]
 ----------------------------NestedLoopJoin[CROSS_JOIN]
 ------------------------------NestedLoopJoin[CROSS_JOIN]
---------------------------------PhysicalProject
-----------------------------------NestedLoopJoin[CROSS_JOIN]
-------------------------------------hashAgg[GLOBAL]
---------------------------------------PhysicalDistribute[DistributionSpecGather]
-----------------------------------------hashAgg[LOCAL]
-------------------------------------------PhysicalProject
---------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
-----------------------------------------------PhysicalOlapScan[store_sales]
-------------------------------------PhysicalProject
---------------------------------------filter((reason.r_reason_sk = 1))
-----------------------------------------PhysicalOlapScan[reason]
+--------------------------------NestedLoopJoin[CROSS_JOIN]
+----------------------------------PhysicalProject
+------------------------------------NestedLoopJoin[CROSS_JOIN]
+--------------------------------------PhysicalProject
+----------------------------------------filter((reason.r_reason_sk = 1))
+------------------------------------------PhysicalOlapScan[reason]
+--------------------------------------hashAgg[GLOBAL]
+----------------------------------------PhysicalDistribute[DistributionSpecGather]
+------------------------------------------hashAgg[LOCAL]
+--------------------------------------------PhysicalProject
+----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+------------------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------hashAgg[GLOBAL]
+------------------------------------PhysicalDistribute[DistributionSpecGather]
+--------------------------------------hashAgg[LOCAL]
+----------------------------------------PhysicalProject
+------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+--------------------------------------------PhysicalOlapScan[store_sales]
 --------------------------------hashAgg[GLOBAL]
 ----------------------------------PhysicalDistribute[DistributionSpecGather]
 ------------------------------------hashAgg[LOCAL]
@@ -37,7 +44,7 @@ PhysicalResultSink
 --------------------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------------------hashAgg[LOCAL]
 ------------------------------------PhysicalProject
---------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+--------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
 ----------------------------------------PhysicalOlapScan[store_sales]
 ----------------------------hashAgg[GLOBAL]
 ------------------------------PhysicalDistribute[DistributionSpecGather]
@@ -55,7 +62,7 @@ PhysicalResultSink
 --------------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------------hashAgg[LOCAL]
 ------------------------------PhysicalProject
---------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
+--------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
 ----------------------------------PhysicalOlapScan[store_sales]
 ----------------------hashAgg[GLOBAL]
 ------------------------PhysicalDistribute[DistributionSpecGather]
@@ -73,7 +80,7 @@ PhysicalResultSink
 --------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------hashAgg[LOCAL]
 ------------------------PhysicalProject
---------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
+--------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
 ----------------------------PhysicalOlapScan[store_sales]
 ----------------hashAgg[GLOBAL]
 ------------------PhysicalDistribute[DistributionSpecGather]
@@ -91,7 +98,7 @@ PhysicalResultSink
 --------------PhysicalDistribute[DistributionSpecGather]
 ----------------hashAgg[LOCAL]
 ------------------PhysicalProject
---------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
+--------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
 ----------------------PhysicalOlapScan[store_sales]
 ----------hashAgg[GLOBAL]
 ------------PhysicalDistribute[DistributionSpecGather]
@@ -105,10 +112,4 @@ PhysicalResultSink
 --------------PhysicalProject
 ----------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
 ------------------PhysicalOlapScan[store_sales]
-------hashAgg[GLOBAL]
---------PhysicalDistribute[DistributionSpecGather]
-----------hashAgg[LOCAL]
-------------PhysicalProject
---------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
-----------------PhysicalOlapScan[store_sales]
 
diff --git a/regression-test/data/nereids_hint_tpch_p0/shape/q15.out b/regression-test/data/nereids_hint_tpch_p0/shape/q15.out
index a920e389bd4..a88c5e699bd 100644
--- a/regression-test/data/nereids_hint_tpch_p0/shape/q15.out
+++ b/regression-test/data/nereids_hint_tpch_p0/shape/q15.out
@@ -5,7 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalQuickSort[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN shuffle] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=()
+----------hashJoin[INNER_JOIN broadcast] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=()
 ------------PhysicalProject
 --------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = revenue0.supplier_no)) otherCondition=()
 ----------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query17.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query17.out
index 72cbc31559e..12fa11701b6 100644
--- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query17.out
+++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query17.out
@@ -9,7 +9,7 @@ PhysicalResultSink
 ------------PhysicalDistribute[DistributionSpecHash]
 --------------hashAgg[LOCAL]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk]
 --------------------PhysicalProject
 ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk]
 ------------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query2.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query2.out
index 541ee756a8e..988b288ebb8 100644
--- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query2.out
+++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query2.out
@@ -21,7 +21,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalQuickSort[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffle] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=()
+------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=()
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN shuffle] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq]
 ------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query23.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query23.out
index 6b6de578570..480608162ed 100644
--- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query23.out
+++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query23.out
@@ -51,31 +51,30 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------PhysicalDistribute[DistributionSpecGather]
 ------------hashAgg[LOCAL]
 --------------PhysicalUnion
-----------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------PhysicalProject
---------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
-----------------------PhysicalProject
-------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 ----------------PhysicalProject
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF4 cs_item_sk->[item_sk]
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4
+--------------------PhysicalProject
+----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
+----------------PhysicalProject
+------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF6 ws_item_sk->[item_sk]
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6
 --------------------PhysicalProject
 ----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
 ------------------------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]
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
 ----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF5
 ----------------------------PhysicalProject
 ------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000))
 --------------------------------PhysicalOlapScan[date_dim]
 ------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
---------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query51.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query51.out
index 38bec2403ec..6c22d2df308 100644
--- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query51.out
+++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query51.out
@@ -19,9 +19,9 @@ PhysicalResultSink
 --------------------------------PhysicalDistribute[DistributionSpecHash]
 ----------------------------------hashAgg[LOCAL]
 ------------------------------------PhysicalProject
---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk]
+--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
 ----------------------------------------PhysicalProject
-------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1
+------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
 ----------------------------------------PhysicalProject
 ------------------------------------------filter((date_dim.d_month_seq <= 1223) and (date_dim.d_month_seq >= 1212))
 --------------------------------------------PhysicalOlapScan[date_dim]
@@ -34,9 +34,9 @@ PhysicalResultSink
 --------------------------------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]
+--------------------------------------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[web_sales] apply RFs: RF0
+------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0
 ----------------------------------------PhysicalProject
 ------------------------------------------filter((date_dim.d_month_seq <= 1223) and (date_dim.d_month_seq >= 1212))
 --------------------------------------------PhysicalOlapScan[date_dim]
diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query64.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query64.out
index ffc07881d80..6745146c315 100644
--- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query64.out
+++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query64.out
@@ -22,42 +22,42 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 ----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF14 RF15
 --------------------------------PhysicalProject
 ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF13 cd_demo_sk->[ss_cdemo_sk]
-------------------------------------PhysicalProject
---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF12 cs_item_sk->[i_item_sk,ss_item_sk]
-----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ss_item_sk]
+------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[cr_item_sk,cs_item_sk,ss_item_sk]
+--------------------------------------PhysicalProject
+----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF11 s_store_sk->[ss_store_sk]
 ------------------------------------------PhysicalProject
---------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF10 s_store_sk->[ss_store_sk]
+--------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd1.hd_income_band_sk = ib1.ib_income_band_sk)) otherCondition=() build RFs:RF10 ib_income_band_sk->[hd_income_band_sk]
 ----------------------------------------------PhysicalProject
-------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd1.hd_income_band_sk = ib1.ib_income_band_sk)) otherCondition=() build RFs:RF9 ib_income_band_sk->[hd_income_band_sk]
+------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = hd1.hd_demo_sk)) otherCondition=() build RFs:RF9 hd_demo_sk->[ss_hdemo_sk]
 --------------------------------------------------PhysicalProject
-----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = hd1.hd_demo_sk)) otherCondition=() build RFs:RF8 hd_demo_sk->[ss_hdemo_sk]
+----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF8 cs_item_sk->[ss_item_sk]
 ------------------------------------------------------PhysicalProject
 --------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk]
 ----------------------------------------------------------PhysicalProject
-------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF7 RF8 RF10 RF11 RF12 RF13 RF17 RF18
+------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF7 RF8 RF9 RF11 RF12 RF13 RF17 RF18
 ----------------------------------------------------------PhysicalProject
 ------------------------------------------------------------filter(d_year IN (1999, 2000))
 --------------------------------------------------------------PhysicalOlapScan[date_dim]
 ------------------------------------------------------PhysicalProject
---------------------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF9
+--------------------------------------------------------filter((sale > (2 * refund)))
+----------------------------------------------------------hashAgg[GLOBAL]
+------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------------------------------------------hashAgg[LOCAL]
+----------------------------------------------------------------PhysicalProject
+------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF5 cr_item_sk->[cs_item_sk];RF6 cr_order_number->[cs_order_number]
+--------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF12
+--------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF12
 --------------------------------------------------PhysicalProject
-----------------------------------------------------PhysicalOlapScan[income_band]
+----------------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF10
 ----------------------------------------------PhysicalProject
-------------------------------------------------PhysicalOlapScan[store]
+------------------------------------------------PhysicalOlapScan[income_band]
 ------------------------------------------PhysicalProject
---------------------------------------------filter((item.i_current_price <= 58.00) and (item.i_current_price >= 49.00) and i_color IN ('blush', 'lace', 'lawn', 'misty', 'orange', 'pink'))
-----------------------------------------------PhysicalOlapScan[item] apply RFs: RF12
-----------------------------------------PhysicalProject
-------------------------------------------filter((sale > (2 * refund)))
---------------------------------------------hashAgg[GLOBAL]
-----------------------------------------------PhysicalDistribute[DistributionSpecHash]
-------------------------------------------------hashAgg[LOCAL]
---------------------------------------------------PhysicalProject
-----------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF5 cr_item_sk->[cs_item_sk];RF6 cr_order_number->[cs_order_number]
-------------------------------------------------------PhysicalProject
---------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6
-------------------------------------------------------PhysicalProject
---------------------------------------------------------PhysicalOlapScan[catalog_returns]
+--------------------------------------------PhysicalOlapScan[store]
+--------------------------------------PhysicalProject
+----------------------------------------filter((item.i_current_price <= 58.00) and (item.i_current_price >= 49.00) and i_color IN ('blush', 'lace', 'lawn', 'misty', 'orange', 'pink'))
+------------------------------------------PhysicalOlapScan[item]
 ------------------------------------PhysicalProject
 --------------------------------------PhysicalOlapScan[customer_demographics]
 ------------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query9.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query9.out
index f159ed97647..06cd8f92785 100644
--- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query9.out
+++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query9.out
@@ -1,8 +1,8 @@
 -- This file is automatically generated. You should know what you did if you want to edit this
 -- !ds_shape_9 --
 PhysicalResultSink
---PhysicalProject
-----NestedLoopJoin[CROSS_JOIN]
+--PhysicalDistribute[DistributionSpecGather]
+----PhysicalProject
 ------NestedLoopJoin[CROSS_JOIN]
 --------NestedLoopJoin[CROSS_JOIN]
 ----------NestedLoopJoin[CROSS_JOIN]
@@ -16,17 +16,24 @@ PhysicalResultSink
 --------------------------NestedLoopJoin[CROSS_JOIN]
 ----------------------------NestedLoopJoin[CROSS_JOIN]
 ------------------------------NestedLoopJoin[CROSS_JOIN]
---------------------------------PhysicalProject
-----------------------------------NestedLoopJoin[CROSS_JOIN]
-------------------------------------hashAgg[GLOBAL]
---------------------------------------PhysicalDistribute[DistributionSpecGather]
-----------------------------------------hashAgg[LOCAL]
-------------------------------------------PhysicalProject
---------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
-----------------------------------------------PhysicalOlapScan[store_sales]
-------------------------------------PhysicalProject
---------------------------------------filter((reason.r_reason_sk = 1))
-----------------------------------------PhysicalOlapScan[reason]
+--------------------------------NestedLoopJoin[CROSS_JOIN]
+----------------------------------PhysicalProject
+------------------------------------NestedLoopJoin[CROSS_JOIN]
+--------------------------------------PhysicalProject
+----------------------------------------filter((reason.r_reason_sk = 1))
+------------------------------------------PhysicalOlapScan[reason]
+--------------------------------------hashAgg[GLOBAL]
+----------------------------------------PhysicalDistribute[DistributionSpecGather]
+------------------------------------------hashAgg[LOCAL]
+--------------------------------------------PhysicalProject
+----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+------------------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------hashAgg[GLOBAL]
+------------------------------------PhysicalDistribute[DistributionSpecGather]
+--------------------------------------hashAgg[LOCAL]
+----------------------------------------PhysicalProject
+------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+--------------------------------------------PhysicalOlapScan[store_sales]
 --------------------------------hashAgg[GLOBAL]
 ----------------------------------PhysicalDistribute[DistributionSpecGather]
 ------------------------------------hashAgg[LOCAL]
@@ -37,7 +44,7 @@ PhysicalResultSink
 --------------------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------------------hashAgg[LOCAL]
 ------------------------------------PhysicalProject
---------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+--------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
 ----------------------------------------PhysicalOlapScan[store_sales]
 ----------------------------hashAgg[GLOBAL]
 ------------------------------PhysicalDistribute[DistributionSpecGather]
@@ -55,7 +62,7 @@ PhysicalResultSink
 --------------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------------hashAgg[LOCAL]
 ------------------------------PhysicalProject
---------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
+--------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
 ----------------------------------PhysicalOlapScan[store_sales]
 ----------------------hashAgg[GLOBAL]
 ------------------------PhysicalDistribute[DistributionSpecGather]
@@ -73,7 +80,7 @@ PhysicalResultSink
 --------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------hashAgg[LOCAL]
 ------------------------PhysicalProject
---------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
+--------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
 ----------------------------PhysicalOlapScan[store_sales]
 ----------------hashAgg[GLOBAL]
 ------------------PhysicalDistribute[DistributionSpecGather]
@@ -91,7 +98,7 @@ PhysicalResultSink
 --------------PhysicalDistribute[DistributionSpecGather]
 ----------------hashAgg[LOCAL]
 ------------------PhysicalProject
---------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
+--------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
 ----------------------PhysicalOlapScan[store_sales]
 ----------hashAgg[GLOBAL]
 ------------PhysicalDistribute[DistributionSpecGather]
@@ -105,10 +112,4 @@ PhysicalResultSink
 --------------PhysicalProject
 ----------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
 ------------------PhysicalOlapScan[store_sales]
-------hashAgg[GLOBAL]
---------PhysicalDistribute[DistributionSpecGather]
-----------hashAgg[LOCAL]
-------------PhysicalProject
---------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
-----------------PhysicalOlapScan[store_sales]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/constraints/query23.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/constraints/query23.out
index 7e956604016..c96446fbfcb 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/constraints/query23.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/constraints/query23.out
@@ -51,32 +51,30 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------PhysicalDistribute[DistributionSpecGather]
 ------------hashAgg[LOCAL]
 --------------PhysicalUnion
-----------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------PhysicalProject
---------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
-----------------------PhysicalProject
-------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
-----------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------PhysicalProject
---------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=()
-----------------------PhysicalProject
-------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
---------------------------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_moy = 5) and (date_dim.d_year = 2000))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+----------------PhysicalProject
+------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+--------------------PhysicalProject
+----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+----------------PhysicalProject
+------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+--------------------PhysicalProject
+----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
+------------------------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_moy = 5) and (date_dim.d_year = 2000))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query1.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query1.out
index 1e0b5bfeabe..64854df932a 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query1.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query1.out
@@ -18,20 +18,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalTopN[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=()
+------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ctr_store_sk,ctr_store_sk]
+----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ctr_store_sk]
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1
-----------------------hashAgg[GLOBAL]
-------------------------PhysicalDistribute[DistributionSpecHash]
---------------------------hashAgg[LOCAL]
-----------------------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1
+--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=()
+----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
 ------------------PhysicalProject
 --------------------filter((store.s_state = 'SD'))
 ----------------------PhysicalOlapScan[store]
---------------PhysicalProject
-----------------PhysicalOlapScan[customer]
+--------------hashAgg[GLOBAL]
+----------------PhysicalDistribute[DistributionSpecHash]
+------------------hashAgg[LOCAL]
+--------------------PhysicalDistribute[DistributionSpecExecutionAny]
+----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query10.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query10.out
index dd3e00f3fc4..bc11b07f3a3 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query10.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query10.out
@@ -10,12 +10,12 @@ PhysicalResultSink
 --------------hashAgg[LOCAL]
 ----------------PhysicalProject
 ------------------filter((ifnull($c$1, FALSE) OR ifnull($c$2, FALSE)))
---------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
-----------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=()
-----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk]
+--------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[c_current_addr_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=()
+------------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
 --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk]
 ----------------------------------PhysicalProject
 ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk]
@@ -25,18 +25,18 @@ PhysicalResultSink
 ----------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001))
 ------------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------------PhysicalProject
-------------------------------------PhysicalOlapScan[customer] apply RFs: RF4
+------------------------------------PhysicalOlapScan[customer] apply RFs: RF5
 --------------------------------PhysicalProject
-----------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County'))
-------------------------------------PhysicalOlapScan[customer_address]
-----------------------------PhysicalOlapScan[customer_demographics]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
-----------------------------PhysicalProject
-------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001))
---------------------------------PhysicalOlapScan[date_dim]
+----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
+------------------------------------PhysicalProject
+--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
+------------------------------------PhysicalProject
+--------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001))
+----------------------------------------PhysicalOlapScan[date_dim]
+------------------------------PhysicalOlapScan[customer_demographics]
+--------------------------PhysicalProject
+----------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County'))
+------------------------------PhysicalOlapScan[customer_address]
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk]
 --------------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query14.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query14.out
index 7e6dfed6818..802cd5edad0 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query14.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query14.out
@@ -5,42 +5,48 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----PhysicalProject
 ------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_brand_id = t.brand_id) and (item.i_category_id = t.category_id) and (item.i_class_id = t.class_id)) otherCondition=()
 --------PhysicalIntersect
-----------PhysicalDistribute[DistributionSpecHash]
-------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
+----------hashAgg[GLOBAL]
+------------PhysicalDistribute[DistributionSpecHash]
+--------------hashAgg[LOCAL]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk]
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[item]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[item]
-----------------PhysicalProject
-------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000))
---------------------PhysicalOlapScan[date_dim]
-----------PhysicalDistribute[DistributionSpecHash]
-------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
+----------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000))
+------------------------PhysicalOlapScan[date_dim]
+----------hashAgg[GLOBAL]
+------------PhysicalDistribute[DistributionSpecHash]
+--------------hashAgg[LOCAL]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk]
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[item]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[item]
-----------------PhysicalProject
-------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000))
---------------------PhysicalOlapScan[date_dim]
-----------PhysicalDistribute[DistributionSpecHash]
-------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk]
+----------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000))
+------------------------PhysicalOlapScan[date_dim]
+----------hashAgg[GLOBAL]
+------------PhysicalDistribute[DistributionSpecHash]
+--------------hashAgg[LOCAL]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=()
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[store_sales] apply RFs: RF5
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=()
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[store_sales] apply RFs: RF5
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[item]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[item]
-----------------PhysicalProject
-------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000))
---------------------PhysicalOlapScan[date_dim]
+----------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000))
+------------------------PhysicalOlapScan[date_dim]
 --------PhysicalProject
 ----------PhysicalOlapScan[item]
 --PhysicalCteAnchor ( cteId=CTEId#1 )
@@ -93,7 +99,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF13 d_date_sk->[ss_sold_date_sk]
 ----------------------------------------PhysicalProject
 ------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=()
---------------------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=()
+--------------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=()
 ----------------------------------------------PhysicalProject
 ------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF13
 ----------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
@@ -136,13 +142,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------------------------------PhysicalDistribute[DistributionSpecHash]
 ----------------------------------hashAgg[LOCAL]
 ------------------------------------PhysicalProject
---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF18 d_date_sk->[ws_sold_date_sk]
+--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF17 d_date_sk->[ws_sold_date_sk]
 ----------------------------------------PhysicalProject
 ------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=()
---------------------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=()
-----------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+--------------------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=()
 ----------------------------------------------PhysicalProject
-------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF18
+------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF17
+----------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 --------------------------------------------PhysicalProject
 ----------------------------------------------PhysicalOlapScan[item]
 ----------------------------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query16.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query16.out
index b82c89471d5..c6e88456a7e 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query16.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query16.out
@@ -7,28 +7,28 @@ PhysicalResultSink
 --------hashAgg[DISTINCT_LOCAL]
 ----------hashAgg[GLOBAL]
 ------------hashAgg[LOCAL]
---------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=()
-----------------PhysicalProject
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk)))
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cs_ship_addr_sk]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[cs_ship_addr_sk]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk]
+--------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=()
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk]
+------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2
+----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01'))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 RF3
 ----------------------------PhysicalProject
-------------------------------filter((customer_address.ca_state = 'WV'))
---------------------------------PhysicalOlapScan[customer_address]
-------------------------PhysicalProject
---------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County'))
-----------------------------PhysicalOlapScan[call_center]
---------------------PhysicalProject
-----------------------PhysicalOlapScan[catalog_sales]
-----------------PhysicalProject
-------------------PhysicalOlapScan[catalog_returns]
+------------------------------PhysicalOlapScan[catalog_returns]
+--------------------------PhysicalProject
+----------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01'))
+------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------filter((customer_address.ca_state = 'WV'))
+--------------------------PhysicalOlapScan[customer_address]
+------------------PhysicalProject
+--------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County'))
+----------------------PhysicalOlapScan[call_center]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query23.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query23.out
index bb8890a9c51..a8c20854755 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query23.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query23.out
@@ -54,7 +54,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------------PhysicalProject
 ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
 --------------------PhysicalProject
-----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+----------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
 ------------------------PhysicalProject
 --------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
 ----------------------------PhysicalProject
@@ -65,15 +65,15 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
 ------------------------PhysicalOlapScan[date_dim]
 ----------------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]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
 --------------------PhysicalProject
-----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+----------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF4 ws_item_sk->[item_sk]
+------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4
 ------------------------PhysicalProject
 --------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
 ----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF5
 ----------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
-------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 --------------------PhysicalProject
 ----------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
 ------------------------PhysicalOlapScan[date_dim]
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query30.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query30.out
index 58abd8bb1fe..e956468874d 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query30.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query30.out
@@ -7,16 +7,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------PhysicalDistribute[DistributionSpecHash]
 ----------hashAgg[LOCAL]
 ------------PhysicalProject
---------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=()
+--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[wr_returned_date_sk]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[wr_returned_date_sk]
+------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=()
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[web_returns] apply RFs: RF0
+----------------------PhysicalOlapScan[web_returns] apply RFs: RF1
 --------------------PhysicalProject
-----------------------filter((date_dim.d_year = 2002))
-------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalOlapScan[customer_address]
 ----------------PhysicalProject
-------------------PhysicalOlapScan[customer_address]
+------------------filter((date_dim.d_year = 2002))
+--------------------PhysicalOlapScan[date_dim]
 --PhysicalResultSink
 ----PhysicalTopN[MERGE_SORT]
 ------PhysicalDistribute[DistributionSpecGather]
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query34.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query34.out
index ccf88a94822..dad99a6b646 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query34.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query34.out
@@ -5,9 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalQuickSort[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk]
-------------PhysicalProject
---------------PhysicalOlapScan[customer] apply RFs: RF3
+----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=()
 ------------filter((dn.cnt <= 20) and (dn.cnt >= 15))
 --------------hashAgg[GLOBAL]
 ----------------PhysicalDistribute[DistributionSpecHash]
@@ -29,4 +27,6 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000'))
 ----------------------------PhysicalOlapScan[household_demographics]
+------------PhysicalProject
+--------------PhysicalOlapScan[customer]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query35.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query35.out
index a0d4184eb03..9f3bb8dab0f 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query35.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query35.out
@@ -10,12 +10,12 @@ PhysicalResultSink
 --------------hashAgg[LOCAL]
 ----------------PhysicalProject
 ------------------filter((ifnull($c$1, FALSE) OR ifnull($c$2, FALSE)))
---------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
-----------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=()
-----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=()
+--------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=()
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=()
+------------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
 --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=()
 ----------------------------------PhysicalProject
 ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk]
@@ -27,16 +27,16 @@ PhysicalResultSink
 ----------------------------------PhysicalProject
 ------------------------------------PhysicalOlapScan[customer]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[customer_address]
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[customer_demographics]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
-----------------------------PhysicalProject
-------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001))
---------------------------------PhysicalOlapScan[date_dim]
+----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
+------------------------------------PhysicalProject
+--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
+------------------------------------PhysicalProject
+--------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001))
+----------------------------------------PhysicalOlapScan[date_dim]
+------------------------------PhysicalProject
+--------------------------------PhysicalOlapScan[customer_address]
+--------------------------PhysicalProject
+----------------------------PhysicalOlapScan[customer_demographics]
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk]
 --------------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query37.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query37.out
index 8a8b1f0dcfd..756dbd1de4e 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query37.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query37.out
@@ -8,20 +8,20 @@ PhysicalResultSink
 ----------PhysicalDistribute[DistributionSpecHash]
 ------------hashAgg[LOCAL]
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk]
+----------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk]
 ------------------PhysicalProject
 --------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk]
+--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk]
 ----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk]
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk]
 --------------------------PhysicalProject
 ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100))
 ------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1
 --------------------------PhysicalProject
-----------------------------filter((date_dim.d_date <= '1999-04-22') and (date_dim.d_date >= '1999-02-21'))
-------------------------------PhysicalOlapScan[date_dim]
+----------------------------filter((item.i_current_price <= 75.00) and (item.i_current_price >= 45.00) and i_manufact_id IN (1000, 707, 747, 856))
+------------------------------PhysicalOlapScan[item]
 ----------------------PhysicalProject
-------------------------filter((item.i_current_price <= 75.00) and (item.i_current_price >= 45.00) and i_manufact_id IN (1000, 707, 747, 856))
---------------------------PhysicalOlapScan[item]
+------------------------filter((date_dim.d_date <= '1999-04-22') and (date_dim.d_date >= '1999-02-21'))
+--------------------------PhysicalOlapScan[date_dim]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query39.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query39.out
index 0f87736ac33..9fd32d5844c 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query39.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query39.out
@@ -4,21 +4,23 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --PhysicalCteProducer ( cteId=CTEId#0 )
 ----PhysicalProject
 ------filter((if((mean = 0.0), 0.0, (stdev / mean)) > 1.0))
---------hashAgg[LOCAL]
-----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffle] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=()
+--------hashAgg[GLOBAL]
+----------PhysicalDistribute[DistributionSpecHash]
+------------hashAgg[LOCAL]
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk]
+----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk]
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=()
-----------------------PhysicalOlapScan[inventory] apply RFs: RF1
+--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=()
 ----------------------PhysicalProject
-------------------------PhysicalOlapScan[item]
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=()
+--------------------------PhysicalOlapScan[inventory] apply RFs: RF2
+--------------------------PhysicalProject
+----------------------------PhysicalOlapScan[item]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[warehouse]
 ------------------PhysicalProject
 --------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2))
 ----------------------PhysicalOlapScan[date_dim]
---------------PhysicalProject
-----------------PhysicalOlapScan[warehouse]
 --PhysicalResultSink
 ----PhysicalQuickSort[MERGE_SORT]
 ------PhysicalDistribute[DistributionSpecGather]
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query5.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query5.out
index 32ac590f71d..5187455761b 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query5.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query5.out
@@ -35,21 +35,21 @@ PhysicalResultSink
 ------------------------PhysicalDistribute[DistributionSpecHash]
 --------------------------hashAgg[LOCAL]
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=()
+------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cr_returned_date_sk,cs_sold_date_sk]
 --------------------------------PhysicalProject
-----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk,cs_sold_date_sk]
+----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=()
 ------------------------------------PhysicalUnion
 --------------------------------------PhysicalDistribute[DistributionSpecHash]
 ----------------------------------------PhysicalProject
-------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
+------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
 --------------------------------------PhysicalDistribute[DistributionSpecHash]
 ----------------------------------------PhysicalProject
-------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2
+------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3
 ------------------------------------PhysicalProject
---------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19'))
-----------------------------------------PhysicalOlapScan[date_dim]
+--------------------------------------PhysicalOlapScan[catalog_page]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_page]
+----------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19'))
+------------------------------------PhysicalOlapScan[date_dim]
 --------------------PhysicalProject
 ----------------------hashAgg[GLOBAL]
 ------------------------PhysicalDistribute[DistributionSpecHash]
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query64.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query64.out
index fa717ca038b..9101d1e89b4 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query64.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query64.out
@@ -3,88 +3,90 @@
 PhysicalCteAnchor ( cteId=CTEId#1 )
 --PhysicalCteProducer ( cteId=CTEId#1 )
 ----PhysicalProject
-------hashAgg[LOCAL]
---------PhysicalProject
-----------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF19 i_item_sk->[cr_item_sk,cs_item_sk,sr_item_sk,ss_item_sk]
+------hashAgg[GLOBAL]
+--------PhysicalDistribute[DistributionSpecHash]
+----------hashAgg[LOCAL]
 ------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd2.hd_income_band_sk = ib2.ib_income_band_sk)) otherCondition=()
+--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF19 i_item_sk->[cr_item_sk,cs_item_sk,sr_item_sk,ss_item_sk]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd1.hd_income_band_sk = ib1.ib_income_band_sk)) otherCondition=()
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd2.hd_income_band_sk = ib2.ib_income_band_sk)) otherCondition=()
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = ad2.ca_address_sk)) otherCondition=()
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd1.hd_income_band_sk = ib1.ib_income_band_sk)) otherCondition=()
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = ad1.ca_address_sk)) otherCondition=()
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = ad2.ca_address_sk)) otherCondition=()
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_hdemo_sk = hd2.hd_demo_sk)) otherCondition=()
+------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = ad1.ca_address_sk)) otherCondition=()
 --------------------------------PhysicalProject
-----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = hd1.hd_demo_sk)) otherCondition=()
+----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_hdemo_sk = hd2.hd_demo_sk)) otherCondition=()
 ------------------------------------PhysicalProject
---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=()
+--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = hd1.hd_demo_sk)) otherCondition=()
 ----------------------------------------PhysicalProject
-------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=(( not (cd_marital_status = cd_marital_status)))
+------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=()
 --------------------------------------------PhysicalProject
-----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=()
+----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=(( not (cd_marital_status = cd_marital_status)))
 ------------------------------------------------PhysicalProject
---------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_first_shipto_date_sk = d3.d_date_sk)) otherCondition=()
+--------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=()
 ----------------------------------------------------PhysicalProject
-------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_first_sales_date_sk = d2.d_date_sk)) otherCondition=()
+------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_first_shipto_date_sk = d3.d_date_sk)) otherCondition=()
 --------------------------------------------------------PhysicalProject
-----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=()
+----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_first_sales_date_sk = d2.d_date_sk)) otherCondition=()
 ------------------------------------------------------------PhysicalProject
---------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk]
+--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=()
 ----------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF5 cs_item_sk->[sr_item_sk,ss_item_sk]
+------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk]
 --------------------------------------------------------------------PhysicalProject
 ----------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=()
 ------------------------------------------------------------------------PhysicalProject
---------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=()
+--------------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF4 cs_item_sk->[sr_item_sk,ss_item_sk]
 ----------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF19
+------------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=()
+--------------------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF6 RF19
+--------------------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF4 RF19
 ----------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF5 RF19
+------------------------------------------------------------------------------filter((sale > (2 * refund)))
+--------------------------------------------------------------------------------hashAgg[GLOBAL]
+----------------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
+------------------------------------------------------------------------------------hashAgg[LOCAL]
+--------------------------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=()
+------------------------------------------------------------------------------------------PhysicalProject
+--------------------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF19
+------------------------------------------------------------------------------------------PhysicalProject
+--------------------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF19
 ------------------------------------------------------------------------PhysicalProject
 --------------------------------------------------------------------------PhysicalOlapScan[customer]
 --------------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------------filter((sale > (2 * refund)))
-------------------------------------------------------------------------hashAgg[GLOBAL]
---------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
-----------------------------------------------------------------------------hashAgg[LOCAL]
-------------------------------------------------------------------------------PhysicalProject
---------------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=()
-----------------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF19
-----------------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF19
+----------------------------------------------------------------------filter(d_year IN (2001, 2002))
+------------------------------------------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------filter(d_year IN (2001, 2002))
---------------------------------------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------------------------------------PhysicalOlapScan[store]
 ------------------------------------------------------------PhysicalProject
---------------------------------------------------------------PhysicalOlapScan[store]
+--------------------------------------------------------------PhysicalOlapScan[date_dim]
 --------------------------------------------------------PhysicalProject
 ----------------------------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------------------------------PhysicalProject
-------------------------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------------------------PhysicalOlapScan[customer_demographics]
 ------------------------------------------------PhysicalProject
 --------------------------------------------------PhysicalOlapScan[customer_demographics]
 --------------------------------------------PhysicalProject
-----------------------------------------------PhysicalOlapScan[customer_demographics]
+----------------------------------------------PhysicalOlapScan[promotion]
 ----------------------------------------PhysicalProject
-------------------------------------------PhysicalOlapScan[promotion]
+------------------------------------------PhysicalOlapScan[household_demographics]
 ------------------------------------PhysicalProject
 --------------------------------------PhysicalOlapScan[household_demographics]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[household_demographics]
+----------------------------------PhysicalOlapScan[customer_address]
 ----------------------------PhysicalProject
 ------------------------------PhysicalOlapScan[customer_address]
 ------------------------PhysicalProject
---------------------------PhysicalOlapScan[customer_address]
+--------------------------PhysicalOlapScan[income_band]
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[income_band]
 ----------------PhysicalProject
-------------------PhysicalOlapScan[income_band]
-------------PhysicalProject
---------------filter((item.i_current_price <= 33.00) and (item.i_current_price >= 24.00) and i_color IN ('blanched', 'brown', 'burlywood', 'chocolate', 'drab', 'medium'))
-----------------PhysicalOlapScan[item]
+------------------filter((item.i_current_price <= 33.00) and (item.i_current_price >= 24.00) and i_color IN ('blanched', 'brown', 'burlywood', 'chocolate', 'drab', 'medium'))
+--------------------PhysicalOlapScan[item]
 --PhysicalResultSink
 ----PhysicalQuickSort[MERGE_SORT]
 ------PhysicalDistribute[DistributionSpecGather]
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query65.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query65.out
index 360a5ee39bf..c19f18d7bfa 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query65.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query65.out
@@ -5,37 +5,37 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalTopN[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=()
+----------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF4 ss_store_sk->[s_store_sk,ss_store_sk]
 ------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=()
+--------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=()
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF2 ss_store_sk->[ss_store_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_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:RF1 d_date_sk->[ss_sold_date_sk]
 ------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2
+--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF4
 ------------------------------PhysicalProject
 --------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221))
 ----------------------------------PhysicalOlapScan[date_dim]
+--------------------PhysicalProject
+----------------------PhysicalOlapScan[store] apply RFs: RF4
+----------------PhysicalProject
+------------------PhysicalOlapScan[item]
+------------hashAgg[GLOBAL]
+--------------PhysicalDistribute[DistributionSpecHash]
+----------------hashAgg[LOCAL]
+------------------PhysicalProject
 --------------------hashAgg[GLOBAL]
 ----------------------PhysicalDistribute[DistributionSpecHash]
 ------------------------hashAgg[LOCAL]
 --------------------------PhysicalProject
-----------------------------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 <= 1232) and (date_dim.d_month_seq >= 1221))
-------------------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalProject
-------------------PhysicalOlapScan[store]
-------------PhysicalProject
---------------PhysicalOlapScan[item]
+----------------------------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 <= 1232) and (date_dim.d_month_seq >= 1221))
+----------------------------------PhysicalOlapScan[date_dim]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query69.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query69.out
index da2215b6ed1..e0bbeea8237 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query69.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query69.out
@@ -11,9 +11,9 @@ PhysicalResultSink
 ----------------PhysicalProject
 ------------------hashJoin[LEFT_ANTI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=()
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[c_current_addr_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk]
+--------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=()
 ----------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
 ------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk]
 --------------------------------PhysicalProject
@@ -24,7 +24,7 @@ PhysicalResultSink
 --------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000))
 ----------------------------------------PhysicalOlapScan[date_dim]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[customer] apply RFs: RF4
+----------------------------------PhysicalOlapScan[customer] apply RFs: RF5
 ------------------------------PhysicalProject
 --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
 ----------------------------------PhysicalProject
@@ -33,10 +33,10 @@ PhysicalResultSink
 ------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000))
 --------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------PhysicalProject
-------------------------------filter(ca_state IN ('MI', 'TX', 'VA'))
---------------------------------PhysicalOlapScan[customer_address]
+------------------------------PhysicalOlapScan[customer_demographics]
 ------------------------PhysicalProject
---------------------------PhysicalOlapScan[customer_demographics]
+--------------------------filter(ca_state IN ('MI', 'TX', 'VA'))
+----------------------------PhysicalOlapScan[customer_address]
 --------------------PhysicalProject
 ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk]
 ------------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query73.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query73.out
index 54b486b3ff0..8cfa2b3c64b 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query73.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query73.out
@@ -5,9 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalQuickSort[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk]
-------------PhysicalProject
---------------PhysicalOlapScan[customer] apply RFs: RF3
+----------hashJoin[INNER_JOIN broadcast] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=()
 ------------filter((dj.cnt <= 5) and (dj.cnt >= 1))
 --------------hashAgg[GLOBAL]
 ----------------PhysicalDistribute[DistributionSpecHash]
@@ -29,4 +27,6 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.0) and hd_buy_potential IN ('501-1000', 'Unknown'))
 ----------------------------PhysicalOlapScan[household_demographics]
+------------PhysicalProject
+--------------PhysicalOlapScan[customer]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query74.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query74.out
index fe86065b536..ac1a7051ce0 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query74.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query74.out
@@ -35,15 +35,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalTopN[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL)))
+------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL)))
 --------------PhysicalProject
-----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000))
-------------------PhysicalCteConsumer ( cteId=CTEId#0 )
---------------PhysicalProject
-----------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=()
-------------------PhysicalProject
---------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0))
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=()
 ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=()
 --------------------PhysicalProject
 ----------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000))
@@ -51,4 +45,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------------------PhysicalProject
 ----------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0.0))
 ------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+------------------PhysicalProject
+--------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0))
+----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+--------------PhysicalProject
+----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000))
+------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query75.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query75.out
index a7d307daa5b..dded6a5bb0e 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query75.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query75.out
@@ -6,60 +6,65 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecHash]
 --------hashAgg[LOCAL]
 ----------hashAgg[GLOBAL]
-------------PhysicalDistribute[DistributionSpecHash]
---------------hashAgg[LOCAL]
-----------------PhysicalUnion
-------------------PhysicalDistribute[DistributionSpecExecutionAny]
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=()
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_returns]
-----------------------------PhysicalProject
-------------------------------filter((item.i_category = 'Home'))
---------------------------------PhysicalOlapScan[item]
-------------------------PhysicalProject
---------------------------filter(d_year IN (1998, 1999))
-----------------------------PhysicalOlapScan[date_dim]
-------------------PhysicalDistribute[DistributionSpecExecutionAny]
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=()
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[store_returns]
-----------------------------PhysicalProject
-------------------------------filter((item.i_category = 'Home'))
---------------------------------PhysicalOlapScan[item]
-------------------------PhysicalProject
---------------------------filter(d_year IN (1998, 1999))
-----------------------------PhysicalOlapScan[date_dim]
-------------------PhysicalDistribute[DistributionSpecExecutionAny]
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=()
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_returns]
-----------------------------PhysicalProject
-------------------------------filter((item.i_category = 'Home'))
---------------------------------PhysicalOlapScan[item]
-------------------------PhysicalProject
---------------------------filter(d_year IN (1998, 1999))
-----------------------------PhysicalOlapScan[date_dim]
+------------hashAgg[LOCAL]
+--------------PhysicalUnion
+----------------hashAgg[GLOBAL]
+------------------PhysicalDistribute[DistributionSpecHash]
+--------------------hashAgg[LOCAL]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk]
+------------------------------PhysicalProject
+--------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=()
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[catalog_returns]
+------------------------------PhysicalProject
+--------------------------------filter((item.i_category = 'Home'))
+----------------------------------PhysicalOlapScan[item]
+--------------------------PhysicalProject
+----------------------------filter(d_year IN (1998, 1999))
+------------------------------PhysicalOlapScan[date_dim]
+----------------hashAgg[GLOBAL]
+------------------PhysicalDistribute[DistributionSpecHash]
+--------------------hashAgg[LOCAL]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk]
+------------------------------PhysicalProject
+--------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=()
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[store_returns]
+------------------------------PhysicalProject
+--------------------------------filter((item.i_category = 'Home'))
+----------------------------------PhysicalOlapScan[item]
+--------------------------PhysicalProject
+----------------------------filter(d_year IN (1998, 1999))
+------------------------------PhysicalOlapScan[date_dim]
+----------------hashAgg[GLOBAL]
+------------------PhysicalDistribute[DistributionSpecHash]
+--------------------hashAgg[LOCAL]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk]
+------------------------------PhysicalProject
+--------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=()
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[web_returns]
+------------------------------PhysicalProject
+--------------------------------filter((item.i_category = 'Home'))
+----------------------------------PhysicalOlapScan[item]
+--------------------------PhysicalProject
+----------------------------filter(d_year IN (1998, 1999))
+------------------------------PhysicalOlapScan[date_dim]
 --PhysicalResultSink
 ----PhysicalTopN[MERGE_SORT]
 ------PhysicalDistribute[DistributionSpecGather]
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query81.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query81.out
index a477061486b..08951b2ec22 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query81.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query81.out
@@ -22,20 +22,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalTopN[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk]
+------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk]
+----------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk]
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
+--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk]
 ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2
-----------------------hashAgg[GLOBAL]
-------------------------PhysicalDistribute[DistributionSpecHash]
---------------------------hashAgg[LOCAL]
-----------------------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer] apply RFs: RF3
 ------------------PhysicalProject
---------------------PhysicalOlapScan[customer] apply RFs: RF3
---------------PhysicalProject
-----------------filter((customer_address.ca_state = 'CA'))
-------------------PhysicalOlapScan[customer_address]
+--------------------filter((customer_address.ca_state = 'CA'))
+----------------------PhysicalOlapScan[customer_address]
+--------------hashAgg[GLOBAL]
+----------------PhysicalDistribute[DistributionSpecHash]
+------------------hashAgg[LOCAL]
+--------------------PhysicalDistribute[DistributionSpecExecutionAny]
+----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query82.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query82.out
index 7f13e5d3dca..4d01fe02591 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query82.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query82.out
@@ -8,20 +8,20 @@ PhysicalResultSink
 ----------PhysicalDistribute[DistributionSpecHash]
 ------------hashAgg[LOCAL]
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk]
+----------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk]
 ------------------PhysicalProject
 --------------------PhysicalOlapScan[store_sales] apply RFs: RF2
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk]
+--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk]
 ----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk]
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk]
 --------------------------PhysicalProject
 ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100))
 ------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1
 --------------------------PhysicalProject
-----------------------------filter((date_dim.d_date <= '1999-09-07') and (date_dim.d_date >= '1999-07-09'))
-------------------------------PhysicalOlapScan[date_dim]
+----------------------------filter((item.i_current_price <= 47.00) and (item.i_current_price >= 17.00) and i_manufact_id IN (138, 169, 339, 639))
+------------------------------PhysicalOlapScan[item]
 ----------------------PhysicalProject
-------------------------filter((item.i_current_price <= 47.00) and (item.i_current_price >= 17.00) and i_manufact_id IN (138, 169, 339, 639))
---------------------------PhysicalOlapScan[item]
+------------------------filter((date_dim.d_date <= '1999-09-07') and (date_dim.d_date >= '1999-07-09'))
+--------------------------PhysicalOlapScan[date_dim]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query84.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query84.out
index 6237637bf54..78a1b815e9e 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query84.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query84.out
@@ -13,16 +13,16 @@ PhysicalResultSink
 ----------------PhysicalProject
 ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[c_current_hdemo_sk]
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=()
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk]
+--------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=()
 ----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF2
+------------------------------PhysicalOlapScan[customer] apply RFs: RF1 RF2
 ----------------------------PhysicalProject
-------------------------------filter((customer_address.ca_city = 'Oakwood'))
---------------------------------PhysicalOlapScan[customer_address]
+------------------------------PhysicalOlapScan[customer_demographics]
 ------------------------PhysicalProject
---------------------------PhysicalOlapScan[customer_demographics]
+--------------------------filter((customer_address.ca_city = 'Oakwood'))
+----------------------------PhysicalOlapScan[customer_address]
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[household_demographics] apply RFs: RF3
 ----------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query85.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query85.out
index 61b3232d4b7..0de3c1e8764 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query85.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query85.out
@@ -15,7 +15,7 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=((((ca_state IN ('DE', 'FL', 'TX') AND ((web_sales.ws_net_profit >= 100.00) AND (web_sales.ws_net_profit <= 200.00))) OR (ca_state IN ('ID', 'IN', 'ND') AND ((web_sales.ws_net_profit >= 150.00) AND (web_sales.ws_net_profit <= 300.00)))) OR (ca_state IN ('IL', 'MT', 'OH') AND ((web_sales.ws_net_profit >= 50.00) AND (web_sales.ws_net_pro [...]
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk) and (cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status)) otherCondition=((((((cd1.cd_marital_status = 'M') AND (cd1.cd_education_status = '4 yr Degree')) AND ((web_sales.ws_sales_price >= 100.00) AND (web_sales.ws_sales_price <= 150.00))) OR (((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'Second [...]
+------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk) and (cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status)) otherCondition=((((((cd1.cd_marital_status = 'M') AND (cd1.cd_education_status = '4 yr Degree')) AND ((web_sales.ws_sales_price >= 100.00) AND (web_sales.ws_sales_price <= 150.00))) OR (((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'Secondar [...]
 --------------------------------PhysicalProject
 ----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[wr_returning_cdemo_sk]
 ------------------------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query91.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query91.out
index 58cef718bd3..6e532bb76fc 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query91.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query91.out
@@ -15,20 +15,20 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk]
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=()
+------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk]
 --------------------------------PhysicalProject
 ----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[cr_returning_customer_sk]
 ------------------------------------PhysicalProject
---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cr_returned_date_sk]
+--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=()
 ----------------------------------------PhysicalProject
-------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1
+------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 RF2
 ----------------------------------------PhysicalProject
-------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001))
---------------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------------PhysicalOlapScan[call_center]
 ------------------------------------PhysicalProject
 --------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 RF5
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[call_center]
+----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001))
+------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------PhysicalProject
 ------------------------------filter((customer_address.ca_gmt_offset = -6.00))
 --------------------------------PhysicalOlapScan[customer_address]
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query94.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query94.out
index 3de83dace6b..75a20cb4e35 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query94.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query94.out
@@ -7,28 +7,28 @@ PhysicalResultSink
 --------hashAgg[DISTINCT_LOCAL]
 ----------hashAgg[GLOBAL]
 ------------hashAgg[LOCAL]
---------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=()
-----------------PhysicalProject
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk)))
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk]
+--------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=()
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk]
+------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01'))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3
 ----------------------------PhysicalProject
-------------------------------filter((customer_address.ca_state = 'OK'))
---------------------------------PhysicalOlapScan[customer_address]
-------------------------PhysicalProject
---------------------------filter((web_site.web_company_name = 'pri'))
-----------------------------PhysicalOlapScan[web_site]
---------------------PhysicalProject
-----------------------PhysicalOlapScan[web_sales]
-----------------PhysicalProject
-------------------PhysicalOlapScan[web_returns]
+------------------------------PhysicalOlapScan[web_returns]
+--------------------------PhysicalProject
+----------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01'))
+------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------filter((customer_address.ca_state = 'OK'))
+--------------------------PhysicalOlapScan[customer_address]
+------------------PhysicalProject
+--------------------filter((web_site.web_company_name = 'pri'))
+----------------------PhysicalOlapScan[web_site]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out
index 857b1e17442..fce09b1b604 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out
@@ -5,9 +5,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----PhysicalProject
 ------hashJoin[INNER_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number]
 --------PhysicalProject
-----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF6
+----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF7
 --------PhysicalProject
-----------PhysicalOlapScan[web_sales] apply RFs: RF6
+----------PhysicalOlapScan[web_sales] apply RFs: RF7
 --PhysicalResultSink
 ----PhysicalTopN[GATHER_SORT]
 ------hashAgg[DISTINCT_GLOBAL]
@@ -15,29 +15,29 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------hashAgg[DISTINCT_LOCAL]
 ------------hashAgg[GLOBAL]
 --------------hashAgg[LOCAL]
-----------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=()
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=()
+----------------PhysicalProject
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF6 web_site_sk->[ws_web_site_sk]
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF4 web_site_sk->[ws_web_site_sk]
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[ws_ship_addr_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_ship_addr_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk]
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_ship_date_sk]
+----------------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[ws_order_number]
+------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3
+------------------------------hashJoin[RIGHT_SEMI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF2 ws_order_number->[wr_order_number];RF7 ws_order_number->[ws_order_number,ws_order_number]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 RF4
+----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=()
+------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+------------------------------------PhysicalProject
+--------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01'))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF6
 ----------------------------PhysicalProject
-------------------------------filter((customer_address.ca_state = 'NC'))
---------------------------------PhysicalOlapScan[customer_address]
+------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01'))
+--------------------------------PhysicalOlapScan[date_dim]
 ------------------------PhysicalProject
---------------------------filter((web_site.web_company_name = 'pri'))
-----------------------------PhysicalOlapScan[web_site]
---------------------PhysicalCteConsumer ( cteId=CTEId#0 )
-------------------PhysicalProject
---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF6 wr_order_number->[ws_order_number]
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
-----------------------PhysicalProject
-------------------------PhysicalOlapScan[web_returns]
+--------------------------filter((customer_address.ca_state = 'NC'))
+----------------------------PhysicalOlapScan[customer_address]
+--------------------PhysicalProject
+----------------------filter((web_site.web_company_name = 'pri'))
+------------------------PhysicalOlapScan[web_site]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query1.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query1.out
index 8b23005c05a..9da3e4ef561 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query1.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query1.out
@@ -18,20 +18,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalTopN[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk]
+------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ctr_store_sk,ctr_store_sk]
+----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ctr_store_sk]
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
+--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ctr_customer_sk]
 ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 RF2
-----------------------hashAgg[GLOBAL]
-------------------------PhysicalDistribute[DistributionSpecHash]
---------------------------hashAgg[LOCAL]
-----------------------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
 ------------------PhysicalProject
 --------------------filter((store.s_state = 'SD'))
 ----------------------PhysicalOlapScan[store]
---------------PhysicalProject
-----------------PhysicalOlapScan[customer]
+--------------hashAgg[GLOBAL]
+----------------PhysicalDistribute[DistributionSpecHash]
+------------------hashAgg[LOCAL]
+--------------------PhysicalDistribute[DistributionSpecExecutionAny]
+----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query10.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query10.out
index 54469d5dfb5..36a2c69f6b9 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query10.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query10.out
@@ -10,12 +10,12 @@ PhysicalResultSink
 --------------hashAgg[LOCAL]
 ----------------PhysicalProject
 ------------------filter((ifnull($c$1, FALSE) OR ifnull($c$2, FALSE)))
---------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
-----------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk]
+--------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[c_current_addr_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[c_current_cdemo_sk]
+------------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
 --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk]
 ----------------------------------PhysicalProject
 ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk]
@@ -27,16 +27,16 @@ PhysicalResultSink
 ----------------------------------PhysicalProject
 ------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5
 --------------------------------PhysicalProject
-----------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County'))
-------------------------------------PhysicalOlapScan[customer_address]
-----------------------------PhysicalOlapScan[customer_demographics]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
-----------------------------PhysicalProject
-------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001))
---------------------------------PhysicalOlapScan[date_dim]
+----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
+------------------------------------PhysicalProject
+--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
+------------------------------------PhysicalProject
+--------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001))
+----------------------------------------PhysicalOlapScan[date_dim]
+------------------------------PhysicalOlapScan[customer_demographics]
+--------------------------PhysicalProject
+----------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County'))
+------------------------------PhysicalOlapScan[customer_address]
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk]
 --------------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query14.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query14.out
index c400720a8a5..6347d95b71e 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query14.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query14.out
@@ -5,42 +5,48 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----PhysicalProject
 ------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_brand_id = t.brand_id) and (item.i_category_id = t.category_id) and (item.i_class_id = t.class_id)) otherCondition=() build RFs:RF6 i_brand_id->[i_brand_id,i_brand_id,i_brand_id];RF7 i_class_id->[i_class_id,i_class_id,i_class_id];RF8 i_category_id->[i_category_id,i_category_id,i_category_id]
 --------PhysicalIntersect
-----------PhysicalDistribute[DistributionSpecHash]
-------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
+----------hashAgg[GLOBAL]
+------------PhysicalDistribute[DistributionSpecHash]
+--------------hashAgg[LOCAL]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk]
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8
-----------------PhysicalProject
-------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000))
---------------------PhysicalOlapScan[date_dim]
-----------PhysicalDistribute[DistributionSpecHash]
-------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
+----------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000))
+------------------------PhysicalOlapScan[date_dim]
+----------hashAgg[GLOBAL]
+------------PhysicalDistribute[DistributionSpecHash]
+--------------hashAgg[LOCAL]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk]
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8
-----------------PhysicalProject
-------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000))
---------------------PhysicalOlapScan[date_dim]
-----------PhysicalDistribute[DistributionSpecHash]
-------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk]
+----------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000))
+------------------------PhysicalOlapScan[date_dim]
+----------hashAgg[GLOBAL]
+------------PhysicalDistribute[DistributionSpecHash]
+--------------hashAgg[LOCAL]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk]
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8
-----------------PhysicalProject
-------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000))
---------------------PhysicalOlapScan[date_dim]
+----------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000))
+------------------------PhysicalOlapScan[date_dim]
 --------PhysicalProject
 ----------PhysicalOlapScan[item]
 --PhysicalCteAnchor ( cteId=CTEId#1 )
@@ -93,7 +99,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF13 d_date_sk->[ss_sold_date_sk]
 ----------------------------------------PhysicalProject
 ------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[ss_item_sk,ss_item_sk]
---------------------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=()
+--------------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=()
 ----------------------------------------------PhysicalProject
 ------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13
 ----------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF12
@@ -136,13 +142,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------------------------------PhysicalDistribute[DistributionSpecHash]
 ----------------------------------hashAgg[LOCAL]
 ------------------------------------PhysicalProject
---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF18 d_date_sk->[ws_sold_date_sk]
+--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF17 d_date_sk->[ws_sold_date_sk]
 ----------------------------------------PhysicalProject
-------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF17 i_item_sk->[ss_item_sk,ws_item_sk]
---------------------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF16 ws_item_sk->[ss_item_sk]
-----------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF16 RF17
+------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF16 i_item_sk->[ss_item_sk,ws_item_sk]
+--------------------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=()
 ----------------------------------------------PhysicalProject
-------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF17 RF18
+------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF16 RF17
+----------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF16
 --------------------------------------------PhysicalProject
 ----------------------------------------------PhysicalOlapScan[item]
 ----------------------------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query16.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query16.out
index 8b507e61948..c6e88456a7e 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query16.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query16.out
@@ -7,28 +7,28 @@ PhysicalResultSink
 --------hashAgg[DISTINCT_LOCAL]
 ----------hashAgg[GLOBAL]
 ------------hashAgg[LOCAL]
---------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=()
-----------------PhysicalProject
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF3 cs_order_number->[cs_order_number]
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cs_ship_addr_sk]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[cs_ship_addr_sk]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk]
+--------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=()
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk]
+------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3
+----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01'))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 RF3
 ----------------------------PhysicalProject
-------------------------------filter((customer_address.ca_state = 'WV'))
---------------------------------PhysicalOlapScan[customer_address]
-------------------------PhysicalProject
---------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County'))
-----------------------------PhysicalOlapScan[call_center]
---------------------PhysicalProject
-----------------------PhysicalOlapScan[catalog_sales]
-----------------PhysicalProject
-------------------PhysicalOlapScan[catalog_returns]
+------------------------------PhysicalOlapScan[catalog_returns]
+--------------------------PhysicalProject
+----------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01'))
+------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------filter((customer_address.ca_state = 'WV'))
+--------------------------PhysicalOlapScan[customer_address]
+------------------PhysicalProject
+--------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County'))
+----------------------PhysicalOlapScan[call_center]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query23.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query23.out
index 2d3201212e3..873b3445081 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query23.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query23.out
@@ -54,7 +54,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------------PhysicalProject
 ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
 --------------------PhysicalProject
-----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+----------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
 ------------------------PhysicalProject
 --------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
 ----------------------------PhysicalProject
@@ -65,15 +65,15 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
 ------------------------PhysicalOlapScan[date_dim]
 ----------------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]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
 --------------------PhysicalProject
-----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+----------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF4 ws_item_sk->[item_sk]
+------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4
 ------------------------PhysicalProject
 --------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
 ----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF5
 ----------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
-------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 --------------------PhysicalProject
 ----------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
 ------------------------PhysicalOlapScan[date_dim]
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query30.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query30.out
index 6579410922d..429f135a959 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query30.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query30.out
@@ -7,16 +7,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------PhysicalDistribute[DistributionSpecHash]
 ----------hashAgg[LOCAL]
 ------------PhysicalProject
---------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[wr_returning_addr_sk]
+--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[wr_returned_date_sk]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[wr_returned_date_sk]
+------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[wr_returning_addr_sk]
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1
 --------------------PhysicalProject
-----------------------filter((date_dim.d_year = 2002))
-------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalOlapScan[customer_address]
 ----------------PhysicalProject
-------------------PhysicalOlapScan[customer_address]
+------------------filter((date_dim.d_year = 2002))
+--------------------PhysicalOlapScan[date_dim]
 --PhysicalResultSink
 ----PhysicalTopN[MERGE_SORT]
 ------PhysicalDistribute[DistributionSpecGather]
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query34.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query34.out
index ccf88a94822..25429183c8f 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query34.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query34.out
@@ -5,9 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalQuickSort[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk]
-------------PhysicalProject
---------------PhysicalOlapScan[customer] apply RFs: RF3
+----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk]
 ------------filter((dn.cnt <= 20) and (dn.cnt >= 15))
 --------------hashAgg[GLOBAL]
 ----------------PhysicalDistribute[DistributionSpecHash]
@@ -19,7 +17,7 @@ PhysicalResultSink
 ----------------------------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 RF2
+----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3
 --------------------------------PhysicalProject
 ----------------------------------filter((((date_dim.d_dom >= 1) AND (date_dim.d_dom <= 3)) OR ((date_dim.d_dom >= 25) AND (date_dim.d_dom <= 28))) and d_year IN (1998, 1999, 2000))
 ------------------------------------PhysicalOlapScan[date_dim]
@@ -29,4 +27,6 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000'))
 ----------------------------PhysicalOlapScan[household_demographics]
+------------PhysicalProject
+--------------PhysicalOlapScan[customer]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query35.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query35.out
index 1b080af4099..f5f9508f9b6 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query35.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query35.out
@@ -10,12 +10,12 @@ PhysicalResultSink
 --------------hashAgg[LOCAL]
 ----------------PhysicalProject
 ------------------filter((ifnull($c$1, FALSE) OR ifnull($c$2, FALSE)))
---------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
-----------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk]
+--------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk]
+------------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
 --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk]
 ----------------------------------PhysicalProject
 ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk]
@@ -27,16 +27,16 @@ PhysicalResultSink
 ----------------------------------PhysicalProject
 ------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[customer_address]
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[customer_demographics]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
-----------------------------PhysicalProject
-------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001))
---------------------------------PhysicalOlapScan[date_dim]
+----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
+------------------------------------PhysicalProject
+--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
+------------------------------------PhysicalProject
+--------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001))
+----------------------------------------PhysicalOlapScan[date_dim]
+------------------------------PhysicalProject
+--------------------------------PhysicalOlapScan[customer_address]
+--------------------------PhysicalProject
+----------------------------PhysicalOlapScan[customer_demographics]
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk]
 --------------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query37.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query37.out
index 8a8b1f0dcfd..756dbd1de4e 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query37.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query37.out
@@ -8,20 +8,20 @@ PhysicalResultSink
 ----------PhysicalDistribute[DistributionSpecHash]
 ------------hashAgg[LOCAL]
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk]
+----------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk]
 ------------------PhysicalProject
 --------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk]
+--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk]
 ----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk]
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk]
 --------------------------PhysicalProject
 ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100))
 ------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1
 --------------------------PhysicalProject
-----------------------------filter((date_dim.d_date <= '1999-04-22') and (date_dim.d_date >= '1999-02-21'))
-------------------------------PhysicalOlapScan[date_dim]
+----------------------------filter((item.i_current_price <= 75.00) and (item.i_current_price >= 45.00) and i_manufact_id IN (1000, 707, 747, 856))
+------------------------------PhysicalOlapScan[item]
 ----------------------PhysicalProject
-------------------------filter((item.i_current_price <= 75.00) and (item.i_current_price >= 45.00) and i_manufact_id IN (1000, 707, 747, 856))
---------------------------PhysicalOlapScan[item]
+------------------------filter((date_dim.d_date <= '1999-04-22') and (date_dim.d_date >= '1999-02-21'))
+--------------------------PhysicalOlapScan[date_dim]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query39.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query39.out
index 130590e1ee8..714a012c9f2 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query39.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query39.out
@@ -4,21 +4,23 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --PhysicalCteProducer ( cteId=CTEId#0 )
 ----PhysicalProject
 ------filter((if((mean = 0.0), 0.0, (stdev / mean)) > 1.0))
---------hashAgg[LOCAL]
-----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffle] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk]
+--------hashAgg[GLOBAL]
+----------PhysicalDistribute[DistributionSpecHash]
+------------hashAgg[LOCAL]
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk]
+----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk]
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk]
-----------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2
+--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 w_warehouse_sk->[inv_warehouse_sk]
 ----------------------PhysicalProject
-------------------------PhysicalOlapScan[item]
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk]
+--------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2
+--------------------------PhysicalProject
+----------------------------PhysicalOlapScan[item]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[warehouse]
 ------------------PhysicalProject
 --------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2))
 ----------------------PhysicalOlapScan[date_dim]
---------------PhysicalProject
-----------------PhysicalOlapScan[warehouse]
 --PhysicalResultSink
 ----PhysicalQuickSort[MERGE_SORT]
 ------PhysicalDistribute[DistributionSpecGather]
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query5.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query5.out
index 917f29d0972..fde3b7f2fa2 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query5.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query5.out
@@ -35,9 +35,9 @@ PhysicalResultSink
 ------------------------PhysicalDistribute[DistributionSpecHash]
 --------------------------hashAgg[LOCAL]
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF3 cp_catalog_page_sk->[cr_catalog_page_sk,cs_catalog_page_sk]
+------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cr_returned_date_sk,cs_sold_date_sk]
 --------------------------------PhysicalProject
-----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk,cs_sold_date_sk]
+----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF2 cp_catalog_page_sk->[cr_catalog_page_sk,cs_catalog_page_sk]
 ------------------------------------PhysicalUnion
 --------------------------------------PhysicalDistribute[DistributionSpecHash]
 ----------------------------------------PhysicalProject
@@ -46,10 +46,10 @@ PhysicalResultSink
 ----------------------------------------PhysicalProject
 ------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3
 ------------------------------------PhysicalProject
---------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19'))
-----------------------------------------PhysicalOlapScan[date_dim]
+--------------------------------------PhysicalOlapScan[catalog_page]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_page]
+----------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19'))
+------------------------------------PhysicalOlapScan[date_dim]
 --------------------PhysicalProject
 ----------------------hashAgg[GLOBAL]
 ------------------------PhysicalDistribute[DistributionSpecHash]
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query64.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query64.out
index eaeb46754a7..edaca216092 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query64.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query64.out
@@ -3,88 +3,90 @@
 PhysicalCteAnchor ( cteId=CTEId#1 )
 --PhysicalCteProducer ( cteId=CTEId#1 )
 ----PhysicalProject
-------hashAgg[LOCAL]
---------PhysicalProject
-----------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF19 i_item_sk->[cr_item_sk,cs_item_sk,sr_item_sk,ss_item_sk]
+------hashAgg[GLOBAL]
+--------PhysicalDistribute[DistributionSpecHash]
+----------hashAgg[LOCAL]
 ------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd2.hd_income_band_sk = ib2.ib_income_band_sk)) otherCondition=() build RFs:RF18 ib_income_band_sk->[hd_income_band_sk]
+--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF19 i_item_sk->[cr_item_sk,cs_item_sk,sr_item_sk,ss_item_sk]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd1.hd_income_band_sk = ib1.ib_income_band_sk)) otherCondition=() build RFs:RF17 ib_income_band_sk->[hd_income_band_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd2.hd_income_band_sk = ib2.ib_income_band_sk)) otherCondition=() build RFs:RF18 ib_income_band_sk->[hd_income_band_sk]
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = ad2.ca_address_sk)) otherCondition=() build RFs:RF16 ca_address_sk->[c_current_addr_sk]
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd1.hd_income_band_sk = ib1.ib_income_band_sk)) otherCondition=() build RFs:RF17 ib_income_band_sk->[hd_income_band_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = ad1.ca_address_sk)) otherCondition=() build RFs:RF15 ca_address_sk->[ss_addr_sk]
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = ad2.ca_address_sk)) otherCondition=() build RFs:RF16 ca_address_sk->[c_current_addr_sk]
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_hdemo_sk = hd2.hd_demo_sk)) otherCondition=() build RFs:RF14 hd_demo_sk->[c_current_hdemo_sk]
+------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = ad1.ca_address_sk)) otherCondition=() build RFs:RF15 ca_address_sk->[ss_addr_sk]
 --------------------------------PhysicalProject
-----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = hd1.hd_demo_sk)) otherCondition=() build RFs:RF13 hd_demo_sk->[ss_hdemo_sk]
+----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_hdemo_sk = hd2.hd_demo_sk)) otherCondition=() build RFs:RF14 hd_demo_sk->[c_current_hdemo_sk]
 ------------------------------------PhysicalProject
---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF12 p_promo_sk->[ss_promo_sk]
+--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = hd1.hd_demo_sk)) otherCondition=() build RFs:RF13 hd_demo_sk->[ss_hdemo_sk]
 ----------------------------------------PhysicalProject
-------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=(( not (cd_marital_status = cd_marital_status))) build RFs:RF11 cd_demo_sk->[c_current_cdemo_sk]
+------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF12 p_promo_sk->[ss_promo_sk]
 --------------------------------------------PhysicalProject
-----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF10 cd_demo_sk->[ss_cdemo_sk]
+----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=(( not (cd_marital_status = cd_marital_status))) build RFs:RF11 cd_demo_sk->[c_current_cdemo_sk]
 ------------------------------------------------PhysicalProject
---------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_first_shipto_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[c_first_shipto_date_sk]
+--------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF10 cd_demo_sk->[ss_cdemo_sk]
 ----------------------------------------------------PhysicalProject
-------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_first_sales_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[c_first_sales_date_sk]
+------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_first_shipto_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[c_first_shipto_date_sk]
 --------------------------------------------------------PhysicalProject
-----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF7 s_store_sk->[ss_store_sk]
+----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_first_sales_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[c_first_sales_date_sk]
 ------------------------------------------------------------PhysicalProject
---------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk]
+--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF7 s_store_sk->[ss_store_sk]
 ----------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF5 cs_item_sk->[sr_item_sk,ss_item_sk]
+------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk]
 --------------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk]
+----------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk]
 ------------------------------------------------------------------------PhysicalProject
---------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_item_sk->[ss_item_sk];RF3 sr_ticket_number->[ss_ticket_number]
+--------------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF4 cs_item_sk->[sr_item_sk,ss_item_sk]
 ----------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF4 RF5 RF6 RF7 RF10 RF12 RF13 RF15 RF19
+------------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_item_sk->[ss_item_sk];RF3 sr_ticket_number->[ss_ticket_number]
+--------------------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF4 RF5 RF6 RF7 RF10 RF12 RF13 RF15 RF19
+--------------------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF4 RF19
 ----------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF5 RF19
+------------------------------------------------------------------------------filter((sale > (2 * refund)))
+--------------------------------------------------------------------------------hashAgg[GLOBAL]
+----------------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
+------------------------------------------------------------------------------------hashAgg[LOCAL]
+--------------------------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cr_item_sk->[cs_item_sk];RF1 cr_order_number->[cs_order_number]
+------------------------------------------------------------------------------------------PhysicalProject
+--------------------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF19
+------------------------------------------------------------------------------------------PhysicalProject
+--------------------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF19
 ------------------------------------------------------------------------PhysicalProject
 --------------------------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF8 RF9 RF11 RF14 RF16
 --------------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------------filter((sale > (2 * refund)))
-------------------------------------------------------------------------hashAgg[GLOBAL]
---------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
-----------------------------------------------------------------------------hashAgg[LOCAL]
-------------------------------------------------------------------------------PhysicalProject
---------------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cr_item_sk->[cs_item_sk];RF1 cr_order_number->[cs_order_number]
-----------------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF19
-----------------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF19
+----------------------------------------------------------------------filter(d_year IN (2001, 2002))
+------------------------------------------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------filter(d_year IN (2001, 2002))
---------------------------------------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------------------------------------PhysicalOlapScan[store]
 ------------------------------------------------------------PhysicalProject
---------------------------------------------------------------PhysicalOlapScan[store]
+--------------------------------------------------------------PhysicalOlapScan[date_dim]
 --------------------------------------------------------PhysicalProject
 ----------------------------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------------------------------PhysicalProject
-------------------------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------------------------PhysicalOlapScan[customer_demographics]
 ------------------------------------------------PhysicalProject
 --------------------------------------------------PhysicalOlapScan[customer_demographics]
 --------------------------------------------PhysicalProject
-----------------------------------------------PhysicalOlapScan[customer_demographics]
+----------------------------------------------PhysicalOlapScan[promotion]
 ----------------------------------------PhysicalProject
-------------------------------------------PhysicalOlapScan[promotion]
+------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF17
 ------------------------------------PhysicalProject
---------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF17
+--------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF18
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF18
+----------------------------------PhysicalOlapScan[customer_address]
 ----------------------------PhysicalProject
 ------------------------------PhysicalOlapScan[customer_address]
 ------------------------PhysicalProject
---------------------------PhysicalOlapScan[customer_address]
+--------------------------PhysicalOlapScan[income_band]
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[income_band]
 ----------------PhysicalProject
-------------------PhysicalOlapScan[income_band]
-------------PhysicalProject
---------------filter((item.i_current_price <= 33.00) and (item.i_current_price >= 24.00) and i_color IN ('blanched', 'brown', 'burlywood', 'chocolate', 'drab', 'medium'))
-----------------PhysicalOlapScan[item]
+------------------filter((item.i_current_price <= 33.00) and (item.i_current_price >= 24.00) and i_color IN ('blanched', 'brown', 'burlywood', 'chocolate', 'drab', 'medium'))
+--------------------PhysicalOlapScan[item]
 --PhysicalResultSink
 ----PhysicalQuickSort[MERGE_SORT]
 ------PhysicalDistribute[DistributionSpecGather]
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query65.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query65.out
index 6d4d80b4e57..4dd67a91e1e 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query65.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query65.out
@@ -5,11 +5,11 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalTopN[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk]
+----------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF4 ss_store_sk->[s_store_sk,ss_store_sk]
 ------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk,ss_store_sk]
+--------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF2 ss_store_sk->[ss_store_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk]
 --------------------hashAgg[GLOBAL]
 ----------------------PhysicalDistribute[DistributionSpecHash]
 ------------------------hashAgg[LOCAL]
@@ -20,22 +20,22 @@ PhysicalResultSink
 ------------------------------PhysicalProject
 --------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221))
 ----------------------------------PhysicalOlapScan[date_dim]
+--------------------PhysicalProject
+----------------------PhysicalOlapScan[store] apply RFs: RF4
+----------------PhysicalProject
+------------------PhysicalOlapScan[item]
+------------hashAgg[GLOBAL]
+--------------PhysicalDistribute[DistributionSpecHash]
+----------------hashAgg[LOCAL]
+------------------PhysicalProject
 --------------------hashAgg[GLOBAL]
 ----------------------PhysicalDistribute[DistributionSpecHash]
 ------------------------hashAgg[LOCAL]
 --------------------------PhysicalProject
-----------------------------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 RF3
---------------------------------------PhysicalProject
-----------------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221))
-------------------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalProject
-------------------PhysicalOlapScan[store]
-------------PhysicalProject
---------------PhysicalOlapScan[item]
+----------------------------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 <= 1232) and (date_dim.d_month_seq >= 1221))
+----------------------------------PhysicalOlapScan[date_dim]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query69.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query69.out
index 211e2788130..af6d7e8c85a 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query69.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query69.out
@@ -11,9 +11,9 @@ PhysicalResultSink
 ----------------PhysicalProject
 ------------------hashJoin[LEFT_ANTI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk]
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[c_current_addr_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk]
+--------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[c_current_cdemo_sk]
 ----------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
 ------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk]
 --------------------------------PhysicalProject
@@ -33,10 +33,10 @@ PhysicalResultSink
 ------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000))
 --------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------PhysicalProject
-------------------------------filter(ca_state IN ('MI', 'TX', 'VA'))
---------------------------------PhysicalOlapScan[customer_address]
+------------------------------PhysicalOlapScan[customer_demographics]
 ------------------------PhysicalProject
---------------------------PhysicalOlapScan[customer_demographics]
+--------------------------filter(ca_state IN ('MI', 'TX', 'VA'))
+----------------------------PhysicalOlapScan[customer_address]
 --------------------PhysicalProject
 ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk]
 ------------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query73.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query73.out
index 54b486b3ff0..a7655a2c3f2 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query73.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query73.out
@@ -5,9 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalQuickSort[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk]
-------------PhysicalProject
---------------PhysicalOlapScan[customer] apply RFs: RF3
+----------hashJoin[INNER_JOIN broadcast] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk]
 ------------filter((dj.cnt <= 5) and (dj.cnt >= 1))
 --------------hashAgg[GLOBAL]
 ----------------PhysicalDistribute[DistributionSpecHash]
@@ -19,7 +17,7 @@ PhysicalResultSink
 ----------------------------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 RF2
+----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3
 --------------------------------PhysicalProject
 ----------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (2000, 2001, 2002))
 ------------------------------------PhysicalOlapScan[date_dim]
@@ -29,4 +27,6 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.0) and hd_buy_potential IN ('501-1000', 'Unknown'))
 ----------------------------PhysicalOlapScan[household_demographics]
+------------PhysicalProject
+--------------PhysicalOlapScan[customer]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query74.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query74.out
index c04f37e8a86..58e91a6a35d 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query74.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query74.out
@@ -35,15 +35,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalTopN[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL)))
+------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL)))
 --------------PhysicalProject
-----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000))
-------------------PhysicalCteConsumer ( cteId=CTEId#0 )
---------------PhysicalProject
-----------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=()
-------------------PhysicalProject
---------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0))
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=()
 ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=()
 --------------------PhysicalProject
 ----------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000))
@@ -51,4 +45,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------------------PhysicalProject
 ----------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0.0))
 ------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+------------------PhysicalProject
+--------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0))
+----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+--------------PhysicalProject
+----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000))
+------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query75.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query75.out
index a7d307daa5b..dded6a5bb0e 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query75.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query75.out
@@ -6,60 +6,65 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecHash]
 --------hashAgg[LOCAL]
 ----------hashAgg[GLOBAL]
-------------PhysicalDistribute[DistributionSpecHash]
---------------hashAgg[LOCAL]
-----------------PhysicalUnion
-------------------PhysicalDistribute[DistributionSpecExecutionAny]
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=()
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_returns]
-----------------------------PhysicalProject
-------------------------------filter((item.i_category = 'Home'))
---------------------------------PhysicalOlapScan[item]
-------------------------PhysicalProject
---------------------------filter(d_year IN (1998, 1999))
-----------------------------PhysicalOlapScan[date_dim]
-------------------PhysicalDistribute[DistributionSpecExecutionAny]
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=()
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[store_returns]
-----------------------------PhysicalProject
-------------------------------filter((item.i_category = 'Home'))
---------------------------------PhysicalOlapScan[item]
-------------------------PhysicalProject
---------------------------filter(d_year IN (1998, 1999))
-----------------------------PhysicalOlapScan[date_dim]
-------------------PhysicalDistribute[DistributionSpecExecutionAny]
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=()
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_returns]
-----------------------------PhysicalProject
-------------------------------filter((item.i_category = 'Home'))
---------------------------------PhysicalOlapScan[item]
-------------------------PhysicalProject
---------------------------filter(d_year IN (1998, 1999))
-----------------------------PhysicalOlapScan[date_dim]
+------------hashAgg[LOCAL]
+--------------PhysicalUnion
+----------------hashAgg[GLOBAL]
+------------------PhysicalDistribute[DistributionSpecHash]
+--------------------hashAgg[LOCAL]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk]
+------------------------------PhysicalProject
+--------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=()
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[catalog_returns]
+------------------------------PhysicalProject
+--------------------------------filter((item.i_category = 'Home'))
+----------------------------------PhysicalOlapScan[item]
+--------------------------PhysicalProject
+----------------------------filter(d_year IN (1998, 1999))
+------------------------------PhysicalOlapScan[date_dim]
+----------------hashAgg[GLOBAL]
+------------------PhysicalDistribute[DistributionSpecHash]
+--------------------hashAgg[LOCAL]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk]
+------------------------------PhysicalProject
+--------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=()
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[store_returns]
+------------------------------PhysicalProject
+--------------------------------filter((item.i_category = 'Home'))
+----------------------------------PhysicalOlapScan[item]
+--------------------------PhysicalProject
+----------------------------filter(d_year IN (1998, 1999))
+------------------------------PhysicalOlapScan[date_dim]
+----------------hashAgg[GLOBAL]
+------------------PhysicalDistribute[DistributionSpecHash]
+--------------------hashAgg[LOCAL]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk]
+------------------------------PhysicalProject
+--------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=()
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[web_returns]
+------------------------------PhysicalProject
+--------------------------------filter((item.i_category = 'Home'))
+----------------------------------PhysicalOlapScan[item]
+--------------------------PhysicalProject
+----------------------------filter(d_year IN (1998, 1999))
+------------------------------PhysicalOlapScan[date_dim]
 --PhysicalResultSink
 ----PhysicalTopN[MERGE_SORT]
 ------PhysicalDistribute[DistributionSpecGather]
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query81.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query81.out
index 763dca10095..520a159f3c1 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query81.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query81.out
@@ -22,20 +22,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalTopN[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk]
+------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk]
+----------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk]
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
+--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk]
 ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2
-----------------------hashAgg[GLOBAL]
-------------------------PhysicalDistribute[DistributionSpecHash]
---------------------------hashAgg[LOCAL]
-----------------------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer] apply RFs: RF3
 ------------------PhysicalProject
---------------------PhysicalOlapScan[customer] apply RFs: RF3
---------------PhysicalProject
-----------------filter((customer_address.ca_state = 'CA'))
-------------------PhysicalOlapScan[customer_address]
+--------------------filter((customer_address.ca_state = 'CA'))
+----------------------PhysicalOlapScan[customer_address]
+--------------hashAgg[GLOBAL]
+----------------PhysicalDistribute[DistributionSpecHash]
+------------------hashAgg[LOCAL]
+--------------------PhysicalDistribute[DistributionSpecExecutionAny]
+----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query82.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query82.out
index 7f13e5d3dca..4d01fe02591 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query82.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query82.out
@@ -8,20 +8,20 @@ PhysicalResultSink
 ----------PhysicalDistribute[DistributionSpecHash]
 ------------hashAgg[LOCAL]
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk]
+----------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk]
 ------------------PhysicalProject
 --------------------PhysicalOlapScan[store_sales] apply RFs: RF2
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk]
+--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk]
 ----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = inventory.inv_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk]
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk]
 --------------------------PhysicalProject
 ----------------------------filter((inventory.inv_quantity_on_hand <= 500) and (inventory.inv_quantity_on_hand >= 100))
 ------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1
 --------------------------PhysicalProject
-----------------------------filter((date_dim.d_date <= '1999-09-07') and (date_dim.d_date >= '1999-07-09'))
-------------------------------PhysicalOlapScan[date_dim]
+----------------------------filter((item.i_current_price <= 47.00) and (item.i_current_price >= 17.00) and i_manufact_id IN (138, 169, 339, 639))
+------------------------------PhysicalOlapScan[item]
 ----------------------PhysicalProject
-------------------------filter((item.i_current_price <= 47.00) and (item.i_current_price >= 17.00) and i_manufact_id IN (138, 169, 339, 639))
---------------------------PhysicalOlapScan[item]
+------------------------filter((date_dim.d_date <= '1999-09-07') and (date_dim.d_date >= '1999-07-09'))
+--------------------------PhysicalOlapScan[date_dim]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query84.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query84.out
index f4ce4f79129..b6aab0b1439 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query84.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query84.out
@@ -13,16 +13,16 @@ PhysicalResultSink
 ----------------PhysicalProject
 ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[c_current_hdemo_sk]
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[c_current_cdemo_sk]
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk]
+--------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[c_current_cdemo_sk]
 ----------------------------PhysicalProject
 ------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 RF2
 ----------------------------PhysicalProject
-------------------------------filter((customer_address.ca_city = 'Oakwood'))
---------------------------------PhysicalOlapScan[customer_address]
+------------------------------PhysicalOlapScan[customer_demographics]
 ------------------------PhysicalProject
---------------------------PhysicalOlapScan[customer_demographics]
+--------------------------filter((customer_address.ca_city = 'Oakwood'))
+----------------------------PhysicalOlapScan[customer_address]
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[household_demographics] apply RFs: RF3
 ----------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query85.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query85.out
index 17546d17704..54835db0dc8 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query85.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query85.out
@@ -15,7 +15,7 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=((((ca_state IN ('DE', 'FL', 'TX') AND ((web_sales.ws_net_profit >= 100.00) AND (web_sales.ws_net_profit <= 200.00))) OR (ca_state IN ('ID', 'IN', 'ND') AND ((web_sales.ws_net_profit >= 150.00) AND (web_sales.ws_net_profit <= 300.00)))) OR (ca_state IN ('IL', 'MT', 'OH') AND ((web_sales.ws_net_profit >= 50.00) AND (web_sales.ws_net_pro [...]
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk) and (cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status)) otherCondition=((((((cd1.cd_marital_status = 'M') AND (cd1.cd_education_status = '4 yr Degree')) AND ((web_sales.ws_sales_price >= 100.00) AND (web_sales.ws_sales_price <= 150.00))) OR (((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'Second [...]
+------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk) and (cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status)) otherCondition=((((((cd1.cd_marital_status = 'M') AND (cd1.cd_education_status = '4 yr Degree')) AND ((web_sales.ws_sales_price >= 100.00) AND (web_sales.ws_sales_price <= 150.00))) OR (((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'Secondar [...]
 --------------------------------PhysicalProject
 ----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[wr_returning_cdemo_sk]
 ------------------------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query91.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query91.out
index 3e02cec680b..d165c286c01 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query91.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query91.out
@@ -15,20 +15,20 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk]
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cr_call_center_sk]
+------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk]
 --------------------------------PhysicalProject
 ----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[cr_returning_customer_sk]
 ------------------------------------PhysicalProject
---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cr_returned_date_sk]
+--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF0 cc_call_center_sk->[cr_call_center_sk]
 ----------------------------------------PhysicalProject
 ------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1 RF2
 ----------------------------------------PhysicalProject
-------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001))
---------------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------------PhysicalOlapScan[call_center]
 ------------------------------------PhysicalProject
 --------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 RF5
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[call_center]
+----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001))
+------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------PhysicalProject
 ------------------------------filter((customer_address.ca_gmt_offset = -6.00))
 --------------------------------PhysicalOlapScan[customer_address]
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query94.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query94.out
index 083a8bb4d7b..75a20cb4e35 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query94.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query94.out
@@ -7,28 +7,28 @@ PhysicalResultSink
 --------hashAgg[DISTINCT_LOCAL]
 ----------hashAgg[GLOBAL]
 ------------hashAgg[LOCAL]
---------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=()
-----------------PhysicalProject
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF3 ws_order_number->[ws_order_number]
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk]
+--------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=()
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk]
+------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01'))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3
 ----------------------------PhysicalProject
-------------------------------filter((customer_address.ca_state = 'OK'))
---------------------------------PhysicalOlapScan[customer_address]
-------------------------PhysicalProject
---------------------------filter((web_site.web_company_name = 'pri'))
-----------------------------PhysicalOlapScan[web_site]
---------------------PhysicalProject
-----------------------PhysicalOlapScan[web_sales]
-----------------PhysicalProject
-------------------PhysicalOlapScan[web_returns]
+------------------------------PhysicalOlapScan[web_returns]
+--------------------------PhysicalProject
+----------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01'))
+------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------filter((customer_address.ca_state = 'OK'))
+--------------------------PhysicalOlapScan[customer_address]
+------------------PhysicalProject
+--------------------filter((web_site.web_company_name = 'pri'))
+----------------------PhysicalOlapScan[web_site]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out
index 22a8e25293f..aaaba243279 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out
@@ -5,9 +5,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----PhysicalProject
 ------hashJoin[INNER_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number];RF1 ws_order_number->[ws_order_number]
 --------PhysicalProject
-----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF12 RF13
+----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF14 RF15
 --------PhysicalProject
-----------PhysicalOlapScan[web_sales] apply RFs: RF12 RF13
+----------PhysicalOlapScan[web_sales] apply RFs: RF14 RF15
 --PhysicalResultSink
 ----PhysicalTopN[GATHER_SORT]
 ------hashAgg[DISTINCT_GLOBAL]
@@ -15,29 +15,29 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------hashAgg[DISTINCT_LOCAL]
 ------------hashAgg[GLOBAL]
 --------------hashAgg[LOCAL]
-----------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF10 wr_order_number->[ws_order_number,ws_order_number];RF11 wr_order_number->[ws_order_number,ws_order_number]
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=()
+----------------PhysicalProject
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF12 web_site_sk->[ws_web_site_sk];RF13 web_site_sk->[ws_web_site_sk]
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF8 web_site_sk->[ws_web_site_sk];RF9 web_site_sk->[ws_web_site_sk]
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_ship_addr_sk];RF11 ca_address_sk->[ws_ship_addr_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[ws_ship_addr_sk];RF7 ca_address_sk->[ws_ship_addr_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_ship_date_sk];RF5 d_date_sk->[ws_ship_date_sk]
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_ship_date_sk];RF9 d_date_sk->[ws_ship_date_sk]
+----------------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF6 ws_order_number->[ws_order_number];RF7 ws_order_number->[ws_order_number]
+------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 RF7
+------------------------------hashJoin[RIGHT_SEMI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[wr_order_number];RF5 ws_order_number->[wr_order_number];RF14 ws_order_number->[ws_order_number,ws_order_number];RF15 ws_order_number->[ws_order_number,ws_order_number]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF6 RF7 RF8 RF9 RF10 RF11
+----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF2 wr_order_number->[ws_order_number];RF3 wr_order_number->[ws_order_number]
+------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 RF3
+------------------------------------PhysicalProject
+--------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 RF5
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01'))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 RF10 RF11 RF12 RF13
 ----------------------------PhysicalProject
-------------------------------filter((customer_address.ca_state = 'NC'))
---------------------------------PhysicalOlapScan[customer_address]
+------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01'))
+--------------------------------PhysicalOlapScan[date_dim]
 ------------------------PhysicalProject
---------------------------filter((web_site.web_company_name = 'pri'))
-----------------------------PhysicalOlapScan[web_site]
---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF10 RF11
-------------------PhysicalProject
---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF12 wr_order_number->[ws_order_number,ws_order_number];RF13 wr_order_number->[ws_order_number,ws_order_number]
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
-----------------------PhysicalProject
-------------------------PhysicalOlapScan[web_returns]
+--------------------------filter((customer_address.ca_state = 'NC'))
+----------------------------PhysicalOlapScan[customer_address]
+--------------------PhysicalProject
+----------------------filter((web_site.web_company_name = 'pri'))
+------------------------PhysicalOlapScan[web_site]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query2.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query2.out
index 37ce4e601a4..5888221893d 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query2.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query2.out
@@ -21,7 +21,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalQuickSort[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffle] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=()
+------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=()
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN shuffle] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq]
 ------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query23.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query23.out
index 42749d017c8..3ac1b889aec 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query23.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query23.out
@@ -51,31 +51,30 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------PhysicalDistribute[DistributionSpecGather]
 ------------hashAgg[LOCAL]
 --------------PhysicalUnion
-----------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------PhysicalProject
---------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
-----------------------PhysicalProject
-------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 ----------------PhysicalProject
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF4 cs_item_sk->[item_sk]
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4
+--------------------PhysicalProject
+----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
+----------------PhysicalProject
+------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF6 ws_item_sk->[item_sk]
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6
 --------------------PhysicalProject
 ----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
 ------------------------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]
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
 ----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF5
 ----------------------------PhysicalProject
 ------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
 --------------------------------PhysicalOlapScan[date_dim]
 ------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
---------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query34.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query34.out
index eb76afa75d1..bb286ee190e 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query34.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query34.out
@@ -5,7 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalQuickSort[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk]
+----------hashJoin[INNER_JOIN shuffle] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk]
 ------------PhysicalProject
 --------------PhysicalOlapScan[customer] apply RFs: RF3
 ------------filter((dn.cnt <= 20) and (dn.cnt >= 15))
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query64.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query64.out
index efa64cc77c5..aa03eafaa47 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query64.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query64.out
@@ -52,25 +52,25 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 --------------------------------------------------PhysicalProject
 ----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = hd1.hd_demo_sk)) otherCondition=()
 ------------------------------------------------------PhysicalProject
---------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk]
+--------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF3 cs_item_sk->[ss_item_sk]
 ----------------------------------------------------------PhysicalProject
-------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[ss_item_sk]
+------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk]
 --------------------------------------------------------------PhysicalProject
 ----------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF8
 --------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------filter((sale > (2 * refund)))
-------------------------------------------------------------------hashAgg[GLOBAL]
---------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
-----------------------------------------------------------------------hashAgg[LOCAL]
-------------------------------------------------------------------------PhysicalProject
---------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=()
-----------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8
-----------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF8
+----------------------------------------------------------------filter(d_year IN (2001, 2002))
+------------------------------------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------------------------------------PhysicalProject
-------------------------------------------------------------filter(d_year IN (2001, 2002))
---------------------------------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------------------------------filter((sale > (2 * refund)))
+--------------------------------------------------------------hashAgg[GLOBAL]
+----------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
+------------------------------------------------------------------hashAgg[LOCAL]
+--------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=()
+------------------------------------------------------------------------PhysicalProject
+--------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8
+------------------------------------------------------------------------PhysicalProject
+--------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF8
 ------------------------------------------------------PhysicalProject
 --------------------------------------------------------PhysicalOlapScan[household_demographics]
 --------------------------------------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query74.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query74.out
index 30aa2cbdd80..d58dde1f36c 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query74.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query74.out
@@ -35,7 +35,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalTopN[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL)))
+------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL)))
+--------------PhysicalProject
+----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000))
+------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=()
 ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=()
@@ -48,7 +51,4 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------------------PhysicalProject
 --------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0))
 ----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
---------------PhysicalProject
-----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000))
-------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query9.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query9.out
index f159ed97647..06cd8f92785 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query9.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query9.out
@@ -1,8 +1,8 @@
 -- This file is automatically generated. You should know what you did if you want to edit this
 -- !ds_shape_9 --
 PhysicalResultSink
---PhysicalProject
-----NestedLoopJoin[CROSS_JOIN]
+--PhysicalDistribute[DistributionSpecGather]
+----PhysicalProject
 ------NestedLoopJoin[CROSS_JOIN]
 --------NestedLoopJoin[CROSS_JOIN]
 ----------NestedLoopJoin[CROSS_JOIN]
@@ -16,17 +16,24 @@ PhysicalResultSink
 --------------------------NestedLoopJoin[CROSS_JOIN]
 ----------------------------NestedLoopJoin[CROSS_JOIN]
 ------------------------------NestedLoopJoin[CROSS_JOIN]
---------------------------------PhysicalProject
-----------------------------------NestedLoopJoin[CROSS_JOIN]
-------------------------------------hashAgg[GLOBAL]
---------------------------------------PhysicalDistribute[DistributionSpecGather]
-----------------------------------------hashAgg[LOCAL]
-------------------------------------------PhysicalProject
---------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
-----------------------------------------------PhysicalOlapScan[store_sales]
-------------------------------------PhysicalProject
---------------------------------------filter((reason.r_reason_sk = 1))
-----------------------------------------PhysicalOlapScan[reason]
+--------------------------------NestedLoopJoin[CROSS_JOIN]
+----------------------------------PhysicalProject
+------------------------------------NestedLoopJoin[CROSS_JOIN]
+--------------------------------------PhysicalProject
+----------------------------------------filter((reason.r_reason_sk = 1))
+------------------------------------------PhysicalOlapScan[reason]
+--------------------------------------hashAgg[GLOBAL]
+----------------------------------------PhysicalDistribute[DistributionSpecGather]
+------------------------------------------hashAgg[LOCAL]
+--------------------------------------------PhysicalProject
+----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+------------------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------hashAgg[GLOBAL]
+------------------------------------PhysicalDistribute[DistributionSpecGather]
+--------------------------------------hashAgg[LOCAL]
+----------------------------------------PhysicalProject
+------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+--------------------------------------------PhysicalOlapScan[store_sales]
 --------------------------------hashAgg[GLOBAL]
 ----------------------------------PhysicalDistribute[DistributionSpecGather]
 ------------------------------------hashAgg[LOCAL]
@@ -37,7 +44,7 @@ PhysicalResultSink
 --------------------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------------------hashAgg[LOCAL]
 ------------------------------------PhysicalProject
---------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+--------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
 ----------------------------------------PhysicalOlapScan[store_sales]
 ----------------------------hashAgg[GLOBAL]
 ------------------------------PhysicalDistribute[DistributionSpecGather]
@@ -55,7 +62,7 @@ PhysicalResultSink
 --------------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------------hashAgg[LOCAL]
 ------------------------------PhysicalProject
---------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
+--------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
 ----------------------------------PhysicalOlapScan[store_sales]
 ----------------------hashAgg[GLOBAL]
 ------------------------PhysicalDistribute[DistributionSpecGather]
@@ -73,7 +80,7 @@ PhysicalResultSink
 --------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------hashAgg[LOCAL]
 ------------------------PhysicalProject
---------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
+--------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
 ----------------------------PhysicalOlapScan[store_sales]
 ----------------hashAgg[GLOBAL]
 ------------------PhysicalDistribute[DistributionSpecGather]
@@ -91,7 +98,7 @@ PhysicalResultSink
 --------------PhysicalDistribute[DistributionSpecGather]
 ----------------hashAgg[LOCAL]
 ------------------PhysicalProject
---------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
+--------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
 ----------------------PhysicalOlapScan[store_sales]
 ----------hashAgg[GLOBAL]
 ------------PhysicalDistribute[DistributionSpecGather]
@@ -105,10 +112,4 @@ PhysicalResultSink
 --------------PhysicalProject
 ----------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
 ------------------PhysicalOlapScan[store_sales]
-------hashAgg[GLOBAL]
---------PhysicalDistribute[DistributionSpecGather]
-----------hashAgg[LOCAL]
-------------PhysicalProject
---------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
-----------------PhysicalOlapScan[store_sales]
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query2.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query2.out
index 541ee756a8e..988b288ebb8 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query2.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query2.out
@@ -21,7 +21,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalQuickSort[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffle] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=()
+------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=()
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN shuffle] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq]
 ------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query23.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query23.out
index 566c5c19bcb..7ae34bb3eb2 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query23.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query23.out
@@ -51,31 +51,30 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------PhysicalDistribute[DistributionSpecGather]
 ------------hashAgg[LOCAL]
 --------------PhysicalUnion
-----------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------PhysicalProject
---------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
-----------------------PhysicalProject
-------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 ----------------PhysicalProject
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF4 cs_item_sk->[item_sk]
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4
+--------------------PhysicalProject
+----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
+----------------PhysicalProject
+------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF6 ws_item_sk->[item_sk]
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6
 --------------------PhysicalProject
 ----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
 ------------------------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]
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
 ----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF5
 ----------------------------PhysicalProject
 ------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
 --------------------------------PhysicalOlapScan[date_dim]
 ------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
---------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query34.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query34.out
index eb76afa75d1..bb286ee190e 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query34.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query34.out
@@ -5,7 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalQuickSort[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk]
+----------hashJoin[INNER_JOIN shuffle] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk]
 ------------PhysicalProject
 --------------PhysicalOlapScan[customer] apply RFs: RF3
 ------------filter((dn.cnt <= 20) and (dn.cnt >= 15))
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query64.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query64.out
index faa8f8c7c35..5db220a63db 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query64.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query64.out
@@ -52,25 +52,25 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 --------------------------------------------------PhysicalProject
 ----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = hd1.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ss_hdemo_sk]
 ------------------------------------------------------PhysicalProject
---------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk]
+--------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF3 cs_item_sk->[ss_item_sk]
 ----------------------------------------------------------PhysicalProject
-------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[ss_item_sk]
+------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk]
 --------------------------------------------------------------PhysicalProject
 ----------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF4 RF6 RF7 RF8
 --------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------filter((sale > (2 * refund)))
-------------------------------------------------------------------hashAgg[GLOBAL]
---------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
-----------------------------------------------------------------------hashAgg[LOCAL]
-------------------------------------------------------------------------PhysicalProject
---------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cr_item_sk->[cs_item_sk];RF1 cr_order_number->[cs_order_number]
-----------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF8
-----------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF8
+----------------------------------------------------------------filter(d_year IN (2001, 2002))
+------------------------------------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------------------------------------PhysicalProject
-------------------------------------------------------------filter(d_year IN (2001, 2002))
---------------------------------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------------------------------filter((sale > (2 * refund)))
+--------------------------------------------------------------hashAgg[GLOBAL]
+----------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
+------------------------------------------------------------------hashAgg[LOCAL]
+--------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cr_item_sk->[cs_item_sk];RF1 cr_order_number->[cs_order_number]
+------------------------------------------------------------------------PhysicalProject
+--------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF8
+------------------------------------------------------------------------PhysicalProject
+--------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF8
 ------------------------------------------------------PhysicalProject
 --------------------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF5
 --------------------------------------------------PhysicalProject
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query74.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query74.out
index 4ae46b69b11..415df0902a0 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query74.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query74.out
@@ -35,7 +35,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalTopN[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL)))
+------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL)))
+--------------PhysicalProject
+----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000))
+------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=()
 ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=()
@@ -48,7 +51,4 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------------------PhysicalProject
 --------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0))
 ----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
---------------PhysicalProject
-----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000))
-------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query9.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query9.out
index f159ed97647..06cd8f92785 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query9.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query9.out
@@ -1,8 +1,8 @@
 -- This file is automatically generated. You should know what you did if you want to edit this
 -- !ds_shape_9 --
 PhysicalResultSink
---PhysicalProject
-----NestedLoopJoin[CROSS_JOIN]
+--PhysicalDistribute[DistributionSpecGather]
+----PhysicalProject
 ------NestedLoopJoin[CROSS_JOIN]
 --------NestedLoopJoin[CROSS_JOIN]
 ----------NestedLoopJoin[CROSS_JOIN]
@@ -16,17 +16,24 @@ PhysicalResultSink
 --------------------------NestedLoopJoin[CROSS_JOIN]
 ----------------------------NestedLoopJoin[CROSS_JOIN]
 ------------------------------NestedLoopJoin[CROSS_JOIN]
---------------------------------PhysicalProject
-----------------------------------NestedLoopJoin[CROSS_JOIN]
-------------------------------------hashAgg[GLOBAL]
---------------------------------------PhysicalDistribute[DistributionSpecGather]
-----------------------------------------hashAgg[LOCAL]
-------------------------------------------PhysicalProject
---------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
-----------------------------------------------PhysicalOlapScan[store_sales]
-------------------------------------PhysicalProject
---------------------------------------filter((reason.r_reason_sk = 1))
-----------------------------------------PhysicalOlapScan[reason]
+--------------------------------NestedLoopJoin[CROSS_JOIN]
+----------------------------------PhysicalProject
+------------------------------------NestedLoopJoin[CROSS_JOIN]
+--------------------------------------PhysicalProject
+----------------------------------------filter((reason.r_reason_sk = 1))
+------------------------------------------PhysicalOlapScan[reason]
+--------------------------------------hashAgg[GLOBAL]
+----------------------------------------PhysicalDistribute[DistributionSpecGather]
+------------------------------------------hashAgg[LOCAL]
+--------------------------------------------PhysicalProject
+----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+------------------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------hashAgg[GLOBAL]
+------------------------------------PhysicalDistribute[DistributionSpecGather]
+--------------------------------------hashAgg[LOCAL]
+----------------------------------------PhysicalProject
+------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+--------------------------------------------PhysicalOlapScan[store_sales]
 --------------------------------hashAgg[GLOBAL]
 ----------------------------------PhysicalDistribute[DistributionSpecGather]
 ------------------------------------hashAgg[LOCAL]
@@ -37,7 +44,7 @@ PhysicalResultSink
 --------------------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------------------hashAgg[LOCAL]
 ------------------------------------PhysicalProject
---------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+--------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
 ----------------------------------------PhysicalOlapScan[store_sales]
 ----------------------------hashAgg[GLOBAL]
 ------------------------------PhysicalDistribute[DistributionSpecGather]
@@ -55,7 +62,7 @@ PhysicalResultSink
 --------------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------------hashAgg[LOCAL]
 ------------------------------PhysicalProject
---------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
+--------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
 ----------------------------------PhysicalOlapScan[store_sales]
 ----------------------hashAgg[GLOBAL]
 ------------------------PhysicalDistribute[DistributionSpecGather]
@@ -73,7 +80,7 @@ PhysicalResultSink
 --------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------hashAgg[LOCAL]
 ------------------------PhysicalProject
---------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
+--------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
 ----------------------------PhysicalOlapScan[store_sales]
 ----------------hashAgg[GLOBAL]
 ------------------PhysicalDistribute[DistributionSpecGather]
@@ -91,7 +98,7 @@ PhysicalResultSink
 --------------PhysicalDistribute[DistributionSpecGather]
 ----------------hashAgg[LOCAL]
 ------------------PhysicalProject
---------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
+--------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
 ----------------------PhysicalOlapScan[store_sales]
 ----------hashAgg[GLOBAL]
 ------------PhysicalDistribute[DistributionSpecGather]
@@ -105,10 +112,4 @@ PhysicalResultSink
 --------------PhysicalProject
 ----------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
 ------------------PhysicalOlapScan[store_sales]
-------hashAgg[GLOBAL]
---------PhysicalDistribute[DistributionSpecGather]
-----------hashAgg[LOCAL]
-------------PhysicalProject
---------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
-----------------PhysicalOlapScan[store_sales]
 
diff --git a/regression-test/data/new_shapes_p0/hint_tpch/shape/q15.out b/regression-test/data/new_shapes_p0/hint_tpch/shape/q15.out
index a920e389bd4..a88c5e699bd 100644
--- a/regression-test/data/new_shapes_p0/hint_tpch/shape/q15.out
+++ b/regression-test/data/new_shapes_p0/hint_tpch/shape/q15.out
@@ -5,7 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalQuickSort[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN shuffle] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=()
+----------hashJoin[INNER_JOIN broadcast] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=()
 ------------PhysicalProject
 --------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = revenue0.supplier_no)) otherCondition=()
 ----------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/constraints/query23.out b/regression-test/data/new_shapes_p0/tpcds_sf100/constraints/query23.out
index 7e956604016..c96446fbfcb 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/constraints/query23.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/constraints/query23.out
@@ -51,32 +51,30 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------PhysicalDistribute[DistributionSpecGather]
 ------------hashAgg[LOCAL]
 --------------PhysicalUnion
-----------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------PhysicalProject
---------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
-----------------------PhysicalProject
-------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
-----------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------PhysicalProject
---------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=()
-----------------------PhysicalProject
-------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
---------------------------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_moy = 5) and (date_dim.d_year = 2000))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+----------------PhysicalProject
+------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+--------------------PhysicalProject
+----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+----------------PhysicalProject
+------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+--------------------PhysicalProject
+----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
+------------------------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_moy = 5) and (date_dim.d_year = 2000))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query1.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query1.out
index 1e0b5bfeabe..64854df932a 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query1.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query1.out
@@ -18,20 +18,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalTopN[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=()
+------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ctr_store_sk,ctr_store_sk]
+----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ctr_store_sk]
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1
-----------------------hashAgg[GLOBAL]
-------------------------PhysicalDistribute[DistributionSpecHash]
---------------------------hashAgg[LOCAL]
-----------------------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1
+--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=()
+----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
 ------------------PhysicalProject
 --------------------filter((store.s_state = 'SD'))
 ----------------------PhysicalOlapScan[store]
---------------PhysicalProject
-----------------PhysicalOlapScan[customer]
+--------------hashAgg[GLOBAL]
+----------------PhysicalDistribute[DistributionSpecHash]
+------------------hashAgg[LOCAL]
+--------------------PhysicalDistribute[DistributionSpecExecutionAny]
+----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query10.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query10.out
index dd3e00f3fc4..bc11b07f3a3 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query10.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query10.out
@@ -10,12 +10,12 @@ PhysicalResultSink
 --------------hashAgg[LOCAL]
 ----------------PhysicalProject
 ------------------filter((ifnull($c$1, FALSE) OR ifnull($c$2, FALSE)))
---------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
-----------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=()
-----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk]
+--------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[c_current_addr_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=()
+------------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
 --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk]
 ----------------------------------PhysicalProject
 ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk]
@@ -25,18 +25,18 @@ PhysicalResultSink
 ----------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001))
 ------------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------------PhysicalProject
-------------------------------------PhysicalOlapScan[customer] apply RFs: RF4
+------------------------------------PhysicalOlapScan[customer] apply RFs: RF5
 --------------------------------PhysicalProject
-----------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County'))
-------------------------------------PhysicalOlapScan[customer_address]
-----------------------------PhysicalOlapScan[customer_demographics]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
-----------------------------PhysicalProject
-------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001))
---------------------------------PhysicalOlapScan[date_dim]
+----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
+------------------------------------PhysicalProject
+--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
+------------------------------------PhysicalProject
+--------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001))
+----------------------------------------PhysicalOlapScan[date_dim]
+------------------------------PhysicalOlapScan[customer_demographics]
+--------------------------PhysicalProject
+----------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County'))
+------------------------------PhysicalOlapScan[customer_address]
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk]
 --------------------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query14.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query14.out
index db188fef0cb..6c4aa790796 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query14.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query14.out
@@ -5,42 +5,48 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----PhysicalProject
 ------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_brand_id = t.brand_id) and (item.i_category_id = t.category_id) and (item.i_class_id = t.class_id)) otherCondition=()
 --------PhysicalIntersect
-----------PhysicalDistribute[DistributionSpecHash]
-------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
+----------hashAgg[GLOBAL]
+------------PhysicalDistribute[DistributionSpecHash]
+--------------hashAgg[LOCAL]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk]
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[item]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[item]
-----------------PhysicalProject
-------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000))
---------------------PhysicalOlapScan[date_dim]
-----------PhysicalDistribute[DistributionSpecHash]
-------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
+----------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000))
+------------------------PhysicalOlapScan[date_dim]
+----------hashAgg[GLOBAL]
+------------PhysicalDistribute[DistributionSpecHash]
+--------------hashAgg[LOCAL]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk]
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[item]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[item]
-----------------PhysicalProject
-------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000))
---------------------PhysicalOlapScan[date_dim]
-----------PhysicalDistribute[DistributionSpecHash]
-------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk]
+----------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000))
+------------------------PhysicalOlapScan[date_dim]
+----------hashAgg[GLOBAL]
+------------PhysicalDistribute[DistributionSpecHash]
+--------------hashAgg[LOCAL]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=()
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[store_sales] apply RFs: RF5
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=()
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[store_sales] apply RFs: RF5
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[item]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[item]
-----------------PhysicalProject
-------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000))
---------------------PhysicalOlapScan[date_dim]
+----------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000))
+------------------------PhysicalOlapScan[date_dim]
 --------PhysicalProject
 ----------PhysicalOlapScan[item]
 --PhysicalCteAnchor ( cteId=CTEId#1 )
@@ -92,14 +98,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------------------------------------PhysicalProject
 --------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF13 d_date_sk->[ss_sold_date_sk]
 ----------------------------------------PhysicalProject
-------------------------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=()
+------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=()
+--------------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=()
+----------------------------------------------PhysicalProject
+------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF13
+----------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 --------------------------------------------PhysicalProject
-----------------------------------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=()
-------------------------------------------------PhysicalProject
---------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF13
-------------------------------------------------PhysicalProject
---------------------------------------------------PhysicalOlapScan[item]
---------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+----------------------------------------------PhysicalOlapScan[item]
 ----------------------------------------PhysicalProject
 ------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002))
 --------------------------------------------PhysicalOlapScan[date_dim]
@@ -138,16 +143,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------------------------------PhysicalDistribute[DistributionSpecHash]
 ----------------------------------hashAgg[LOCAL]
 ------------------------------------PhysicalProject
---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF18 d_date_sk->[ws_sold_date_sk]
+--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF17 d_date_sk->[ws_sold_date_sk]
 ----------------------------------------PhysicalProject
-------------------------------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF17 ws_item_sk->[ss_item_sk]
---------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF17
+------------------------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=()
 --------------------------------------------PhysicalProject
 ----------------------------------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=()
 ------------------------------------------------PhysicalProject
---------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF18
+--------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF17
 ------------------------------------------------PhysicalProject
 --------------------------------------------------PhysicalOlapScan[item]
+--------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 ----------------------------------------PhysicalProject
 ------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002))
 --------------------------------------------PhysicalOlapScan[date_dim]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query16.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query16.out
index b82c89471d5..c6e88456a7e 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query16.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query16.out
@@ -7,28 +7,28 @@ PhysicalResultSink
 --------hashAgg[DISTINCT_LOCAL]
 ----------hashAgg[GLOBAL]
 ------------hashAgg[LOCAL]
---------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=()
-----------------PhysicalProject
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk)))
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cs_ship_addr_sk]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[cs_ship_addr_sk]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk]
+--------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=()
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk]
+------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2
+----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01'))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 RF3
 ----------------------------PhysicalProject
-------------------------------filter((customer_address.ca_state = 'WV'))
---------------------------------PhysicalOlapScan[customer_address]
-------------------------PhysicalProject
---------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County'))
-----------------------------PhysicalOlapScan[call_center]
---------------------PhysicalProject
-----------------------PhysicalOlapScan[catalog_sales]
-----------------PhysicalProject
-------------------PhysicalOlapScan[catalog_returns]
+------------------------------PhysicalOlapScan[catalog_returns]
+--------------------------PhysicalProject
+----------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01'))
+------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------filter((customer_address.ca_state = 'WV'))
+--------------------------PhysicalOlapScan[customer_address]
+------------------PhysicalProject
+--------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County'))
+----------------------PhysicalOlapScan[call_center]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query23.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query23.out
index bb8890a9c51..a8c20854755 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query23.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query23.out
@@ -54,7 +54,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------------PhysicalProject
 ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
 --------------------PhysicalProject
-----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+----------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
 ------------------------PhysicalProject
 --------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
 ----------------------------PhysicalProject
@@ -65,15 +65,15 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
 ------------------------PhysicalOlapScan[date_dim]
 ----------------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]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
 --------------------PhysicalProject
-----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+----------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF4 ws_item_sk->[item_sk]
+------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4
 ------------------------PhysicalProject
 --------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
 ----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF5
 ----------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
-------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 --------------------PhysicalProject
 ----------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
 ------------------------PhysicalOlapScan[date_dim]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query30.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query30.out
index eff207d4616..6f1b848ed00 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query30.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query30.out
@@ -7,16 +7,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------PhysicalDistribute[DistributionSpecHash]
 ----------hashAgg[LOCAL]
 ------------PhysicalProject
---------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=()
+--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[wr_returned_date_sk]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[wr_returned_date_sk]
+------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=()
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[web_returns] apply RFs: RF0
+----------------------PhysicalOlapScan[web_returns] apply RFs: RF1
 --------------------PhysicalProject
-----------------------filter((date_dim.d_year = 2002))
-------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalOlapScan[customer_address]
 ----------------PhysicalProject
-------------------PhysicalOlapScan[customer_address]
+------------------filter((date_dim.d_year = 2002))
+--------------------PhysicalOlapScan[date_dim]
 --PhysicalResultSink
 ----PhysicalTopN[MERGE_SORT]
 ------PhysicalDistribute[DistributionSpecGather]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query34.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query34.out
index ccf88a94822..dad99a6b646 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query34.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query34.out
@@ -5,9 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalQuickSort[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk]
-------------PhysicalProject
---------------PhysicalOlapScan[customer] apply RFs: RF3
+----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=()
 ------------filter((dn.cnt <= 20) and (dn.cnt >= 15))
 --------------hashAgg[GLOBAL]
 ----------------PhysicalDistribute[DistributionSpecHash]
@@ -29,4 +27,6 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000'))
 ----------------------------PhysicalOlapScan[household_demographics]
+------------PhysicalProject
+--------------PhysicalOlapScan[customer]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query35.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query35.out
index 619096f2815..a3f752e2ce0 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query35.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query35.out
@@ -10,12 +10,12 @@ PhysicalResultSink
 --------------hashAgg[LOCAL]
 ----------------PhysicalProject
 ------------------filter((ifnull($c$1, FALSE) OR ifnull($c$2, FALSE)))
---------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
-----------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=()
-----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=()
+--------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=()
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=()
+------------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
 --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=()
 ----------------------------------PhysicalProject
 ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk]
@@ -27,16 +27,16 @@ PhysicalResultSink
 ----------------------------------PhysicalProject
 ------------------------------------PhysicalOlapScan[customer]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[customer_address]
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[customer_demographics]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
-----------------------------PhysicalProject
-------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001))
---------------------------------PhysicalOlapScan[date_dim]
+----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
+------------------------------------PhysicalProject
+--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
+------------------------------------PhysicalProject
+--------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001))
+----------------------------------------PhysicalOlapScan[date_dim]
+------------------------------PhysicalProject
+--------------------------------PhysicalOlapScan[customer_address]
+--------------------------PhysicalProject
+----------------------------PhysicalOlapScan[customer_demographics]
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk]
 --------------------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query39.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query39.out
index 0f87736ac33..9fd32d5844c 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query39.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query39.out
@@ -4,21 +4,23 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --PhysicalCteProducer ( cteId=CTEId#0 )
 ----PhysicalProject
 ------filter((if((mean = 0.0), 0.0, (stdev / mean)) > 1.0))
---------hashAgg[LOCAL]
-----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffle] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=()
+--------hashAgg[GLOBAL]
+----------PhysicalDistribute[DistributionSpecHash]
+------------hashAgg[LOCAL]
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk]
+----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk]
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=()
-----------------------PhysicalOlapScan[inventory] apply RFs: RF1
+--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=()
 ----------------------PhysicalProject
-------------------------PhysicalOlapScan[item]
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=()
+--------------------------PhysicalOlapScan[inventory] apply RFs: RF2
+--------------------------PhysicalProject
+----------------------------PhysicalOlapScan[item]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[warehouse]
 ------------------PhysicalProject
 --------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2))
 ----------------------PhysicalOlapScan[date_dim]
---------------PhysicalProject
-----------------PhysicalOlapScan[warehouse]
 --PhysicalResultSink
 ----PhysicalQuickSort[MERGE_SORT]
 ------PhysicalDistribute[DistributionSpecGather]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query5.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query5.out
index 32ac590f71d..5187455761b 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query5.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query5.out
@@ -35,21 +35,21 @@ PhysicalResultSink
 ------------------------PhysicalDistribute[DistributionSpecHash]
 --------------------------hashAgg[LOCAL]
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=()
+------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cr_returned_date_sk,cs_sold_date_sk]
 --------------------------------PhysicalProject
-----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk,cs_sold_date_sk]
+----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=()
 ------------------------------------PhysicalUnion
 --------------------------------------PhysicalDistribute[DistributionSpecHash]
 ----------------------------------------PhysicalProject
-------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2
+------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
 --------------------------------------PhysicalDistribute[DistributionSpecHash]
 ----------------------------------------PhysicalProject
-------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2
+------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3
 ------------------------------------PhysicalProject
---------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19'))
-----------------------------------------PhysicalOlapScan[date_dim]
+--------------------------------------PhysicalOlapScan[catalog_page]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_page]
+----------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19'))
+------------------------------------PhysicalOlapScan[date_dim]
 --------------------PhysicalProject
 ----------------------hashAgg[GLOBAL]
 ------------------------PhysicalDistribute[DistributionSpecHash]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query64.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query64.out
index 5390eb1c883..be12380c8a4 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query64.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query64.out
@@ -33,28 +33,28 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 ------------------------------------------------------------PhysicalProject
 --------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk]
 ----------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF5 cs_item_sk->[sr_item_sk,ss_item_sk]
+------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=()
 --------------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=()
+----------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF4 cs_item_sk->[sr_item_sk,ss_item_sk]
 ------------------------------------------------------------------------PhysicalProject
 --------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=()
 ----------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF19
+------------------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF6 RF19
 ----------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF5 RF19
+------------------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF4 RF19
 ------------------------------------------------------------------------PhysicalProject
---------------------------------------------------------------------------PhysicalOlapScan[customer]
---------------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------------filter((sale > (2 * refund)))
-------------------------------------------------------------------------hashAgg[GLOBAL]
---------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
-----------------------------------------------------------------------------hashAgg[LOCAL]
-------------------------------------------------------------------------------PhysicalProject
---------------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=()
-----------------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF19
+--------------------------------------------------------------------------filter((sale > (2 * refund)))
+----------------------------------------------------------------------------hashAgg[GLOBAL]
+------------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------------------------------------------------------------hashAgg[LOCAL]
 ----------------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF19
+------------------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=()
+--------------------------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF19
+--------------------------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF19
+--------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------PhysicalOlapScan[customer]
 ----------------------------------------------------------------PhysicalProject
 ------------------------------------------------------------------filter(d_year IN (2001, 2002))
 --------------------------------------------------------------------PhysicalOlapScan[date_dim]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query65.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query65.out
index 360a5ee39bf..c19f18d7bfa 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query65.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query65.out
@@ -5,37 +5,37 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalTopN[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=()
+----------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF4 ss_store_sk->[s_store_sk,ss_store_sk]
 ------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=()
+--------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=()
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF2 ss_store_sk->[ss_store_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_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:RF1 d_date_sk->[ss_sold_date_sk]
 ------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2
+--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF4
 ------------------------------PhysicalProject
 --------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221))
 ----------------------------------PhysicalOlapScan[date_dim]
+--------------------PhysicalProject
+----------------------PhysicalOlapScan[store] apply RFs: RF4
+----------------PhysicalProject
+------------------PhysicalOlapScan[item]
+------------hashAgg[GLOBAL]
+--------------PhysicalDistribute[DistributionSpecHash]
+----------------hashAgg[LOCAL]
+------------------PhysicalProject
 --------------------hashAgg[GLOBAL]
 ----------------------PhysicalDistribute[DistributionSpecHash]
 ------------------------hashAgg[LOCAL]
 --------------------------PhysicalProject
-----------------------------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 <= 1232) and (date_dim.d_month_seq >= 1221))
-------------------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalProject
-------------------PhysicalOlapScan[store]
-------------PhysicalProject
---------------PhysicalOlapScan[item]
+----------------------------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 <= 1232) and (date_dim.d_month_seq >= 1221))
+----------------------------------PhysicalOlapScan[date_dim]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query69.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query69.out
index da2215b6ed1..e0bbeea8237 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query69.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query69.out
@@ -11,9 +11,9 @@ PhysicalResultSink
 ----------------PhysicalProject
 ------------------hashJoin[LEFT_ANTI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=()
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[c_current_addr_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk]
+--------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=()
 ----------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
 ------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk]
 --------------------------------PhysicalProject
@@ -24,7 +24,7 @@ PhysicalResultSink
 --------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000))
 ----------------------------------------PhysicalOlapScan[date_dim]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[customer] apply RFs: RF4
+----------------------------------PhysicalOlapScan[customer] apply RFs: RF5
 ------------------------------PhysicalProject
 --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
 ----------------------------------PhysicalProject
@@ -33,10 +33,10 @@ PhysicalResultSink
 ------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000))
 --------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------PhysicalProject
-------------------------------filter(ca_state IN ('MI', 'TX', 'VA'))
---------------------------------PhysicalOlapScan[customer_address]
+------------------------------PhysicalOlapScan[customer_demographics]
 ------------------------PhysicalProject
---------------------------PhysicalOlapScan[customer_demographics]
+--------------------------filter(ca_state IN ('MI', 'TX', 'VA'))
+----------------------------PhysicalOlapScan[customer_address]
 --------------------PhysicalProject
 ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk]
 ------------------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query73.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query73.out
index 54b486b3ff0..8cfa2b3c64b 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query73.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query73.out
@@ -5,9 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalQuickSort[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk]
-------------PhysicalProject
---------------PhysicalOlapScan[customer] apply RFs: RF3
+----------hashJoin[INNER_JOIN broadcast] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=()
 ------------filter((dj.cnt <= 5) and (dj.cnt >= 1))
 --------------hashAgg[GLOBAL]
 ----------------PhysicalDistribute[DistributionSpecHash]
@@ -29,4 +27,6 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.0) and hd_buy_potential IN ('501-1000', 'Unknown'))
 ----------------------------PhysicalOlapScan[household_demographics]
+------------PhysicalProject
+--------------PhysicalOlapScan[customer]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query74.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query74.out
index fe86065b536..ac1a7051ce0 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query74.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query74.out
@@ -35,15 +35,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalTopN[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL)))
+------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL)))
 --------------PhysicalProject
-----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000))
-------------------PhysicalCteConsumer ( cteId=CTEId#0 )
---------------PhysicalProject
-----------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=()
-------------------PhysicalProject
---------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0))
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=()
 ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=()
 --------------------PhysicalProject
 ----------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000))
@@ -51,4 +45,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------------------PhysicalProject
 ----------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0.0))
 ------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+------------------PhysicalProject
+--------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0))
+----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+--------------PhysicalProject
+----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000))
+------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query75.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query75.out
index a7d307daa5b..dded6a5bb0e 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query75.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query75.out
@@ -6,60 +6,65 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecHash]
 --------hashAgg[LOCAL]
 ----------hashAgg[GLOBAL]
-------------PhysicalDistribute[DistributionSpecHash]
---------------hashAgg[LOCAL]
-----------------PhysicalUnion
-------------------PhysicalDistribute[DistributionSpecExecutionAny]
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=()
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_returns]
-----------------------------PhysicalProject
-------------------------------filter((item.i_category = 'Home'))
---------------------------------PhysicalOlapScan[item]
-------------------------PhysicalProject
---------------------------filter(d_year IN (1998, 1999))
-----------------------------PhysicalOlapScan[date_dim]
-------------------PhysicalDistribute[DistributionSpecExecutionAny]
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=()
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[store_returns]
-----------------------------PhysicalProject
-------------------------------filter((item.i_category = 'Home'))
---------------------------------PhysicalOlapScan[item]
-------------------------PhysicalProject
---------------------------filter(d_year IN (1998, 1999))
-----------------------------PhysicalOlapScan[date_dim]
-------------------PhysicalDistribute[DistributionSpecExecutionAny]
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=()
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_returns]
-----------------------------PhysicalProject
-------------------------------filter((item.i_category = 'Home'))
---------------------------------PhysicalOlapScan[item]
-------------------------PhysicalProject
---------------------------filter(d_year IN (1998, 1999))
-----------------------------PhysicalOlapScan[date_dim]
+------------hashAgg[LOCAL]
+--------------PhysicalUnion
+----------------hashAgg[GLOBAL]
+------------------PhysicalDistribute[DistributionSpecHash]
+--------------------hashAgg[LOCAL]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk]
+------------------------------PhysicalProject
+--------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=()
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[catalog_returns]
+------------------------------PhysicalProject
+--------------------------------filter((item.i_category = 'Home'))
+----------------------------------PhysicalOlapScan[item]
+--------------------------PhysicalProject
+----------------------------filter(d_year IN (1998, 1999))
+------------------------------PhysicalOlapScan[date_dim]
+----------------hashAgg[GLOBAL]
+------------------PhysicalDistribute[DistributionSpecHash]
+--------------------hashAgg[LOCAL]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk]
+------------------------------PhysicalProject
+--------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=()
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[store_returns]
+------------------------------PhysicalProject
+--------------------------------filter((item.i_category = 'Home'))
+----------------------------------PhysicalOlapScan[item]
+--------------------------PhysicalProject
+----------------------------filter(d_year IN (1998, 1999))
+------------------------------PhysicalOlapScan[date_dim]
+----------------hashAgg[GLOBAL]
+------------------PhysicalDistribute[DistributionSpecHash]
+--------------------hashAgg[LOCAL]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk]
+------------------------------PhysicalProject
+--------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=()
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[web_returns]
+------------------------------PhysicalProject
+--------------------------------filter((item.i_category = 'Home'))
+----------------------------------PhysicalOlapScan[item]
+--------------------------PhysicalProject
+----------------------------filter(d_year IN (1998, 1999))
+------------------------------PhysicalOlapScan[date_dim]
 --PhysicalResultSink
 ----PhysicalTopN[MERGE_SORT]
 ------PhysicalDistribute[DistributionSpecGather]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query81.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query81.out
index a477061486b..8e795ffc2e0 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query81.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query81.out
@@ -22,20 +22,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalTopN[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk]
+------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk]
+----------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk]
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
+--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk]
 ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2
-----------------------hashAgg[GLOBAL]
-------------------------PhysicalDistribute[DistributionSpecHash]
---------------------------hashAgg[LOCAL]
-----------------------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer] apply RFs: RF3
 ------------------PhysicalProject
---------------------PhysicalOlapScan[customer] apply RFs: RF3
---------------PhysicalProject
-----------------filter((customer_address.ca_state = 'CA'))
-------------------PhysicalOlapScan[customer_address]
+--------------------filter((customer_address.ca_state = 'CA'))
+----------------------PhysicalOlapScan[customer_address]
+--------------hashAgg[GLOBAL]
+----------------PhysicalDistribute[DistributionSpecHash]
+------------------hashAgg[LOCAL]
+--------------------PhysicalDistribute[DistributionSpecExecutionAny]
+----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query84.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query84.out
index 6237637bf54..78a1b815e9e 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query84.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query84.out
@@ -13,16 +13,16 @@ PhysicalResultSink
 ----------------PhysicalProject
 ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[c_current_hdemo_sk]
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=()
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk]
+--------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=()
 ----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF2
+------------------------------PhysicalOlapScan[customer] apply RFs: RF1 RF2
 ----------------------------PhysicalProject
-------------------------------filter((customer_address.ca_city = 'Oakwood'))
---------------------------------PhysicalOlapScan[customer_address]
+------------------------------PhysicalOlapScan[customer_demographics]
 ------------------------PhysicalProject
---------------------------PhysicalOlapScan[customer_demographics]
+--------------------------filter((customer_address.ca_city = 'Oakwood'))
+----------------------------PhysicalOlapScan[customer_address]
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[household_demographics] apply RFs: RF3
 ----------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query85.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query85.out
index 61b3232d4b7..0de3c1e8764 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query85.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query85.out
@@ -15,7 +15,7 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=((((ca_state IN ('DE', 'FL', 'TX') AND ((web_sales.ws_net_profit >= 100.00) AND (web_sales.ws_net_profit <= 200.00))) OR (ca_state IN ('ID', 'IN', 'ND') AND ((web_sales.ws_net_profit >= 150.00) AND (web_sales.ws_net_profit <= 300.00)))) OR (ca_state IN ('IL', 'MT', 'OH') AND ((web_sales.ws_net_profit >= 50.00) AND (web_sales.ws_net_pro [...]
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk) and (cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status)) otherCondition=((((((cd1.cd_marital_status = 'M') AND (cd1.cd_education_status = '4 yr Degree')) AND ((web_sales.ws_sales_price >= 100.00) AND (web_sales.ws_sales_price <= 150.00))) OR (((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'Second [...]
+------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk) and (cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status)) otherCondition=((((((cd1.cd_marital_status = 'M') AND (cd1.cd_education_status = '4 yr Degree')) AND ((web_sales.ws_sales_price >= 100.00) AND (web_sales.ws_sales_price <= 150.00))) OR (((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'Secondar [...]
 --------------------------------PhysicalProject
 ----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[wr_returning_cdemo_sk]
 ------------------------------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query91.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query91.out
index 58cef718bd3..6e532bb76fc 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query91.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query91.out
@@ -15,20 +15,20 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk]
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=()
+------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk]
 --------------------------------PhysicalProject
 ----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[cr_returning_customer_sk]
 ------------------------------------PhysicalProject
---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cr_returned_date_sk]
+--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=()
 ----------------------------------------PhysicalProject
-------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1
+------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 RF2
 ----------------------------------------PhysicalProject
-------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001))
---------------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------------PhysicalOlapScan[call_center]
 ------------------------------------PhysicalProject
 --------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 RF5
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[call_center]
+----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001))
+------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------PhysicalProject
 ------------------------------filter((customer_address.ca_gmt_offset = -6.00))
 --------------------------------PhysicalOlapScan[customer_address]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query94.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query94.out
index 3de83dace6b..75a20cb4e35 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query94.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query94.out
@@ -7,28 +7,28 @@ PhysicalResultSink
 --------hashAgg[DISTINCT_LOCAL]
 ----------hashAgg[GLOBAL]
 ------------hashAgg[LOCAL]
---------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=()
-----------------PhysicalProject
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk)))
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk]
+--------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=()
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk]
+------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01'))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3
 ----------------------------PhysicalProject
-------------------------------filter((customer_address.ca_state = 'OK'))
---------------------------------PhysicalOlapScan[customer_address]
-------------------------PhysicalProject
---------------------------filter((web_site.web_company_name = 'pri'))
-----------------------------PhysicalOlapScan[web_site]
---------------------PhysicalProject
-----------------------PhysicalOlapScan[web_sales]
-----------------PhysicalProject
-------------------PhysicalOlapScan[web_returns]
+------------------------------PhysicalOlapScan[web_returns]
+--------------------------PhysicalProject
+----------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01'))
+------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------filter((customer_address.ca_state = 'OK'))
+--------------------------PhysicalOlapScan[customer_address]
+------------------PhysicalProject
+--------------------filter((web_site.web_company_name = 'pri'))
+----------------------PhysicalOlapScan[web_site]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query95.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query95.out
index 857b1e17442..fce09b1b604 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query95.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query95.out
@@ -5,9 +5,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----PhysicalProject
 ------hashJoin[INNER_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number]
 --------PhysicalProject
-----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF6
+----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF7
 --------PhysicalProject
-----------PhysicalOlapScan[web_sales] apply RFs: RF6
+----------PhysicalOlapScan[web_sales] apply RFs: RF7
 --PhysicalResultSink
 ----PhysicalTopN[GATHER_SORT]
 ------hashAgg[DISTINCT_GLOBAL]
@@ -15,29 +15,29 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------hashAgg[DISTINCT_LOCAL]
 ------------hashAgg[GLOBAL]
 --------------hashAgg[LOCAL]
-----------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=()
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=()
+----------------PhysicalProject
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF6 web_site_sk->[ws_web_site_sk]
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF4 web_site_sk->[ws_web_site_sk]
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[ws_ship_addr_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_ship_addr_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk]
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_ship_date_sk]
+----------------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[ws_order_number]
+------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3
+------------------------------hashJoin[RIGHT_SEMI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF2 ws_order_number->[wr_order_number];RF7 ws_order_number->[ws_order_number,ws_order_number]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 RF4
+----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=()
+------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+------------------------------------PhysicalProject
+--------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01'))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF6
 ----------------------------PhysicalProject
-------------------------------filter((customer_address.ca_state = 'NC'))
---------------------------------PhysicalOlapScan[customer_address]
+------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01'))
+--------------------------------PhysicalOlapScan[date_dim]
 ------------------------PhysicalProject
---------------------------filter((web_site.web_company_name = 'pri'))
-----------------------------PhysicalOlapScan[web_site]
---------------------PhysicalCteConsumer ( cteId=CTEId#0 )
-------------------PhysicalProject
---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF6 wr_order_number->[ws_order_number]
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
-----------------------PhysicalProject
-------------------------PhysicalOlapScan[web_returns]
+--------------------------filter((customer_address.ca_state = 'NC'))
+----------------------------PhysicalOlapScan[customer_address]
+--------------------PhysicalProject
+----------------------filter((web_site.web_company_name = 'pri'))
+------------------------PhysicalOlapScan[web_site]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query1.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query1.out
index 8b23005c05a..9da3e4ef561 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query1.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query1.out
@@ -18,20 +18,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalTopN[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk]
+------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ctr_store_sk,ctr_store_sk]
+----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ctr_store_sk]
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
+--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ctr_customer_sk]
 ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 RF2
-----------------------hashAgg[GLOBAL]
-------------------------PhysicalDistribute[DistributionSpecHash]
---------------------------hashAgg[LOCAL]
-----------------------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer]
 ------------------PhysicalProject
 --------------------filter((store.s_state = 'SD'))
 ----------------------PhysicalOlapScan[store]
---------------PhysicalProject
-----------------PhysicalOlapScan[customer]
+--------------hashAgg[GLOBAL]
+----------------PhysicalDistribute[DistributionSpecHash]
+------------------hashAgg[LOCAL]
+--------------------PhysicalDistribute[DistributionSpecExecutionAny]
+----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query10.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query10.out
index 54469d5dfb5..36a2c69f6b9 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query10.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query10.out
@@ -10,12 +10,12 @@ PhysicalResultSink
 --------------hashAgg[LOCAL]
 ----------------PhysicalProject
 ------------------filter((ifnull($c$1, FALSE) OR ifnull($c$2, FALSE)))
---------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
-----------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk]
+--------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[c_current_addr_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[c_current_cdemo_sk]
+------------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
 --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk]
 ----------------------------------PhysicalProject
 ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk]
@@ -27,16 +27,16 @@ PhysicalResultSink
 ----------------------------------PhysicalProject
 ------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5
 --------------------------------PhysicalProject
-----------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County'))
-------------------------------------PhysicalOlapScan[customer_address]
-----------------------------PhysicalOlapScan[customer_demographics]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
-----------------------------PhysicalProject
-------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001))
---------------------------------PhysicalOlapScan[date_dim]
+----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
+------------------------------------PhysicalProject
+--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
+------------------------------------PhysicalProject
+--------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001))
+----------------------------------------PhysicalOlapScan[date_dim]
+------------------------------PhysicalOlapScan[customer_demographics]
+--------------------------PhysicalProject
+----------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County'))
+------------------------------PhysicalOlapScan[customer_address]
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk]
 --------------------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query14.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query14.out
index 4c50bd7eee5..ccdddf10b59 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query14.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query14.out
@@ -5,42 +5,48 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----PhysicalProject
 ------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_brand_id = t.brand_id) and (item.i_category_id = t.category_id) and (item.i_class_id = t.class_id)) otherCondition=() build RFs:RF6 i_brand_id->[i_brand_id,i_brand_id,i_brand_id];RF7 i_class_id->[i_class_id,i_class_id,i_class_id];RF8 i_category_id->[i_category_id,i_category_id,i_category_id]
 --------PhysicalIntersect
-----------PhysicalDistribute[DistributionSpecHash]
-------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
+----------hashAgg[GLOBAL]
+------------PhysicalDistribute[DistributionSpecHash]
+--------------hashAgg[LOCAL]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk]
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8
-----------------PhysicalProject
-------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000))
---------------------PhysicalOlapScan[date_dim]
-----------PhysicalDistribute[DistributionSpecHash]
-------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
+----------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000))
+------------------------PhysicalOlapScan[date_dim]
+----------hashAgg[GLOBAL]
+------------PhysicalDistribute[DistributionSpecHash]
+--------------hashAgg[LOCAL]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk]
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8
-----------------PhysicalProject
-------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000))
---------------------PhysicalOlapScan[date_dim]
-----------PhysicalDistribute[DistributionSpecHash]
-------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk]
+----------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000))
+------------------------PhysicalOlapScan[date_dim]
+----------hashAgg[GLOBAL]
+------------PhysicalDistribute[DistributionSpecHash]
+--------------hashAgg[LOCAL]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk]
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk]
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8
 --------------------PhysicalProject
-----------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8
-----------------PhysicalProject
-------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000))
---------------------PhysicalOlapScan[date_dim]
+----------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000))
+------------------------PhysicalOlapScan[date_dim]
 --------PhysicalProject
 ----------PhysicalOlapScan[item]
 --PhysicalCteAnchor ( cteId=CTEId#1 )
@@ -92,14 +98,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------------------------------------PhysicalProject
 --------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF13 d_date_sk->[ss_sold_date_sk]
 ----------------------------------------PhysicalProject
-------------------------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=()
+------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[ss_item_sk,ss_item_sk]
+--------------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=()
+----------------------------------------------PhysicalProject
+------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13
+----------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF12
 --------------------------------------------PhysicalProject
-----------------------------------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[ss_item_sk]
-------------------------------------------------PhysicalProject
---------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13
-------------------------------------------------PhysicalProject
---------------------------------------------------PhysicalOlapScan[item]
---------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+----------------------------------------------PhysicalOlapScan[item]
 ----------------------------------------PhysicalProject
 ------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002))
 --------------------------------------------PhysicalOlapScan[date_dim]
@@ -138,16 +143,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------------------------------PhysicalDistribute[DistributionSpecHash]
 ----------------------------------hashAgg[LOCAL]
 ------------------------------------PhysicalProject
---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF18 d_date_sk->[ws_sold_date_sk]
+--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF17 d_date_sk->[ws_sold_date_sk]
 ----------------------------------------PhysicalProject
-------------------------------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF17 ws_item_sk->[ss_item_sk]
---------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF17
+------------------------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=()
 --------------------------------------------PhysicalProject
 ----------------------------------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF16 i_item_sk->[ws_item_sk]
 ------------------------------------------------PhysicalProject
---------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF16 RF18
+--------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF16 RF17
 ------------------------------------------------PhysicalProject
 --------------------------------------------------PhysicalOlapScan[item]
+--------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 ----------------------------------------PhysicalProject
 ------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002))
 --------------------------------------------PhysicalOlapScan[date_dim]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query16.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query16.out
index 8b507e61948..c6e88456a7e 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query16.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query16.out
@@ -7,28 +7,28 @@ PhysicalResultSink
 --------hashAgg[DISTINCT_LOCAL]
 ----------hashAgg[GLOBAL]
 ------------hashAgg[LOCAL]
---------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=()
-----------------PhysicalProject
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF3 cs_order_number->[cs_order_number]
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cs_ship_addr_sk]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[cs_ship_addr_sk]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk]
+--------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=()
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk]
+------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3
+----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01'))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 RF3
 ----------------------------PhysicalProject
-------------------------------filter((customer_address.ca_state = 'WV'))
---------------------------------PhysicalOlapScan[customer_address]
-------------------------PhysicalProject
---------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County'))
-----------------------------PhysicalOlapScan[call_center]
---------------------PhysicalProject
-----------------------PhysicalOlapScan[catalog_sales]
-----------------PhysicalProject
-------------------PhysicalOlapScan[catalog_returns]
+------------------------------PhysicalOlapScan[catalog_returns]
+--------------------------PhysicalProject
+----------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01'))
+------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------filter((customer_address.ca_state = 'WV'))
+--------------------------PhysicalOlapScan[customer_address]
+------------------PhysicalProject
+--------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County'))
+----------------------PhysicalOlapScan[call_center]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query23.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query23.out
index 2d3201212e3..873b3445081 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query23.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query23.out
@@ -54,7 +54,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------------PhysicalProject
 ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
 --------------------PhysicalProject
-----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+----------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
 ------------------------PhysicalProject
 --------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
 ----------------------------PhysicalProject
@@ -65,15 +65,15 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
 ------------------------PhysicalOlapScan[date_dim]
 ----------------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]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
 --------------------PhysicalProject
-----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+----------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF4 ws_item_sk->[item_sk]
+------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4
 ------------------------PhysicalProject
 --------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
 ----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF5
 ----------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
-------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 --------------------PhysicalProject
 ----------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
 ------------------------PhysicalOlapScan[date_dim]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query30.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query30.out
index f0da41ee9b2..6ace51502d6 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query30.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query30.out
@@ -7,16 +7,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------PhysicalDistribute[DistributionSpecHash]
 ----------hashAgg[LOCAL]
 ------------PhysicalProject
---------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[wr_returning_addr_sk]
+--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[wr_returned_date_sk]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[wr_returned_date_sk]
+------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[wr_returning_addr_sk]
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1
 --------------------PhysicalProject
-----------------------filter((date_dim.d_year = 2002))
-------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalOlapScan[customer_address]
 ----------------PhysicalProject
-------------------PhysicalOlapScan[customer_address]
+------------------filter((date_dim.d_year = 2002))
+--------------------PhysicalOlapScan[date_dim]
 --PhysicalResultSink
 ----PhysicalTopN[MERGE_SORT]
 ------PhysicalDistribute[DistributionSpecGather]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query34.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query34.out
index ccf88a94822..25429183c8f 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query34.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query34.out
@@ -5,9 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalQuickSort[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk]
-------------PhysicalProject
---------------PhysicalOlapScan[customer] apply RFs: RF3
+----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk]
 ------------filter((dn.cnt <= 20) and (dn.cnt >= 15))
 --------------hashAgg[GLOBAL]
 ----------------PhysicalDistribute[DistributionSpecHash]
@@ -19,7 +17,7 @@ PhysicalResultSink
 ----------------------------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 RF2
+----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3
 --------------------------------PhysicalProject
 ----------------------------------filter((((date_dim.d_dom >= 1) AND (date_dim.d_dom <= 3)) OR ((date_dim.d_dom >= 25) AND (date_dim.d_dom <= 28))) and d_year IN (1998, 1999, 2000))
 ------------------------------------PhysicalOlapScan[date_dim]
@@ -29,4 +27,6 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000'))
 ----------------------------PhysicalOlapScan[household_demographics]
+------------PhysicalProject
+--------------PhysicalOlapScan[customer]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query35.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query35.out
index 464373ae544..14b71f576d9 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query35.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query35.out
@@ -10,12 +10,12 @@ PhysicalResultSink
 --------------hashAgg[LOCAL]
 ----------------PhysicalProject
 ------------------filter((ifnull($c$1, FALSE) OR ifnull($c$2, FALSE)))
---------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
-----------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk]
+--------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk]
+------------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
 --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk]
 ----------------------------------PhysicalProject
 ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk]
@@ -27,16 +27,16 @@ PhysicalResultSink
 ----------------------------------PhysicalProject
 ------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[customer_address]
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[customer_demographics]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
-----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
-----------------------------PhysicalProject
-------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001))
---------------------------------PhysicalOlapScan[date_dim]
+----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
+------------------------------------PhysicalProject
+--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
+------------------------------------PhysicalProject
+--------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001))
+----------------------------------------PhysicalOlapScan[date_dim]
+------------------------------PhysicalProject
+--------------------------------PhysicalOlapScan[customer_address]
+--------------------------PhysicalProject
+----------------------------PhysicalOlapScan[customer_demographics]
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk]
 --------------------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query39.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query39.out
index 130590e1ee8..714a012c9f2 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query39.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query39.out
@@ -4,21 +4,23 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --PhysicalCteProducer ( cteId=CTEId#0 )
 ----PhysicalProject
 ------filter((if((mean = 0.0), 0.0, (stdev / mean)) > 1.0))
---------hashAgg[LOCAL]
-----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffle] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk]
+--------hashAgg[GLOBAL]
+----------PhysicalDistribute[DistributionSpecHash]
+------------hashAgg[LOCAL]
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk]
+----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk]
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk]
-----------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2
+--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 w_warehouse_sk->[inv_warehouse_sk]
 ----------------------PhysicalProject
-------------------------PhysicalOlapScan[item]
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk]
+--------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2
+--------------------------PhysicalProject
+----------------------------PhysicalOlapScan[item]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[warehouse]
 ------------------PhysicalProject
 --------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2))
 ----------------------PhysicalOlapScan[date_dim]
---------------PhysicalProject
-----------------PhysicalOlapScan[warehouse]
 --PhysicalResultSink
 ----PhysicalQuickSort[MERGE_SORT]
 ------PhysicalDistribute[DistributionSpecGather]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query5.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query5.out
index 917f29d0972..fde3b7f2fa2 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query5.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query5.out
@@ -35,9 +35,9 @@ PhysicalResultSink
 ------------------------PhysicalDistribute[DistributionSpecHash]
 --------------------------hashAgg[LOCAL]
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF3 cp_catalog_page_sk->[cr_catalog_page_sk,cs_catalog_page_sk]
+------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cr_returned_date_sk,cs_sold_date_sk]
 --------------------------------PhysicalProject
-----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk,cs_sold_date_sk]
+----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF2 cp_catalog_page_sk->[cr_catalog_page_sk,cs_catalog_page_sk]
 ------------------------------------PhysicalUnion
 --------------------------------------PhysicalDistribute[DistributionSpecHash]
 ----------------------------------------PhysicalProject
@@ -46,10 +46,10 @@ PhysicalResultSink
 ----------------------------------------PhysicalProject
 ------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3
 ------------------------------------PhysicalProject
---------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19'))
-----------------------------------------PhysicalOlapScan[date_dim]
+--------------------------------------PhysicalOlapScan[catalog_page]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_page]
+----------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19'))
+------------------------------------PhysicalOlapScan[date_dim]
 --------------------PhysicalProject
 ----------------------hashAgg[GLOBAL]
 ------------------------PhysicalDistribute[DistributionSpecHash]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query64.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query64.out
index e404f70c2fd..01b9dac6daf 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query64.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query64.out
@@ -33,28 +33,28 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 ------------------------------------------------------------PhysicalProject
 --------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk]
 ----------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF5 cs_item_sk->[sr_item_sk,ss_item_sk]
+------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk]
 --------------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk]
+----------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF4 cs_item_sk->[sr_item_sk,ss_item_sk]
 ------------------------------------------------------------------------PhysicalProject
 --------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_item_sk->[ss_item_sk];RF3 sr_ticket_number->[ss_ticket_number]
 ----------------------------------------------------------------------------PhysicalProject
 ------------------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF4 RF5 RF6 RF7 RF10 RF12 RF13 RF15 RF19
 ----------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF5 RF19
+------------------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF4 RF19
 ------------------------------------------------------------------------PhysicalProject
---------------------------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF8 RF9 RF11 RF14 RF16
---------------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------------filter((sale > (2 * refund)))
-------------------------------------------------------------------------hashAgg[GLOBAL]
---------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
-----------------------------------------------------------------------------hashAgg[LOCAL]
-------------------------------------------------------------------------------PhysicalProject
---------------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cr_item_sk->[cs_item_sk];RF1 cr_order_number->[cs_order_number]
-----------------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF19
+--------------------------------------------------------------------------filter((sale > (2 * refund)))
+----------------------------------------------------------------------------hashAgg[GLOBAL]
+------------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------------------------------------------------------------hashAgg[LOCAL]
 ----------------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF19
+------------------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cr_item_sk->[cs_item_sk];RF1 cr_order_number->[cs_order_number]
+--------------------------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF19
+--------------------------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF19
+--------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF8 RF9 RF11 RF14 RF16
 ----------------------------------------------------------------PhysicalProject
 ------------------------------------------------------------------filter(d_year IN (2001, 2002))
 --------------------------------------------------------------------PhysicalOlapScan[date_dim]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query65.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query65.out
index 6d4d80b4e57..4dd67a91e1e 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query65.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query65.out
@@ -5,11 +5,11 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalTopN[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk]
+----------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF4 ss_store_sk->[s_store_sk,ss_store_sk]
 ------------PhysicalProject
---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk,ss_store_sk]
+--------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DOUBLE) <= cast((0.1 * ave) as DOUBLE))) build RFs:RF2 ss_store_sk->[ss_store_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk]
 --------------------hashAgg[GLOBAL]
 ----------------------PhysicalDistribute[DistributionSpecHash]
 ------------------------hashAgg[LOCAL]
@@ -20,22 +20,22 @@ PhysicalResultSink
 ------------------------------PhysicalProject
 --------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221))
 ----------------------------------PhysicalOlapScan[date_dim]
+--------------------PhysicalProject
+----------------------PhysicalOlapScan[store] apply RFs: RF4
+----------------PhysicalProject
+------------------PhysicalOlapScan[item]
+------------hashAgg[GLOBAL]
+--------------PhysicalDistribute[DistributionSpecHash]
+----------------hashAgg[LOCAL]
+------------------PhysicalProject
 --------------------hashAgg[GLOBAL]
 ----------------------PhysicalDistribute[DistributionSpecHash]
 ------------------------hashAgg[LOCAL]
 --------------------------PhysicalProject
-----------------------------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 RF3
---------------------------------------PhysicalProject
-----------------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221))
-------------------------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalProject
-------------------PhysicalOlapScan[store]
-------------PhysicalProject
---------------PhysicalOlapScan[item]
+----------------------------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 <= 1232) and (date_dim.d_month_seq >= 1221))
+----------------------------------PhysicalOlapScan[date_dim]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query69.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query69.out
index 211e2788130..af6d7e8c85a 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query69.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query69.out
@@ -11,9 +11,9 @@ PhysicalResultSink
 ----------------PhysicalProject
 ------------------hashJoin[LEFT_ANTI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk]
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[c_current_addr_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk]
+--------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[c_current_cdemo_sk]
 ----------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
 ------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk]
 --------------------------------PhysicalProject
@@ -33,10 +33,10 @@ PhysicalResultSink
 ------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000))
 --------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------PhysicalProject
-------------------------------filter(ca_state IN ('MI', 'TX', 'VA'))
---------------------------------PhysicalOlapScan[customer_address]
+------------------------------PhysicalOlapScan[customer_demographics]
 ------------------------PhysicalProject
---------------------------PhysicalOlapScan[customer_demographics]
+--------------------------filter(ca_state IN ('MI', 'TX', 'VA'))
+----------------------------PhysicalOlapScan[customer_address]
 --------------------PhysicalProject
 ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk]
 ------------------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query73.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query73.out
index 54b486b3ff0..a7655a2c3f2 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query73.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query73.out
@@ -5,9 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalQuickSort[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk]
-------------PhysicalProject
---------------PhysicalOlapScan[customer] apply RFs: RF3
+----------hashJoin[INNER_JOIN broadcast] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk]
 ------------filter((dj.cnt <= 5) and (dj.cnt >= 1))
 --------------hashAgg[GLOBAL]
 ----------------PhysicalDistribute[DistributionSpecHash]
@@ -19,7 +17,7 @@ PhysicalResultSink
 ----------------------------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 RF2
+----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3
 --------------------------------PhysicalProject
 ----------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (2000, 2001, 2002))
 ------------------------------------PhysicalOlapScan[date_dim]
@@ -29,4 +27,6 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.0) and hd_buy_potential IN ('501-1000', 'Unknown'))
 ----------------------------PhysicalOlapScan[household_demographics]
+------------PhysicalProject
+--------------PhysicalOlapScan[customer]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query74.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query74.out
index c04f37e8a86..58e91a6a35d 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query74.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query74.out
@@ -35,15 +35,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalTopN[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL)))
+------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL)))
 --------------PhysicalProject
-----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000))
-------------------PhysicalCteConsumer ( cteId=CTEId#0 )
---------------PhysicalProject
-----------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=()
-------------------PhysicalProject
---------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0))
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=()
 ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=()
 --------------------PhysicalProject
 ----------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000))
@@ -51,4 +45,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------------------PhysicalProject
 ----------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0.0))
 ------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+------------------PhysicalProject
+--------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0))
+----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+--------------PhysicalProject
+----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000))
+------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query75.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query75.out
index a7d307daa5b..dded6a5bb0e 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query75.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query75.out
@@ -6,60 +6,65 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecHash]
 --------hashAgg[LOCAL]
 ----------hashAgg[GLOBAL]
-------------PhysicalDistribute[DistributionSpecHash]
---------------hashAgg[LOCAL]
-----------------PhysicalUnion
-------------------PhysicalDistribute[DistributionSpecExecutionAny]
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=()
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_returns]
-----------------------------PhysicalProject
-------------------------------filter((item.i_category = 'Home'))
---------------------------------PhysicalOlapScan[item]
-------------------------PhysicalProject
---------------------------filter(d_year IN (1998, 1999))
-----------------------------PhysicalOlapScan[date_dim]
-------------------PhysicalDistribute[DistributionSpecExecutionAny]
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=()
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[store_returns]
-----------------------------PhysicalProject
-------------------------------filter((item.i_category = 'Home'))
---------------------------------PhysicalOlapScan[item]
-------------------------PhysicalProject
---------------------------filter(d_year IN (1998, 1999))
-----------------------------PhysicalOlapScan[date_dim]
-------------------PhysicalDistribute[DistributionSpecExecutionAny]
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=()
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_returns]
-----------------------------PhysicalProject
-------------------------------filter((item.i_category = 'Home'))
---------------------------------PhysicalOlapScan[item]
-------------------------PhysicalProject
---------------------------filter(d_year IN (1998, 1999))
-----------------------------PhysicalOlapScan[date_dim]
+------------hashAgg[LOCAL]
+--------------PhysicalUnion
+----------------hashAgg[GLOBAL]
+------------------PhysicalDistribute[DistributionSpecHash]
+--------------------hashAgg[LOCAL]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk]
+------------------------------PhysicalProject
+--------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=()
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[catalog_returns]
+------------------------------PhysicalProject
+--------------------------------filter((item.i_category = 'Home'))
+----------------------------------PhysicalOlapScan[item]
+--------------------------PhysicalProject
+----------------------------filter(d_year IN (1998, 1999))
+------------------------------PhysicalOlapScan[date_dim]
+----------------hashAgg[GLOBAL]
+------------------PhysicalDistribute[DistributionSpecHash]
+--------------------hashAgg[LOCAL]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk]
+------------------------------PhysicalProject
+--------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=()
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[store_returns]
+------------------------------PhysicalProject
+--------------------------------filter((item.i_category = 'Home'))
+----------------------------------PhysicalOlapScan[item]
+--------------------------PhysicalProject
+----------------------------filter(d_year IN (1998, 1999))
+------------------------------PhysicalOlapScan[date_dim]
+----------------hashAgg[GLOBAL]
+------------------PhysicalDistribute[DistributionSpecHash]
+--------------------hashAgg[LOCAL]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk]
+------------------------------PhysicalProject
+--------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=()
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[web_returns]
+------------------------------PhysicalProject
+--------------------------------filter((item.i_category = 'Home'))
+----------------------------------PhysicalOlapScan[item]
+--------------------------PhysicalProject
+----------------------------filter(d_year IN (1998, 1999))
+------------------------------PhysicalOlapScan[date_dim]
 --PhysicalResultSink
 ----PhysicalTopN[MERGE_SORT]
 ------PhysicalDistribute[DistributionSpecGather]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query81.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query81.out
index 763dca10095..0f21cb9d597 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query81.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query81.out
@@ -22,20 +22,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalTopN[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk]
+------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
 --------------PhysicalProject
-----------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk]
+----------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk]
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DOUBLE) > cast((avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2) as DOUBLE)))
+--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk]
 ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2
-----------------------hashAgg[GLOBAL]
-------------------------PhysicalDistribute[DistributionSpecHash]
---------------------------hashAgg[LOCAL]
-----------------------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[customer] apply RFs: RF3
 ------------------PhysicalProject
---------------------PhysicalOlapScan[customer] apply RFs: RF3
---------------PhysicalProject
-----------------filter((customer_address.ca_state = 'CA'))
-------------------PhysicalOlapScan[customer_address]
+--------------------filter((customer_address.ca_state = 'CA'))
+----------------------PhysicalOlapScan[customer_address]
+--------------hashAgg[GLOBAL]
+----------------PhysicalDistribute[DistributionSpecHash]
+------------------hashAgg[LOCAL]
+--------------------PhysicalDistribute[DistributionSpecExecutionAny]
+----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query84.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query84.out
index f4ce4f79129..b6aab0b1439 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query84.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query84.out
@@ -13,16 +13,16 @@ PhysicalResultSink
 ----------------PhysicalProject
 ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[c_current_hdemo_sk]
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[c_current_cdemo_sk]
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk]
+--------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[c_current_cdemo_sk]
 ----------------------------PhysicalProject
 ------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 RF2
 ----------------------------PhysicalProject
-------------------------------filter((customer_address.ca_city = 'Oakwood'))
---------------------------------PhysicalOlapScan[customer_address]
+------------------------------PhysicalOlapScan[customer_demographics]
 ------------------------PhysicalProject
---------------------------PhysicalOlapScan[customer_demographics]
+--------------------------filter((customer_address.ca_city = 'Oakwood'))
+----------------------------PhysicalOlapScan[customer_address]
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[household_demographics] apply RFs: RF3
 ----------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query85.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query85.out
index 17546d17704..54835db0dc8 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query85.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query85.out
@@ -15,7 +15,7 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=((((ca_state IN ('DE', 'FL', 'TX') AND ((web_sales.ws_net_profit >= 100.00) AND (web_sales.ws_net_profit <= 200.00))) OR (ca_state IN ('ID', 'IN', 'ND') AND ((web_sales.ws_net_profit >= 150.00) AND (web_sales.ws_net_profit <= 300.00)))) OR (ca_state IN ('IL', 'MT', 'OH') AND ((web_sales.ws_net_profit >= 50.00) AND (web_sales.ws_net_pro [...]
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk) and (cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status)) otherCondition=((((((cd1.cd_marital_status = 'M') AND (cd1.cd_education_status = '4 yr Degree')) AND ((web_sales.ws_sales_price >= 100.00) AND (web_sales.ws_sales_price <= 150.00))) OR (((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'Second [...]
+------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk) and (cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status)) otherCondition=((((((cd1.cd_marital_status = 'M') AND (cd1.cd_education_status = '4 yr Degree')) AND ((web_sales.ws_sales_price >= 100.00) AND (web_sales.ws_sales_price <= 150.00))) OR (((cd1.cd_marital_status = 'S') AND (cd1.cd_education_status = 'Secondar [...]
 --------------------------------PhysicalProject
 ----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[wr_returning_cdemo_sk]
 ------------------------------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query91.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query91.out
index 3e02cec680b..d165c286c01 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query91.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query91.out
@@ -15,20 +15,20 @@ PhysicalResultSink
 ------------------------PhysicalProject
 --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk]
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cr_call_center_sk]
+------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk]
 --------------------------------PhysicalProject
 ----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[cr_returning_customer_sk]
 ------------------------------------PhysicalProject
---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cr_returned_date_sk]
+--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF0 cc_call_center_sk->[cr_call_center_sk]
 ----------------------------------------PhysicalProject
 ------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1 RF2
 ----------------------------------------PhysicalProject
-------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001))
---------------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------------PhysicalOlapScan[call_center]
 ------------------------------------PhysicalProject
 --------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 RF5
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[call_center]
+----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001))
+------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------PhysicalProject
 ------------------------------filter((customer_address.ca_gmt_offset = -6.00))
 --------------------------------PhysicalOlapScan[customer_address]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query94.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query94.out
index 083a8bb4d7b..75a20cb4e35 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query94.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query94.out
@@ -7,28 +7,28 @@ PhysicalResultSink
 --------hashAgg[DISTINCT_LOCAL]
 ----------hashAgg[GLOBAL]
 ------------hashAgg[LOCAL]
---------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=()
-----------------PhysicalProject
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF3 ws_order_number->[ws_order_number]
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk]
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk]
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk]
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk]
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk]
+--------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=()
 ----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk]
+------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01'))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3
 ----------------------------PhysicalProject
-------------------------------filter((customer_address.ca_state = 'OK'))
---------------------------------PhysicalOlapScan[customer_address]
-------------------------PhysicalProject
---------------------------filter((web_site.web_company_name = 'pri'))
-----------------------------PhysicalOlapScan[web_site]
---------------------PhysicalProject
-----------------------PhysicalOlapScan[web_sales]
-----------------PhysicalProject
-------------------PhysicalOlapScan[web_returns]
+------------------------------PhysicalOlapScan[web_returns]
+--------------------------PhysicalProject
+----------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01'))
+------------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalProject
+------------------------filter((customer_address.ca_state = 'OK'))
+--------------------------PhysicalOlapScan[customer_address]
+------------------PhysicalProject
+--------------------filter((web_site.web_company_name = 'pri'))
+----------------------PhysicalOlapScan[web_site]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query95.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query95.out
index 22a8e25293f..aaaba243279 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query95.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query95.out
@@ -5,9 +5,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----PhysicalProject
 ------hashJoin[INNER_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number];RF1 ws_order_number->[ws_order_number]
 --------PhysicalProject
-----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF12 RF13
+----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF14 RF15
 --------PhysicalProject
-----------PhysicalOlapScan[web_sales] apply RFs: RF12 RF13
+----------PhysicalOlapScan[web_sales] apply RFs: RF14 RF15
 --PhysicalResultSink
 ----PhysicalTopN[GATHER_SORT]
 ------hashAgg[DISTINCT_GLOBAL]
@@ -15,29 +15,29 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------hashAgg[DISTINCT_LOCAL]
 ------------hashAgg[GLOBAL]
 --------------hashAgg[LOCAL]
-----------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF10 wr_order_number->[ws_order_number,ws_order_number];RF11 wr_order_number->[ws_order_number,ws_order_number]
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=()
+----------------PhysicalProject
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF12 web_site_sk->[ws_web_site_sk];RF13 web_site_sk->[ws_web_site_sk]
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF8 web_site_sk->[ws_web_site_sk];RF9 web_site_sk->[ws_web_site_sk]
+----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_ship_addr_sk];RF11 ca_address_sk->[ws_ship_addr_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[ws_ship_addr_sk];RF7 ca_address_sk->[ws_ship_addr_sk]
-----------------------------PhysicalProject
-------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_ship_date_sk];RF5 d_date_sk->[ws_ship_date_sk]
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_ship_date_sk];RF9 d_date_sk->[ws_ship_date_sk]
+----------------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF6 ws_order_number->[ws_order_number];RF7 ws_order_number->[ws_order_number]
+------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 RF7
+------------------------------hashJoin[RIGHT_SEMI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[wr_order_number];RF5 ws_order_number->[wr_order_number];RF14 ws_order_number->[ws_order_number,ws_order_number];RF15 ws_order_number->[ws_order_number,ws_order_number]
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF6 RF7 RF8 RF9 RF10 RF11
+----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF2 wr_order_number->[ws_order_number];RF3 wr_order_number->[ws_order_number]
+------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 RF3
+------------------------------------PhysicalProject
+--------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 RF5
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01'))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 RF10 RF11 RF12 RF13
 ----------------------------PhysicalProject
-------------------------------filter((customer_address.ca_state = 'NC'))
---------------------------------PhysicalOlapScan[customer_address]
+------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01'))
+--------------------------------PhysicalOlapScan[date_dim]
 ------------------------PhysicalProject
---------------------------filter((web_site.web_company_name = 'pri'))
-----------------------------PhysicalOlapScan[web_site]
---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF10 RF11
-------------------PhysicalProject
---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF12 wr_order_number->[ws_order_number,ws_order_number];RF13 wr_order_number->[ws_order_number,ws_order_number]
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
-----------------------PhysicalProject
-------------------------PhysicalOlapScan[web_returns]
+--------------------------filter((customer_address.ca_state = 'NC'))
+----------------------------PhysicalOlapScan[customer_address]
+--------------------PhysicalProject
+----------------------filter((web_site.web_company_name = 'pri'))
+------------------------PhysicalOlapScan[web_site]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query2.out b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query2.out
index 37ce4e601a4..5888221893d 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query2.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query2.out
@@ -21,7 +21,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalQuickSort[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffle] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=()
+------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=()
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN shuffle] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq]
 ------------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query23.out b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query23.out
index 42749d017c8..3ac1b889aec 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query23.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query23.out
@@ -51,31 +51,30 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------PhysicalDistribute[DistributionSpecGather]
 ------------hashAgg[LOCAL]
 --------------PhysicalUnion
-----------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------PhysicalProject
---------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
-----------------------PhysicalProject
-------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 ----------------PhysicalProject
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF4 cs_item_sk->[item_sk]
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4
+--------------------PhysicalProject
+----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
+----------------PhysicalProject
+------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF6 ws_item_sk->[item_sk]
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6
 --------------------PhysicalProject
 ----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
 ------------------------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]
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
 ----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF5
 ----------------------------PhysicalProject
 ------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
 --------------------------------PhysicalOlapScan[date_dim]
 ------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
---------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query34.out b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query34.out
index eb76afa75d1..bb286ee190e 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query34.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query34.out
@@ -5,7 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalQuickSort[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk]
+----------hashJoin[INNER_JOIN shuffle] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk]
 ------------PhysicalProject
 --------------PhysicalOlapScan[customer] apply RFs: RF3
 ------------filter((dn.cnt <= 20) and (dn.cnt >= 15))
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query64.out b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query64.out
index 93ca3c00cb7..d60b114a56b 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query64.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query64.out
@@ -52,25 +52,25 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 --------------------------------------------------PhysicalProject
 ----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = hd1.hd_demo_sk)) otherCondition=()
 ------------------------------------------------------PhysicalProject
---------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk]
+--------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF3 cs_item_sk->[ss_item_sk]
 ----------------------------------------------------------PhysicalProject
-------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[ss_item_sk]
+------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk]
 --------------------------------------------------------------PhysicalProject
 ----------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF8
 --------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------filter((sale > (2 * refund)))
-------------------------------------------------------------------hashAgg[GLOBAL]
---------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
-----------------------------------------------------------------------hashAgg[LOCAL]
-------------------------------------------------------------------------PhysicalProject
---------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=()
-----------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8
-----------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF8
+----------------------------------------------------------------filter(d_year IN (2001, 2002))
+------------------------------------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------------------------------------PhysicalProject
-------------------------------------------------------------filter(d_year IN (2001, 2002))
---------------------------------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------------------------------filter((sale > (2 * refund)))
+--------------------------------------------------------------hashAgg[GLOBAL]
+----------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
+------------------------------------------------------------------hashAgg[LOCAL]
+--------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=()
+------------------------------------------------------------------------PhysicalProject
+--------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8
+------------------------------------------------------------------------PhysicalProject
+--------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF8
 ------------------------------------------------------PhysicalProject
 --------------------------------------------------------PhysicalOlapScan[household_demographics]
 --------------------------------------------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query74.out b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query74.out
index 30aa2cbdd80..d58dde1f36c 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query74.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query74.out
@@ -35,7 +35,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalTopN[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL)))
+------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL)))
+--------------PhysicalProject
+----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000))
+------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=()
 ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=()
@@ -48,7 +51,4 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------------------PhysicalProject
 --------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0))
 ----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
---------------PhysicalProject
-----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000))
-------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query9.out b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query9.out
index f159ed97647..06cd8f92785 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query9.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query9.out
@@ -1,8 +1,8 @@
 -- This file is automatically generated. You should know what you did if you want to edit this
 -- !ds_shape_9 --
 PhysicalResultSink
---PhysicalProject
-----NestedLoopJoin[CROSS_JOIN]
+--PhysicalDistribute[DistributionSpecGather]
+----PhysicalProject
 ------NestedLoopJoin[CROSS_JOIN]
 --------NestedLoopJoin[CROSS_JOIN]
 ----------NestedLoopJoin[CROSS_JOIN]
@@ -16,17 +16,24 @@ PhysicalResultSink
 --------------------------NestedLoopJoin[CROSS_JOIN]
 ----------------------------NestedLoopJoin[CROSS_JOIN]
 ------------------------------NestedLoopJoin[CROSS_JOIN]
---------------------------------PhysicalProject
-----------------------------------NestedLoopJoin[CROSS_JOIN]
-------------------------------------hashAgg[GLOBAL]
---------------------------------------PhysicalDistribute[DistributionSpecGather]
-----------------------------------------hashAgg[LOCAL]
-------------------------------------------PhysicalProject
---------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
-----------------------------------------------PhysicalOlapScan[store_sales]
-------------------------------------PhysicalProject
---------------------------------------filter((reason.r_reason_sk = 1))
-----------------------------------------PhysicalOlapScan[reason]
+--------------------------------NestedLoopJoin[CROSS_JOIN]
+----------------------------------PhysicalProject
+------------------------------------NestedLoopJoin[CROSS_JOIN]
+--------------------------------------PhysicalProject
+----------------------------------------filter((reason.r_reason_sk = 1))
+------------------------------------------PhysicalOlapScan[reason]
+--------------------------------------hashAgg[GLOBAL]
+----------------------------------------PhysicalDistribute[DistributionSpecGather]
+------------------------------------------hashAgg[LOCAL]
+--------------------------------------------PhysicalProject
+----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+------------------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------hashAgg[GLOBAL]
+------------------------------------PhysicalDistribute[DistributionSpecGather]
+--------------------------------------hashAgg[LOCAL]
+----------------------------------------PhysicalProject
+------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+--------------------------------------------PhysicalOlapScan[store_sales]
 --------------------------------hashAgg[GLOBAL]
 ----------------------------------PhysicalDistribute[DistributionSpecGather]
 ------------------------------------hashAgg[LOCAL]
@@ -37,7 +44,7 @@ PhysicalResultSink
 --------------------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------------------hashAgg[LOCAL]
 ------------------------------------PhysicalProject
---------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+--------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
 ----------------------------------------PhysicalOlapScan[store_sales]
 ----------------------------hashAgg[GLOBAL]
 ------------------------------PhysicalDistribute[DistributionSpecGather]
@@ -55,7 +62,7 @@ PhysicalResultSink
 --------------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------------hashAgg[LOCAL]
 ------------------------------PhysicalProject
---------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
+--------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
 ----------------------------------PhysicalOlapScan[store_sales]
 ----------------------hashAgg[GLOBAL]
 ------------------------PhysicalDistribute[DistributionSpecGather]
@@ -73,7 +80,7 @@ PhysicalResultSink
 --------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------hashAgg[LOCAL]
 ------------------------PhysicalProject
---------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
+--------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
 ----------------------------PhysicalOlapScan[store_sales]
 ----------------hashAgg[GLOBAL]
 ------------------PhysicalDistribute[DistributionSpecGather]
@@ -91,7 +98,7 @@ PhysicalResultSink
 --------------PhysicalDistribute[DistributionSpecGather]
 ----------------hashAgg[LOCAL]
 ------------------PhysicalProject
---------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
+--------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
 ----------------------PhysicalOlapScan[store_sales]
 ----------hashAgg[GLOBAL]
 ------------PhysicalDistribute[DistributionSpecGather]
@@ -105,10 +112,4 @@ PhysicalResultSink
 --------------PhysicalProject
 ----------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
 ------------------PhysicalOlapScan[store_sales]
-------hashAgg[GLOBAL]
---------PhysicalDistribute[DistributionSpecGather]
-----------hashAgg[LOCAL]
-------------PhysicalProject
---------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
-----------------PhysicalOlapScan[store_sales]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query2.out b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query2.out
index 541ee756a8e..988b288ebb8 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query2.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query2.out
@@ -21,7 +21,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalQuickSort[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffle] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=()
+------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=()
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN shuffle] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq]
 ------------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query23.out b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query23.out
index 566c5c19bcb..7ae34bb3eb2 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query23.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query23.out
@@ -51,31 +51,30 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------PhysicalDistribute[DistributionSpecGather]
 ------------hashAgg[LOCAL]
 --------------PhysicalUnion
-----------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------PhysicalProject
---------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
-----------------------PhysicalProject
-------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 ----------------PhysicalProject
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF4 cs_item_sk->[item_sk]
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4
+--------------------PhysicalProject
+----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
+----------------PhysicalProject
+------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF6 ws_item_sk->[item_sk]
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6
 --------------------PhysicalProject
 ----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
 ------------------------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]
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
 ----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF5
 ----------------------------PhysicalProject
 ------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000))
 --------------------------------PhysicalOlapScan[date_dim]
 ------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
---------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query34.out b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query34.out
index eb76afa75d1..bb286ee190e 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query34.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query34.out
@@ -5,7 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------PhysicalQuickSort[LOCAL_SORT]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk]
+----------hashJoin[INNER_JOIN shuffle] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk]
 ------------PhysicalProject
 --------------PhysicalOlapScan[customer] apply RFs: RF3
 ------------filter((dn.cnt <= 20) and (dn.cnt >= 15))
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query64.out b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query64.out
index 1c56418fda0..cba6aec962c 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query64.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query64.out
@@ -52,25 +52,25 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 --------------------------------------------------PhysicalProject
 ----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = hd1.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ss_hdemo_sk]
 ------------------------------------------------------PhysicalProject
---------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk]
+--------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF3 cs_item_sk->[ss_item_sk]
 ----------------------------------------------------------PhysicalProject
-------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[ss_item_sk]
+------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk]
 --------------------------------------------------------------PhysicalProject
 ----------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF4 RF6 RF7 RF8
 --------------------------------------------------------------PhysicalProject
-----------------------------------------------------------------filter((sale > (2 * refund)))
-------------------------------------------------------------------hashAgg[GLOBAL]
---------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
-----------------------------------------------------------------------hashAgg[LOCAL]
-------------------------------------------------------------------------PhysicalProject
---------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cr_item_sk->[cs_item_sk];RF1 cr_order_number->[cs_order_number]
-----------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF8
-----------------------------------------------------------------------------PhysicalProject
-------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF8
+----------------------------------------------------------------filter(d_year IN (2001, 2002))
+------------------------------------------------------------------PhysicalOlapScan[date_dim]
 ----------------------------------------------------------PhysicalProject
-------------------------------------------------------------filter(d_year IN (2001, 2002))
---------------------------------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------------------------------filter((sale > (2 * refund)))
+--------------------------------------------------------------hashAgg[GLOBAL]
+----------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
+------------------------------------------------------------------hashAgg[LOCAL]
+--------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cr_item_sk->[cs_item_sk];RF1 cr_order_number->[cs_order_number]
+------------------------------------------------------------------------PhysicalProject
+--------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF8
+------------------------------------------------------------------------PhysicalProject
+--------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF8
 ------------------------------------------------------PhysicalProject
 --------------------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF5
 --------------------------------------------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query74.out b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query74.out
index 4ae46b69b11..415df0902a0 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query74.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query74.out
@@ -35,7 +35,10 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalTopN[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL)))
+------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL)))
+--------------PhysicalProject
+----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000))
+------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=()
 ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=()
@@ -48,7 +51,4 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------------------PhysicalProject
 --------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0))
 ----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
---------------PhysicalProject
-----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000))
-------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query9.out b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query9.out
index f159ed97647..06cd8f92785 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query9.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query9.out
@@ -1,8 +1,8 @@
 -- This file is automatically generated. You should know what you did if you want to edit this
 -- !ds_shape_9 --
 PhysicalResultSink
---PhysicalProject
-----NestedLoopJoin[CROSS_JOIN]
+--PhysicalDistribute[DistributionSpecGather]
+----PhysicalProject
 ------NestedLoopJoin[CROSS_JOIN]
 --------NestedLoopJoin[CROSS_JOIN]
 ----------NestedLoopJoin[CROSS_JOIN]
@@ -16,17 +16,24 @@ PhysicalResultSink
 --------------------------NestedLoopJoin[CROSS_JOIN]
 ----------------------------NestedLoopJoin[CROSS_JOIN]
 ------------------------------NestedLoopJoin[CROSS_JOIN]
---------------------------------PhysicalProject
-----------------------------------NestedLoopJoin[CROSS_JOIN]
-------------------------------------hashAgg[GLOBAL]
---------------------------------------PhysicalDistribute[DistributionSpecGather]
-----------------------------------------hashAgg[LOCAL]
-------------------------------------------PhysicalProject
---------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
-----------------------------------------------PhysicalOlapScan[store_sales]
-------------------------------------PhysicalProject
---------------------------------------filter((reason.r_reason_sk = 1))
-----------------------------------------PhysicalOlapScan[reason]
+--------------------------------NestedLoopJoin[CROSS_JOIN]
+----------------------------------PhysicalProject
+------------------------------------NestedLoopJoin[CROSS_JOIN]
+--------------------------------------PhysicalProject
+----------------------------------------filter((reason.r_reason_sk = 1))
+------------------------------------------PhysicalOlapScan[reason]
+--------------------------------------hashAgg[GLOBAL]
+----------------------------------------PhysicalDistribute[DistributionSpecGather]
+------------------------------------------hashAgg[LOCAL]
+--------------------------------------------PhysicalProject
+----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+------------------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------hashAgg[GLOBAL]
+------------------------------------PhysicalDistribute[DistributionSpecGather]
+--------------------------------------hashAgg[LOCAL]
+----------------------------------------PhysicalProject
+------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+--------------------------------------------PhysicalOlapScan[store_sales]
 --------------------------------hashAgg[GLOBAL]
 ----------------------------------PhysicalDistribute[DistributionSpecGather]
 ------------------------------------hashAgg[LOCAL]
@@ -37,7 +44,7 @@ PhysicalResultSink
 --------------------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------------------hashAgg[LOCAL]
 ------------------------------------PhysicalProject
---------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+--------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
 ----------------------------------------PhysicalOlapScan[store_sales]
 ----------------------------hashAgg[GLOBAL]
 ------------------------------PhysicalDistribute[DistributionSpecGather]
@@ -55,7 +62,7 @@ PhysicalResultSink
 --------------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------------hashAgg[LOCAL]
 ------------------------------PhysicalProject
---------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
+--------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
 ----------------------------------PhysicalOlapScan[store_sales]
 ----------------------hashAgg[GLOBAL]
 ------------------------PhysicalDistribute[DistributionSpecGather]
@@ -73,7 +80,7 @@ PhysicalResultSink
 --------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------hashAgg[LOCAL]
 ------------------------PhysicalProject
---------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
+--------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
 ----------------------------PhysicalOlapScan[store_sales]
 ----------------hashAgg[GLOBAL]
 ------------------PhysicalDistribute[DistributionSpecGather]
@@ -91,7 +98,7 @@ PhysicalResultSink
 --------------PhysicalDistribute[DistributionSpecGather]
 ----------------hashAgg[LOCAL]
 ------------------PhysicalProject
---------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
+--------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
 ----------------------PhysicalOlapScan[store_sales]
 ----------hashAgg[GLOBAL]
 ------------PhysicalDistribute[DistributionSpecGather]
@@ -105,10 +112,4 @@ PhysicalResultSink
 --------------PhysicalProject
 ----------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
 ------------------PhysicalOlapScan[store_sales]
-------hashAgg[GLOBAL]
---------PhysicalDistribute[DistributionSpecGather]
-----------hashAgg[LOCAL]
-------------PhysicalProject
---------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
-----------------PhysicalOlapScan[store_sales]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query17.out b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query17.out
index 72cbc31559e..12fa11701b6 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query17.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query17.out
@@ -9,7 +9,7 @@ PhysicalResultSink
 ------------PhysicalDistribute[DistributionSpecHash]
 --------------hashAgg[LOCAL]
 ----------------PhysicalProject
-------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk]
+------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk]
 --------------------PhysicalProject
 ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk]
 ------------------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query2.out b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query2.out
index 541ee756a8e..988b288ebb8 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query2.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query2.out
@@ -21,7 +21,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 ------PhysicalDistribute[DistributionSpecGather]
 --------PhysicalQuickSort[LOCAL_SORT]
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN shuffle] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=()
+------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(d_week_seq2 - 53))) otherCondition=()
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN shuffle] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq]
 ------------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query23.out b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query23.out
index 6b6de578570..480608162ed 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query23.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query23.out
@@ -51,31 +51,30 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------PhysicalDistribute[DistributionSpecGather]
 ------------hashAgg[LOCAL]
 --------------PhysicalUnion
-----------------PhysicalDistribute[DistributionSpecExecutionAny]
-------------------PhysicalProject
---------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=()
-----------------------PhysicalProject
-------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
-------------------------------PhysicalProject
---------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000))
-----------------------------------PhysicalOlapScan[date_dim]
---------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
-----------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 ----------------PhysicalProject
-------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=()
+------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF4 cs_item_sk->[item_sk]
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4
+--------------------PhysicalProject
+----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3
+----------------------------PhysicalProject
+------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000))
+--------------------------------PhysicalOlapScan[date_dim]
+------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
+----------------PhysicalProject
+------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF6 ws_item_sk->[item_sk]
+--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6
 --------------------PhysicalProject
 ----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=()
 ------------------------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]
+--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk]
 ----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4
+------------------------------PhysicalOlapScan[web_sales] apply RFs: RF5
 ----------------------------PhysicalProject
 ------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000))
 --------------------------------PhysicalOlapScan[date_dim]
 ------------------------PhysicalCteConsumer ( cteId=CTEId#2 )
---------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query29.out b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query29.out
index c5c2f1078cf..649a6f83d97 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query29.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query29.out
@@ -14,9 +14,9 @@ PhysicalResultSink
 ----------------------PhysicalProject
 ------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9
 ----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk]
+------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[sr_item_sk,ss_item_sk]
 --------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[sr_item_sk,ss_item_sk]
+----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk]
 ------------------------------PhysicalProject
 --------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number]
 ----------------------------------PhysicalProject
@@ -29,14 +29,14 @@ PhysicalResultSink
 ----------------------------------PhysicalProject
 ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk]
 --------------------------------------PhysicalProject
-----------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF5
+----------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF6
 --------------------------------------PhysicalProject
 ----------------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1998))
 ------------------------------------------PhysicalOlapScan[date_dim]
 ------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[item]
+--------------------------------PhysicalOlapScan[store]
 --------------------------PhysicalProject
-----------------------------PhysicalOlapScan[store]
+----------------------------PhysicalOlapScan[item]
 ------------------PhysicalProject
 --------------------filter(d_year IN (1998, 1999, 2000))
 ----------------------PhysicalOlapScan[date_dim]
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query64.out b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query64.out
index 0a9d2d7f2db..4114b30062a 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query64.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query64.out
@@ -20,42 +20,42 @@ PhysicalCteAnchor ( cteId=CTEId#1 )
 ----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF14 RF15
 --------------------------------PhysicalProject
 ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF13 cd_demo_sk->[ss_cdemo_sk]
-------------------------------------PhysicalProject
---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF12 cs_item_sk->[i_item_sk,ss_item_sk]
-----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ss_item_sk]
+------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[cr_item_sk,cs_item_sk,ss_item_sk]
+--------------------------------------PhysicalProject
+----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF11 s_store_sk->[ss_store_sk]
 ------------------------------------------PhysicalProject
---------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF10 s_store_sk->[ss_store_sk]
+--------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd1.hd_income_band_sk = ib1.ib_income_band_sk)) otherCondition=() build RFs:RF10 ib_income_band_sk->[hd_income_band_sk]
 ----------------------------------------------PhysicalProject
-------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd1.hd_income_band_sk = ib1.ib_income_band_sk)) otherCondition=() build RFs:RF9 ib_income_band_sk->[hd_income_band_sk]
+------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = hd1.hd_demo_sk)) otherCondition=() build RFs:RF9 hd_demo_sk->[ss_hdemo_sk]
 --------------------------------------------------PhysicalProject
-----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = hd1.hd_demo_sk)) otherCondition=() build RFs:RF8 hd_demo_sk->[ss_hdemo_sk]
+----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF8 cs_item_sk->[ss_item_sk]
 ------------------------------------------------------PhysicalProject
 --------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk]
 ----------------------------------------------------------PhysicalProject
-------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF7 RF8 RF10 RF11 RF12 RF13 RF16 RF17 RF18
+------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF7 RF8 RF9 RF11 RF12 RF13 RF16 RF17 RF18
 ----------------------------------------------------------PhysicalProject
 ------------------------------------------------------------filter(d_year IN (1999, 2000))
 --------------------------------------------------------------PhysicalOlapScan[date_dim]
 ------------------------------------------------------PhysicalProject
---------------------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF9
+--------------------------------------------------------filter((sale > (2 * refund)))
+----------------------------------------------------------hashAgg[GLOBAL]
+------------------------------------------------------------PhysicalDistribute[DistributionSpecHash]
+--------------------------------------------------------------hashAgg[LOCAL]
+----------------------------------------------------------------PhysicalProject
+------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF5 cr_item_sk->[cs_item_sk];RF6 cr_order_number->[cs_order_number]
+--------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF12
+--------------------------------------------------------------------PhysicalProject
+----------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF12
 --------------------------------------------------PhysicalProject
-----------------------------------------------------PhysicalOlapScan[income_band]
+----------------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF10
 ----------------------------------------------PhysicalProject
-------------------------------------------------PhysicalOlapScan[store]
+------------------------------------------------PhysicalOlapScan[income_band]
 ------------------------------------------PhysicalProject
---------------------------------------------filter((item.i_current_price <= 58.00) and (item.i_current_price >= 49.00) and i_color IN ('blush', 'lace', 'lawn', 'misty', 'orange', 'pink'))
-----------------------------------------------PhysicalOlapScan[item] apply RFs: RF12
-----------------------------------------PhysicalProject
-------------------------------------------filter((sale > (2 * refund)))
---------------------------------------------hashAgg[GLOBAL]
-----------------------------------------------PhysicalDistribute[DistributionSpecHash]
-------------------------------------------------hashAgg[LOCAL]
---------------------------------------------------PhysicalProject
-----------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF5 cr_item_sk->[cs_item_sk];RF6 cr_order_number->[cs_order_number]
-------------------------------------------------------PhysicalProject
---------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6
-------------------------------------------------------PhysicalProject
---------------------------------------------------------PhysicalOlapScan[catalog_returns]
+--------------------------------------------PhysicalOlapScan[store]
+--------------------------------------PhysicalProject
+----------------------------------------filter((item.i_current_price <= 58.00) and (item.i_current_price >= 49.00) and i_color IN ('blush', 'lace', 'lawn', 'misty', 'orange', 'pink'))
+------------------------------------------PhysicalOlapScan[item]
 ------------------------------------PhysicalProject
 --------------------------------------PhysicalOlapScan[customer_demographics]
 ----------------------------PhysicalProject
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query9.out b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query9.out
index f159ed97647..06cd8f92785 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query9.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query9.out
@@ -1,8 +1,8 @@
 -- This file is automatically generated. You should know what you did if you want to edit this
 -- !ds_shape_9 --
 PhysicalResultSink
---PhysicalProject
-----NestedLoopJoin[CROSS_JOIN]
+--PhysicalDistribute[DistributionSpecGather]
+----PhysicalProject
 ------NestedLoopJoin[CROSS_JOIN]
 --------NestedLoopJoin[CROSS_JOIN]
 ----------NestedLoopJoin[CROSS_JOIN]
@@ -16,17 +16,24 @@ PhysicalResultSink
 --------------------------NestedLoopJoin[CROSS_JOIN]
 ----------------------------NestedLoopJoin[CROSS_JOIN]
 ------------------------------NestedLoopJoin[CROSS_JOIN]
---------------------------------PhysicalProject
-----------------------------------NestedLoopJoin[CROSS_JOIN]
-------------------------------------hashAgg[GLOBAL]
---------------------------------------PhysicalDistribute[DistributionSpecGather]
-----------------------------------------hashAgg[LOCAL]
-------------------------------------------PhysicalProject
---------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
-----------------------------------------------PhysicalOlapScan[store_sales]
-------------------------------------PhysicalProject
---------------------------------------filter((reason.r_reason_sk = 1))
-----------------------------------------PhysicalOlapScan[reason]
+--------------------------------NestedLoopJoin[CROSS_JOIN]
+----------------------------------PhysicalProject
+------------------------------------NestedLoopJoin[CROSS_JOIN]
+--------------------------------------PhysicalProject
+----------------------------------------filter((reason.r_reason_sk = 1))
+------------------------------------------PhysicalOlapScan[reason]
+--------------------------------------hashAgg[GLOBAL]
+----------------------------------------PhysicalDistribute[DistributionSpecGather]
+------------------------------------------hashAgg[LOCAL]
+--------------------------------------------PhysicalProject
+----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+------------------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------hashAgg[GLOBAL]
+------------------------------------PhysicalDistribute[DistributionSpecGather]
+--------------------------------------hashAgg[LOCAL]
+----------------------------------------PhysicalProject
+------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+--------------------------------------------PhysicalOlapScan[store_sales]
 --------------------------------hashAgg[GLOBAL]
 ----------------------------------PhysicalDistribute[DistributionSpecGather]
 ------------------------------------hashAgg[LOCAL]
@@ -37,7 +44,7 @@ PhysicalResultSink
 --------------------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------------------hashAgg[LOCAL]
 ------------------------------------PhysicalProject
---------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
+--------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
 ----------------------------------------PhysicalOlapScan[store_sales]
 ----------------------------hashAgg[GLOBAL]
 ------------------------------PhysicalDistribute[DistributionSpecGather]
@@ -55,7 +62,7 @@ PhysicalResultSink
 --------------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------------hashAgg[LOCAL]
 ------------------------------PhysicalProject
---------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
+--------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
 ----------------------------------PhysicalOlapScan[store_sales]
 ----------------------hashAgg[GLOBAL]
 ------------------------PhysicalDistribute[DistributionSpecGather]
@@ -73,7 +80,7 @@ PhysicalResultSink
 --------------------PhysicalDistribute[DistributionSpecGather]
 ----------------------hashAgg[LOCAL]
 ------------------------PhysicalProject
---------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
+--------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
 ----------------------------PhysicalOlapScan[store_sales]
 ----------------hashAgg[GLOBAL]
 ------------------PhysicalDistribute[DistributionSpecGather]
@@ -91,7 +98,7 @@ PhysicalResultSink
 --------------PhysicalDistribute[DistributionSpecGather]
 ----------------hashAgg[LOCAL]
 ------------------PhysicalProject
---------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
+--------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
 ----------------------PhysicalOlapScan[store_sales]
 ----------hashAgg[GLOBAL]
 ------------PhysicalDistribute[DistributionSpecGather]
@@ -105,10 +112,4 @@ PhysicalResultSink
 --------------PhysicalProject
 ----------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
 ------------------PhysicalOlapScan[store_sales]
-------hashAgg[GLOBAL]
---------PhysicalDistribute[DistributionSpecGather]
-----------hashAgg[LOCAL]
-------------PhysicalProject
---------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
-----------------PhysicalOlapScan[store_sales]
 
diff --git a/regression-test/data/new_shapes_p0/tpch_sf1000/nostats_rf_prune/q19.out b/regression-test/data/new_shapes_p0/tpch_sf1000/nostats_rf_prune/q19.out
index 60e7b8446bd..8f425073388 100644
--- a/regression-test/data/new_shapes_p0/tpch_sf1000/nostats_rf_prune/q19.out
+++ b/regression-test/data/new_shapes_p0/tpch_sf1000/nostats_rf_prune/q19.out
@@ -5,7 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------hashAgg[LOCAL]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=(((((((part.p_brand = 'Brand#12') AND p_container IN ('SM BOX', 'SM CASE', 'SM PACK', 'SM PKG')) AND ((lineitem.l_quantity >= 1.00) AND (lineitem.l_quantity <= 11.00))) AND (part.p_size <= 5)) OR ((((part.p_brand = 'Brand#23') AND p_container IN ('MED BAG', 'MED BOX', 'MED PACK', 'MED PKG')) AND ((lineitem.l_quantity >= 10.00) AND (lineitem.l_quantity <= 20.00))) AND (part.p_size [...]
+----------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=(((((((part.p_brand = 'Brand#12') AND p_container IN ('SM BOX', 'SM CASE', 'SM PACK', 'SM PKG')) AND ((lineitem.l_quantity >= 1.00) AND (lineitem.l_quantity <= 11.00))) AND (part.p_size <= 5)) OR ((((part.p_brand = 'Brand#23') AND p_container IN ('MED BAG', 'MED BOX', 'MED PACK', 'MED PKG')) AND ((lineitem.l_quantity >= 10.00) AND (lineitem.l_quantity <= 20.00))) AND (part.p_ [...]
 ------------PhysicalProject
 --------------filter((lineitem.l_quantity <= 30.00) and (lineitem.l_quantity >= 1.00) and (lineitem.l_shipinstruct = 'DELIVER IN PERSON') and l_shipmode IN ('AIR REG', 'AIR'))
 ----------------PhysicalOlapScan[lineitem] apply RFs: RF0
diff --git a/regression-test/data/new_shapes_p0/tpch_sf1000/shape_no_stats/q19.out b/regression-test/data/new_shapes_p0/tpch_sf1000/shape_no_stats/q19.out
index 60e7b8446bd..8f425073388 100644
--- a/regression-test/data/new_shapes_p0/tpch_sf1000/shape_no_stats/q19.out
+++ b/regression-test/data/new_shapes_p0/tpch_sf1000/shape_no_stats/q19.out
@@ -5,7 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute[DistributionSpecGather]
 ------hashAgg[LOCAL]
 --------PhysicalProject
-----------hashJoin[INNER_JOIN broadcast] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=(((((((part.p_brand = 'Brand#12') AND p_container IN ('SM BOX', 'SM CASE', 'SM PACK', 'SM PKG')) AND ((lineitem.l_quantity >= 1.00) AND (lineitem.l_quantity <= 11.00))) AND (part.p_size <= 5)) OR ((((part.p_brand = 'Brand#23') AND p_container IN ('MED BAG', 'MED BOX', 'MED PACK', 'MED PKG')) AND ((lineitem.l_quantity >= 10.00) AND (lineitem.l_quantity <= 20.00))) AND (part.p_size [...]
+----------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=(((((((part.p_brand = 'Brand#12') AND p_container IN ('SM BOX', 'SM CASE', 'SM PACK', 'SM PKG')) AND ((lineitem.l_quantity >= 1.00) AND (lineitem.l_quantity <= 11.00))) AND (part.p_size <= 5)) OR ((((part.p_brand = 'Brand#23') AND p_container IN ('MED BAG', 'MED BOX', 'MED PACK', 'MED PKG')) AND ((lineitem.l_quantity >= 10.00) AND (lineitem.l_quantity <= 20.00))) AND (part.p_ [...]
 ------------PhysicalProject
 --------------filter((lineitem.l_quantity <= 30.00) and (lineitem.l_quantity >= 1.00) and (lineitem.l_shipinstruct = 'DELIVER IN PERSON') and l_shipmode IN ('AIR REG', 'AIR'))
 ----------------PhysicalOlapScan[lineitem] apply RFs: RF0


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