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

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


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new a1deb9c4e96 [Pick](nereids) pick #28860 "not is null" stats estimation 
fix (#29209)
a1deb9c4e96 is described below

commit a1deb9c4e96c00a4058fa697aa82644f31d746c6
Author: minghong <[email protected]>
AuthorDate: Thu Dec 28 17:27:58 2023 +0800

    [Pick](nereids) pick #28860 "not is null" stats estimation fix (#29209)
---
 .../doris/nereids/stats/FilterEstimation.java      |  3 +-
 .../doris/nereids/stats/FilterEstimationTest.java  | 38 ++++++++++++
 .../shape/query76.out                              | 52 ++++++++++++++++
 .../shape/query95.out                              | 53 ++++++++++++++++
 .../shape/query97.out                              | 37 +++++++++++
 .../noStatsRfPrune/query95.out                     | 53 ++++++++++++++++
 .../no_stats_shape/query95.out                     | 53 ++++++++++++++++
 .../rf_prune/query44.out                           | 71 ++++++++++++++++++++++
 .../rf_prune/query76.out                           | 50 +++++++++++++++
 .../rf_prune/query95.out                           | 53 ++++++++++++++++
 .../nereids_tpcds_shape_sf100_p0/shape/query11.out |  2 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query14.out |  8 +--
 .../nereids_tpcds_shape_sf100_p0/shape/query31.out |  4 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query4.out  |  4 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query44.out | 54 ++++++++--------
 .../nereids_tpcds_shape_sf100_p0/shape/query47.out |  2 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query49.out |  4 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query53.out |  2 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query57.out |  2 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query63.out |  2 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query73.out |  2 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query76.out | 53 ++++++++--------
 .../nereids_tpcds_shape_sf100_p0/shape/query78.out | 48 +++++++--------
 .../nereids_tpcds_shape_sf100_p0/shape/query87.out |  2 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query89.out |  2 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query90.out |  2 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query94.out | 53 ++++++++--------
 .../nereids_tpcds_shape_sf100_p0/shape/query95.out | 59 +++++++++---------
 .../nereids_tpcds_shape_sf100_p0/rf/ds_rf76.groovy |  2 +-
 .../nereids_tpcds_shape_sf100_p0/rf/ds_rf78.groovy |  2 +-
 .../test_partial_update_seq_col.groovy             | 10 +--
 31 files changed, 619 insertions(+), 163 deletions(-)

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 d5c9ded22e3..b716b350f24 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
@@ -414,7 +414,8 @@ public class FilterEstimation extends 
ExpressionVisitor<Statistics, EstimationCo
                 .setMinValue(Double.NEGATIVE_INFINITY)
                 .setNdv(0);
         StatisticsBuilder builder = new StatisticsBuilder(context.statistics);
-        builder.putColumnStatistics(isNull.child(), colBuilder.build());
+        builder.setRowCount(outputRowCount);
+        builder.putColumnStatistics(isNull, colBuilder.build());
         context.addKeyIfSlot(isNull.child());
         return builder.build();
     }
diff --git 
a/fe/fe-core/src/test/java/org/apache/doris/nereids/stats/FilterEstimationTest.java
 
b/fe/fe-core/src/test/java/org/apache/doris/nereids/stats/FilterEstimationTest.java
index 31affe06252..888ec139df1 100644
--- 
a/fe/fe-core/src/test/java/org/apache/doris/nereids/stats/FilterEstimationTest.java
+++ 
b/fe/fe-core/src/test/java/org/apache/doris/nereids/stats/FilterEstimationTest.java
@@ -25,6 +25,7 @@ import org.apache.doris.nereids.trees.expressions.Expression;
 import org.apache.doris.nereids.trees.expressions.GreaterThan;
 import org.apache.doris.nereids.trees.expressions.GreaterThanEqual;
 import org.apache.doris.nereids.trees.expressions.InPredicate;
+import org.apache.doris.nereids.trees.expressions.IsNull;
 import org.apache.doris.nereids.trees.expressions.LessThan;
 import org.apache.doris.nereids.trees.expressions.LessThanEqual;
 import org.apache.doris.nereids.trees.expressions.Not;
@@ -872,4 +873,41 @@ class FilterEstimationTest {
         Statistics result = filterEstimation.estimate(greaterThan, stats);
         Assertions.assertEquals(result.getRowCount(), 10, 0.1);
     }
+
+    @Test
+    public void testIsNull() {
+        SlotReference a = new SlotReference("a", IntegerType.INSTANCE);
+        ColumnStatisticBuilder builder = new ColumnStatisticBuilder()
+                .setNdv(100)
+                .setAvgSizeByte(4)
+                .setNumNulls(10)
+                .setMaxValue(100)
+                .setMinValue(0)
+                .setCount(100);
+        IsNull isNull = new IsNull(a);
+        Statistics stats = new Statistics(100, new HashMap<>());
+        stats.addColumnStats(a, builder.build());
+        FilterEstimation filterEstimation = new FilterEstimation();
+        Statistics result = filterEstimation.estimate(isNull, stats);
+        Assertions.assertEquals(result.getRowCount(), 10);
+    }
+
+    @Test
+    public void testIsNotNull() {
+        SlotReference a = new SlotReference("a", IntegerType.INSTANCE);
+        ColumnStatisticBuilder builder = new ColumnStatisticBuilder()
+                .setNdv(100)
+                .setAvgSizeByte(4)
+                .setNumNulls(10)
+                .setMaxValue(100)
+                .setMinValue(0)
+                .setCount(100);
+        IsNull isNull = new IsNull(a);
+        Not not = new Not(isNull);
+        Statistics stats = new Statistics(100, new HashMap<>());
+        stats.addColumnStats(a, builder.build());
+        FilterEstimation filterEstimation = new FilterEstimation();
+        Statistics result = filterEstimation.estimate(not, stats);
+        Assertions.assertEquals(result.getRowCount(), 90);
+    }
 }
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query76.out 
b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query76.out
new file mode 100644
index 00000000000..3f46749fc61
--- /dev/null
+++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query76.out
@@ -0,0 +1,52 @@
+-- This file is automatically generated. You should know what you did if you 
want to edit this
+-- !ds_shape_76 --
+PhysicalResultSink
+--PhysicalTopN[MERGE_SORT]
+----PhysicalDistribute
+------PhysicalTopN[LOCAL_SORT]
+--------hashAgg[GLOBAL]
+----------PhysicalDistribute
+------------hashAgg[LOCAL]
+--------------PhysicalUnion
+----------------PhysicalDistribute
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() 
build RFs:RF1 i_item_sk->[ss_item_sk]
+----------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) 
otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk]
+------------------------PhysicalProject
+--------------------------filter(ss_customer_sk IS NULL)
+----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1
+------------------------PhysicalDistribute
+--------------------------PhysicalProject
+----------------------------PhysicalOlapScan[date_dim]
+----------------------PhysicalDistribute
+------------------------PhysicalProject
+--------------------------PhysicalOlapScan[item]
+----------------PhysicalDistribute
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk 
= item.i_item_sk)) otherCondition=() build RFs:RF3 ws_item_sk->[i_item_sk]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[item] apply RFs: RF3
+----------------------PhysicalDistribute
+------------------------hashJoin[INNER_JOIN] 
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) 
otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk]
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------filter(ws_promo_sk IS NULL)
+--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[date_dim]
+----------------PhysicalProject
+------------------hashJoin[INNER_JOIN] 
hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() 
build RFs:RF5 i_item_sk->[cs_item_sk]
+--------------------PhysicalDistribute
+----------------------hashJoin[INNER_JOIN] 
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) 
otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk]
+------------------------PhysicalDistribute
+--------------------------PhysicalProject
+----------------------------filter(cs_bill_customer_sk IS NULL)
+------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 
RF5
+------------------------PhysicalDistribute
+--------------------------PhysicalProject
+----------------------------PhysicalOlapScan[date_dim]
+--------------------PhysicalDistribute
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[item]
+
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query95.out 
b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query95.out
new file mode 100644
index 00000000000..6720aab10b8
--- /dev/null
+++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query95.out
@@ -0,0 +1,53 @@
+-- This file is automatically generated. You should know what you did if you 
want to edit this
+-- !ds_shape_95 --
+PhysicalCteAnchor ( cteId=CTEId#0 )
+--PhysicalCteProducer ( cteId=CTEId#0 )
+----PhysicalProject
+------hashJoin[INNER_JOIN] 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]
+--------PhysicalDistribute
+----------PhysicalProject
+------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF6 RF7
+--------PhysicalDistribute
+----------PhysicalProject
+------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7
+--PhysicalResultSink
+----PhysicalTopN[MERGE_SORT]
+------PhysicalTopN[LOCAL_SORT]
+--------hashAgg[DISTINCT_GLOBAL]
+----------PhysicalDistribute
+------------hashAgg[DISTINCT_LOCAL]
+--------------hashAgg[GLOBAL]
+----------------hashAgg[LOCAL]
+------------------PhysicalProject
+--------------------hashJoin[RIGHT_SEMI_JOIN] 
hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) 
otherCondition=()
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN] 
hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) 
otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number];RF6 
wr_order_number->[ws_order_number,ws_order_number]
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[web_returns]
+----------------------hashJoin[RIGHT_SEMI_JOIN] 
hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() 
build RFs:RF4 ws_order_number->[ws_order_number];RF7 
ws_order_number->[ws_order_number,ws_order_number]
+------------------------PhysicalDistribute
+--------------------------PhysicalProject
+----------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+------------------------PhysicalDistribute
+--------------------------hashJoin[INNER_JOIN] 
hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() 
build RFs:RF3 web_site_sk->[ws_web_site_sk]
+----------------------------hashJoin[INNER_JOIN] 
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] 
hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) 
otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 
RF2 RF3
+--------------------------------PhysicalDistribute
+----------------------------------PhysicalProject
+------------------------------------filter((customer_address.ca_state = 'VA'))
+--------------------------------------PhysicalOlapScan[customer_address]
+------------------------------PhysicalDistribute
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_date <= '2001-05-31') and 
(date_dim.d_date >= '2001-04-01'))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------filter((web_site.web_company_name = 'pri'))
+----------------------------------PhysicalOlapScan[web_site]
+
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query97.out 
b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query97.out
new file mode 100644
index 00000000000..bb1f3c8efc6
--- /dev/null
+++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query97.out
@@ -0,0 +1,37 @@
+-- This file is automatically generated. You should know what you did if you 
want to edit this
+-- !ds_shape_97 --
+PhysicalResultSink
+--PhysicalLimit[GLOBAL]
+----PhysicalLimit[LOCAL]
+------hashAgg[GLOBAL]
+--------PhysicalDistribute
+----------hashAgg[LOCAL]
+------------PhysicalProject
+--------------hashJoin[FULL_OUTER_JOIN] hashCondition=((ssci.customer_sk = 
csci.customer_sk) and (ssci.item_sk = csci.item_sk)) otherCondition=()
+----------------PhysicalProject
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) 
otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------filter(( not ss_sold_date_sk IS NULL))
+--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1
+----------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------filter((date_dim.d_month_seq <= 1210) and 
(date_dim.d_month_seq >= 1199))
+----------------------------------PhysicalOlapScan[date_dim]
+----------------PhysicalProject
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN] 
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) 
otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk]
+----------------------------PhysicalProject
+------------------------------filter(( not cs_sold_date_sk IS NULL))
+--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0
+----------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------filter((date_dim.d_month_seq <= 1210) and 
(date_dim.d_month_seq >= 1199))
+----------------------------------PhysicalOlapScan[date_dim]
+
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
new file mode 100644
index 00000000000..d2ecc4813b5
--- /dev/null
+++ 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out
@@ -0,0 +1,53 @@
+-- This file is automatically generated. You should know what you did if you 
want to edit this
+-- !ds_shape_95 --
+PhysicalCteAnchor ( cteId=CTEId#0 )
+--PhysicalCteProducer ( cteId=CTEId#0 )
+----PhysicalProject
+------hashJoin[INNER_JOIN] 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]
+--------PhysicalDistribute
+----------PhysicalProject
+------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF6 RF7
+--------PhysicalDistribute
+----------PhysicalProject
+------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7
+--PhysicalResultSink
+----PhysicalTopN[MERGE_SORT]
+------PhysicalTopN[LOCAL_SORT]
+--------hashAgg[DISTINCT_GLOBAL]
+----------PhysicalDistribute
+------------hashAgg[DISTINCT_LOCAL]
+--------------hashAgg[GLOBAL]
+----------------hashAgg[LOCAL]
+------------------PhysicalProject
+--------------------hashJoin[RIGHT_SEMI_JOIN] 
hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) 
otherCondition=()
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN] 
hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) 
otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number];RF6 
wr_order_number->[ws_order_number,ws_order_number]
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[web_returns]
+----------------------hashJoin[RIGHT_SEMI_JOIN] 
hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() 
build RFs:RF4 ws_order_number->[ws_order_number];RF7 
ws_order_number->[ws_order_number,ws_order_number]
+------------------------PhysicalDistribute
+--------------------------PhysicalProject
+----------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+------------------------PhysicalDistribute
+--------------------------hashJoin[INNER_JOIN] 
hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() 
build RFs:RF3 web_site_sk->[ws_web_site_sk]
+----------------------------hashJoin[INNER_JOIN] 
hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) 
otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk]
+------------------------------hashJoin[INNER_JOIN] 
hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() 
build RFs:RF1 d_date_sk->[ws_ship_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 
RF2 RF3
+--------------------------------PhysicalDistribute
+----------------------------------PhysicalProject
+------------------------------------filter((date_dim.d_date <= '1999-04-02') 
and (date_dim.d_date >= '1999-02-01'))
+--------------------------------------PhysicalOlapScan[date_dim]
+------------------------------PhysicalDistribute
+--------------------------------PhysicalProject
+----------------------------------filter((customer_address.ca_state = 'NC'))
+------------------------------------PhysicalOlapScan[customer_address]
+----------------------------PhysicalDistribute
+------------------------------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
new file mode 100644
index 00000000000..d2ecc4813b5
--- /dev/null
+++ 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out
@@ -0,0 +1,53 @@
+-- This file is automatically generated. You should know what you did if you 
want to edit this
+-- !ds_shape_95 --
+PhysicalCteAnchor ( cteId=CTEId#0 )
+--PhysicalCteProducer ( cteId=CTEId#0 )
+----PhysicalProject
+------hashJoin[INNER_JOIN] 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]
+--------PhysicalDistribute
+----------PhysicalProject
+------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF6 RF7
+--------PhysicalDistribute
+----------PhysicalProject
+------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7
+--PhysicalResultSink
+----PhysicalTopN[MERGE_SORT]
+------PhysicalTopN[LOCAL_SORT]
+--------hashAgg[DISTINCT_GLOBAL]
+----------PhysicalDistribute
+------------hashAgg[DISTINCT_LOCAL]
+--------------hashAgg[GLOBAL]
+----------------hashAgg[LOCAL]
+------------------PhysicalProject
+--------------------hashJoin[RIGHT_SEMI_JOIN] 
hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) 
otherCondition=()
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN] 
hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) 
otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number];RF6 
wr_order_number->[ws_order_number,ws_order_number]
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[web_returns]
+----------------------hashJoin[RIGHT_SEMI_JOIN] 
hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() 
build RFs:RF4 ws_order_number->[ws_order_number];RF7 
ws_order_number->[ws_order_number,ws_order_number]
+------------------------PhysicalDistribute
+--------------------------PhysicalProject
+----------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+------------------------PhysicalDistribute
+--------------------------hashJoin[INNER_JOIN] 
hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() 
build RFs:RF3 web_site_sk->[ws_web_site_sk]
+----------------------------hashJoin[INNER_JOIN] 
hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) 
otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk]
+------------------------------hashJoin[INNER_JOIN] 
hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() 
build RFs:RF1 d_date_sk->[ws_ship_date_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 
RF2 RF3
+--------------------------------PhysicalDistribute
+----------------------------------PhysicalProject
+------------------------------------filter((date_dim.d_date <= '1999-04-02') 
and (date_dim.d_date >= '1999-02-01'))
+--------------------------------------PhysicalOlapScan[date_dim]
+------------------------------PhysicalDistribute
+--------------------------------PhysicalProject
+----------------------------------filter((customer_address.ca_state = 'NC'))
+------------------------------------PhysicalOlapScan[customer_address]
+----------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------filter((web_site.web_company_name = 'pri'))
+----------------------------------PhysicalOlapScan[web_site]
+
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query44.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query44.out
new file mode 100644
index 00000000000..35ca3b8e453
--- /dev/null
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query44.out
@@ -0,0 +1,71 @@
+-- This file is automatically generated. You should know what you did if you 
want to edit this
+-- !ds_shape_44 --
+PhysicalResultSink
+--PhysicalTopN[MERGE_SORT]
+----PhysicalDistribute
+------PhysicalTopN[LOCAL_SORT]
+--------PhysicalProject
+----------hashJoin[INNER_JOIN] hashCondition=((i2.i_item_sk = 
descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk]
+------------PhysicalProject
+--------------PhysicalOlapScan[item] apply RFs: RF1
+------------PhysicalDistribute
+--------------PhysicalProject
+----------------hashJoin[INNER_JOIN] hashCondition=((asceding.rnk = 
descending.rnk)) otherCondition=()
+------------------hashJoin[INNER_JOIN] hashCondition=((i1.i_item_sk = 
asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk]
+--------------------PhysicalProject
+----------------------PhysicalOlapScan[item] apply RFs: RF0
+--------------------PhysicalDistribute
+----------------------PhysicalProject
+------------------------filter((rnk < 11))
+--------------------------PhysicalWindow
+----------------------------PhysicalQuickSort[MERGE_SORT]
+------------------------------PhysicalDistribute
+--------------------------------PhysicalQuickSort[LOCAL_SORT]
+----------------------------------PhysicalPartitionTopN
+------------------------------------PhysicalProject
+--------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col 
as DOUBLE) > cast((0.9 * rank_col) as DOUBLE))
+----------------------------------------PhysicalProject
+------------------------------------------hashAgg[GLOBAL]
+--------------------------------------------PhysicalDistribute
+----------------------------------------------hashAgg[LOCAL]
+------------------------------------------------PhysicalProject
+--------------------------------------------------filter((ss1.ss_store_sk = 
146))
+----------------------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------------PhysicalDistribute
+------------------------------------------PhysicalAssertNumRows
+--------------------------------------------PhysicalDistribute
+----------------------------------------------PhysicalProject
+------------------------------------------------hashAgg[GLOBAL]
+--------------------------------------------------PhysicalDistribute
+----------------------------------------------------hashAgg[LOCAL]
+------------------------------------------------------PhysicalProject
+--------------------------------------------------------filter((store_sales.ss_store_sk
 = 146) and ss_addr_sk IS NULL)
+----------------------------------------------------------PhysicalOlapScan[store_sales]
+------------------PhysicalDistribute
+--------------------PhysicalProject
+----------------------filter((rnk < 11))
+------------------------PhysicalWindow
+--------------------------PhysicalQuickSort[MERGE_SORT]
+----------------------------PhysicalDistribute
+------------------------------PhysicalQuickSort[LOCAL_SORT]
+--------------------------------PhysicalPartitionTopN
+----------------------------------PhysicalProject
+------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col 
as DOUBLE) > cast((0.9 * rank_col) as DOUBLE))
+--------------------------------------PhysicalProject
+----------------------------------------hashAgg[GLOBAL]
+------------------------------------------PhysicalDistribute
+--------------------------------------------hashAgg[LOCAL]
+----------------------------------------------PhysicalProject
+------------------------------------------------filter((ss1.ss_store_sk = 146))
+--------------------------------------------------PhysicalOlapScan[store_sales]
+--------------------------------------PhysicalDistribute
+----------------------------------------PhysicalAssertNumRows
+------------------------------------------PhysicalDistribute
+--------------------------------------------PhysicalProject
+----------------------------------------------hashAgg[GLOBAL]
+------------------------------------------------PhysicalDistribute
+--------------------------------------------------hashAgg[LOCAL]
+----------------------------------------------------PhysicalProject
+------------------------------------------------------filter((store_sales.ss_store_sk
 = 146) and ss_addr_sk IS NULL)
+--------------------------------------------------------PhysicalOlapScan[store_sales]
+
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query76.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query76.out
new file mode 100644
index 00000000000..00c4bba1df6
--- /dev/null
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query76.out
@@ -0,0 +1,50 @@
+-- This file is automatically generated. You should know what you did if you 
want to edit this
+-- !ds_shape_76 --
+PhysicalResultSink
+--PhysicalTopN[MERGE_SORT]
+----PhysicalDistribute
+------PhysicalTopN[LOCAL_SORT]
+--------hashAgg[GLOBAL]
+----------PhysicalDistribute
+------------hashAgg[LOCAL]
+--------------PhysicalUnion
+----------------PhysicalDistribute
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() 
build RFs:RF1 ss_item_sk->[i_item_sk]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[item] apply RFs: RF1
+----------------------PhysicalDistribute
+------------------------hashJoin[INNER_JOIN] 
hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) 
otherCondition=() build RFs:RF0 ss_sold_date_sk->[d_date_sk]
+--------------------------PhysicalProject
+----------------------------PhysicalOlapScan[date_dim] apply RFs: RF0
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------filter(ss_hdemo_sk IS NULL)
+--------------------------------PhysicalOlapScan[store_sales]
+----------------PhysicalDistribute
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk 
= item.i_item_sk)) otherCondition=() build RFs:RF3 ws_item_sk->[i_item_sk]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[item] apply RFs: RF3
+----------------------PhysicalDistribute
+------------------------hashJoin[INNER_JOIN] 
hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) 
otherCondition=() build RFs:RF2 ws_sold_date_sk->[d_date_sk]
+--------------------------PhysicalProject
+----------------------------PhysicalOlapScan[date_dim] apply RFs: RF2
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------filter(ws_bill_addr_sk IS NULL)
+--------------------------------PhysicalOlapScan[web_sales]
+----------------PhysicalDistribute
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN] 
hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() 
build RFs:RF5 cs_item_sk->[i_item_sk]
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[item] apply RFs: RF5
+----------------------PhysicalDistribute
+------------------------hashJoin[INNER_JOIN] 
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) 
otherCondition=() build RFs:RF4 cs_sold_date_sk->[d_date_sk]
+--------------------------PhysicalProject
+----------------------------PhysicalOlapScan[date_dim] apply RFs: RF4
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------filter(cs_warehouse_sk IS NULL)
+--------------------------------PhysicalOlapScan[catalog_sales]
+
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query95.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query95.out
new file mode 100644
index 00000000000..bde9dbef392
--- /dev/null
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query95.out
@@ -0,0 +1,53 @@
+-- This file is automatically generated. You should know what you did if you 
want to edit this
+-- !ds_shape_95 --
+PhysicalCteAnchor ( cteId=CTEId#0 )
+--PhysicalCteProducer ( cteId=CTEId#0 )
+----PhysicalProject
+------hashJoin[INNER_JOIN] 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]
+--------PhysicalDistribute
+----------PhysicalProject
+------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF6 RF7
+--------PhysicalDistribute
+----------PhysicalProject
+------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7
+--PhysicalResultSink
+----PhysicalTopN[MERGE_SORT]
+------PhysicalTopN[LOCAL_SORT]
+--------hashAgg[DISTINCT_GLOBAL]
+----------PhysicalDistribute
+------------hashAgg[DISTINCT_LOCAL]
+--------------hashAgg[GLOBAL]
+----------------hashAgg[LOCAL]
+------------------PhysicalProject
+--------------------hashJoin[RIGHT_SEMI_JOIN] 
hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) 
otherCondition=()
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN] 
hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) 
otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number];RF6 
wr_order_number->[ws_order_number,ws_order_number]
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[web_returns]
+----------------------hashJoin[RIGHT_SEMI_JOIN] 
hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() 
build RFs:RF4 ws_order_number->[ws_order_number];RF7 
ws_order_number->[ws_order_number,ws_order_number]
+------------------------PhysicalDistribute
+--------------------------PhysicalProject
+----------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+------------------------PhysicalDistribute
+--------------------------hashJoin[INNER_JOIN] 
hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() 
build RFs:RF3 web_site_sk->[ws_web_site_sk]
+----------------------------hashJoin[INNER_JOIN] 
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] 
hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) 
otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk]
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 
RF2 RF3
+--------------------------------PhysicalDistribute
+----------------------------------PhysicalProject
+------------------------------------filter((customer_address.ca_state = 'NC'))
+--------------------------------------PhysicalOlapScan[customer_address]
+------------------------------PhysicalDistribute
+--------------------------------PhysicalProject
+----------------------------------filter((date_dim.d_date <= '1999-04-02') and 
(date_dim.d_date >= '1999-02-01'))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------filter((web_site.web_company_name = 'pri'))
+----------------------------------PhysicalOlapScan[web_site]
+
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query11.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query11.out
index ffca4cbc9f8..bc831f1df7a 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query11.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query11.out
@@ -42,7 +42,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute
 --------PhysicalTopN
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN](t_s_firstyear.customer_id = 
t_w_secyear.customer_id)(if((year_total > 0.00), (cast(year_total as DOUBLE) / 
cast(year_total as DOUBLE)), 0) > if((year_total > 0.00), (cast(year_total as 
DOUBLE) / cast(year_total as DOUBLE)), 0))
+------------hashJoin[INNER_JOIN](t_s_firstyear.customer_id = 
t_w_secyear.customer_id)(if((year_total > 0.00), (cast(year_total as 
DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), 
(cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN](t_s_secyear.customer_id = 
t_s_firstyear.customer_id)
 ------------------hashJoin[INNER_JOIN](t_s_firstyear.customer_id = 
t_w_firstyear.customer_id)
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query14.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query14.out
index ffd24b8f175..18a3538a32c 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query14.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query14.out
@@ -28,7 +28,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------------------PhysicalOlapScan[catalog_sales]
 --------------------PhysicalDistribute
 ----------------------PhysicalProject
-------------------------filter((d2.d_year >= 2000)(d2.d_year <= 2002))
+------------------------filter((d2.d_year <= 2002)(d2.d_year >= 2000))
 --------------------------PhysicalOlapScan[date_dim]
 ----------------PhysicalDistribute
 ------------------PhysicalProject
@@ -42,7 +42,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------------------PhysicalOlapScan[web_sales]
 --------------------PhysicalDistribute
 ----------------------PhysicalProject
-------------------------filter((d3.d_year <= 2002)(d3.d_year >= 2000))
+------------------------filter((d3.d_year >= 2000)(d3.d_year <= 2002))
 --------------------------PhysicalOlapScan[date_dim]
 ----------------PhysicalDistribute
 ------------------PhysicalProject
@@ -81,7 +81,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------------------PhysicalOlapScan[web_sales]
 --------------------PhysicalDistribute
 ----------------------PhysicalProject
-------------------------filter((date_dim.d_year >= 2000)(date_dim.d_year <= 
2002))
+------------------------filter((date_dim.d_year <= 2002)(date_dim.d_year >= 
2000))
 --------------------------PhysicalOlapScan[date_dim]
 ----PhysicalResultSink
 ------PhysicalTopN
@@ -136,7 +136,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------------------------------------------------PhysicalOlapScan[catalog_sales]
 ----------------------------------------------PhysicalDistribute
 ------------------------------------------------PhysicalProject
---------------------------------------------------filter((date_dim.d_year = 
2002)(date_dim.d_moy = 11))
+--------------------------------------------------filter((date_dim.d_moy = 
11)(date_dim.d_year = 2002))
 ----------------------------------------------------PhysicalOlapScan[date_dim]
 ------------------------------------------PhysicalDistribute
 --------------------------------------------PhysicalProject
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query31.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query31.out
index 953ca425f06..c02b9c6dd96 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query31.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query31.out
@@ -45,7 +45,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------PhysicalDistribute
 ----------PhysicalQuickSort
 ------------PhysicalProject
---------------hashJoin[INNER_JOIN](ws1.ca_county = 
ws3.ca_county)(if((web_sales > 0.00), (cast(web_sales as DOUBLE) / 
cast(web_sales as DOUBLE)), NULL) > if((store_sales > 0.00), (cast(store_sales 
as DOUBLE) / cast(store_sales as DOUBLE)), NULL))
+--------------hashJoin[INNER_JOIN](ws1.ca_county = 
ws3.ca_county)(if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / 
web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 
8)) / store_sales), NULL))
 ----------------PhysicalDistribute
 ------------------PhysicalProject
 --------------------filter((ws3.d_year = 2000)(ws3.d_qoy = 3))
@@ -56,7 +56,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ----------------------PhysicalProject
 ------------------------filter((ss3.d_year = 2000)(ss3.d_qoy = 3))
 --------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
---------------------hashJoin[INNER_JOIN](ws1.ca_county = 
ws2.ca_county)(if((web_sales > 0.00), (cast(web_sales as DOUBLE) / 
cast(web_sales as DOUBLE)), NULL) > if((store_sales > 0.00), (cast(store_sales 
as DOUBLE) / cast(store_sales as DOUBLE)), NULL))
+--------------------hashJoin[INNER_JOIN](ws1.ca_county = 
ws2.ca_county)(if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / 
web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 
8)) / store_sales), NULL))
 ----------------------hashJoin[INNER_JOIN](ss1.ca_county = ws1.ca_county)
 ------------------------hashJoin[INNER_JOIN](ss1.ca_county = ss2.ca_county)
 --------------------------PhysicalDistribute
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query4.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query4.out
index 85a81ce0209..928ef78cd26 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query4.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query4.out
@@ -59,11 +59,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------PhysicalDistribute
 --------PhysicalTopN
 ----------PhysicalProject
-------------hashJoin[INNER_JOIN](t_s_firstyear.customer_id = 
t_w_secyear.customer_id)(if((year_total > 0.000000), (cast(year_total as 
DOUBLE) / cast(year_total as DOUBLE)), NULL) > if((year_total > 0.000000), 
(cast(year_total as DOUBLE) / cast(year_total as DOUBLE)), NULL))
+------------hashJoin[INNER_JOIN](t_s_firstyear.customer_id = 
t_w_secyear.customer_id)(if((year_total > 0.000000), (cast(year_total as 
DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), 
(cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN](t_s_firstyear.customer_id = 
t_w_firstyear.customer_id)
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN](t_s_firstyear.customer_id = 
t_c_secyear.customer_id)(if((year_total > 0.000000), (cast(year_total as 
DOUBLE) / cast(year_total as DOUBLE)), NULL) > if((year_total > 0.000000), 
(cast(year_total as DOUBLE) / cast(year_total as DOUBLE)), NULL))
+--------------------hashJoin[INNER_JOIN](t_s_firstyear.customer_id = 
t_c_secyear.customer_id)(if((year_total > 0.000000), (cast(year_total as 
DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), 
(cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN](t_s_secyear.customer_id = 
t_s_firstyear.customer_id)
 --------------------------hashJoin[INNER_JOIN](t_s_firstyear.customer_id = 
t_c_firstyear.customer_id)
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query44.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query44.out
index 3117cf83ba5..48f68b04e2b 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query44.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query44.out
@@ -12,33 +12,6 @@ PhysicalResultSink
 --------------PhysicalProject
 ----------------hashJoin[INNER_JOIN](asceding.rnk = descending.rnk)
 ------------------PhysicalDistribute
---------------------PhysicalProject
-----------------------filter((rnk < 11))
-------------------------PhysicalWindow
---------------------------PhysicalQuickSort
-----------------------------PhysicalDistribute
-------------------------------PhysicalQuickSort
---------------------------------PhysicalPartitionTopN
-----------------------------------PhysicalProject
-------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col 
as DOUBLE) > cast((0.9 * rank_col) as DOUBLE))
---------------------------------------PhysicalProject
-----------------------------------------hashAgg[GLOBAL]
-------------------------------------------PhysicalDistribute
---------------------------------------------hashAgg[LOCAL]
-----------------------------------------------PhysicalProject
-------------------------------------------------filter((ss1.ss_store_sk = 146))
---------------------------------------------------PhysicalOlapScan[store_sales]
---------------------------------------PhysicalDistribute
-----------------------------------------PhysicalAssertNumRows
-------------------------------------------PhysicalDistribute
---------------------------------------------PhysicalProject
-----------------------------------------------hashAgg[GLOBAL]
-------------------------------------------------PhysicalDistribute
---------------------------------------------------hashAgg[LOCAL]
-----------------------------------------------------PhysicalProject
-------------------------------------------------------filter(ss_addr_sk IS 
NULL(store_sales.ss_store_sk = 146))
---------------------------------------------------------PhysicalOlapScan[store_sales]
-------------------PhysicalDistribute
 --------------------hashJoin[INNER_JOIN](i1.i_item_sk = asceding.item_sk)
 ----------------------PhysicalProject
 ------------------------PhysicalOlapScan[item]
@@ -69,4 +42,31 @@ PhysicalResultSink
 --------------------------------------------------------PhysicalProject
 ----------------------------------------------------------filter(ss_addr_sk IS 
NULL(store_sales.ss_store_sk = 146))
 
------------------------------------------------------------PhysicalOlapScan[store_sales]
+------------------PhysicalDistribute
+--------------------PhysicalProject
+----------------------filter((rnk < 11))
+------------------------PhysicalWindow
+--------------------------PhysicalQuickSort
+----------------------------PhysicalDistribute
+------------------------------PhysicalQuickSort
+--------------------------------PhysicalPartitionTopN
+----------------------------------PhysicalProject
+------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col 
as DOUBLE) > cast((0.9 * rank_col) as DOUBLE))
+--------------------------------------PhysicalProject
+----------------------------------------hashAgg[GLOBAL]
+------------------------------------------PhysicalDistribute
+--------------------------------------------hashAgg[LOCAL]
+----------------------------------------------PhysicalProject
+------------------------------------------------filter((ss1.ss_store_sk = 146))
+--------------------------------------------------PhysicalOlapScan[store_sales]
+--------------------------------------PhysicalDistribute
+----------------------------------------PhysicalAssertNumRows
+------------------------------------------PhysicalDistribute
+--------------------------------------------PhysicalProject
+----------------------------------------------hashAgg[GLOBAL]
+------------------------------------------------PhysicalDistribute
+--------------------------------------------------hashAgg[LOCAL]
+----------------------------------------------------PhysicalProject
+------------------------------------------------------filter((store_sales.ss_store_sk
 = 146)ss_addr_sk IS NULL)
+--------------------------------------------------------PhysicalOlapScan[store_sales]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query47.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query47.out
index 693dd1df3a6..96569a9c77b 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query47.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query47.out
@@ -47,6 +47,6 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 ------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 --------------------PhysicalDistribute
 ----------------------PhysicalProject
-------------------------filter((if((avg_monthly_sales > 0.0000), 
(abs((cast(sum_sales as DOUBLE) - cast(avg_monthly_sales as DOUBLE))) / 
cast(avg_monthly_sales as DOUBLE)), NULL) > 0.1)(v2.d_year = 
2001)(v2.avg_monthly_sales > 0.0000))
+------------------------filter((if((avg_monthly_sales > 0.0000), 
(cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as 
DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000)(v2.d_year = 
2001)(v2.avg_monthly_sales > 0.0000))
 --------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query49.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query49.out
index 28874b40f53..d45d69604a0 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query49.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query49.out
@@ -54,11 +54,11 @@ PhysicalResultSink
 
--------------------------------------------------PhysicalOlapScan[catalog_returns]
 
----------------------------------------------hashJoin[INNER_JOIN](cs.cs_sold_date_sk
 = date_dim.d_date_sk)
 ------------------------------------------------PhysicalProject
---------------------------------------------------filter((cs.cs_net_paid > 
0.00)(cs.cs_quantity > 0)(cs.cs_net_profit > 1.00))
+--------------------------------------------------filter((cs.cs_quantity > 
0)(cs.cs_net_profit > 1.00)(cs.cs_net_paid > 0.00))
 
----------------------------------------------------PhysicalOlapScan[catalog_sales]
 ------------------------------------------------PhysicalDistribute
 --------------------------------------------------PhysicalProject
-----------------------------------------------------filter((date_dim.d_moy = 
12)(date_dim.d_year = 1999))
+----------------------------------------------------filter((date_dim.d_year = 
1999)(date_dim.d_moy = 12))
 
------------------------------------------------------PhysicalOlapScan[date_dim]
 ----------------PhysicalDistribute
 ------------------PhysicalProject
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query53.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query53.out
index ad58bc9f058..87229687332 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query53.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query53.out
@@ -5,7 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute
 ------PhysicalTopN
 --------PhysicalProject
-----------filter((if((avg_quarterly_sales > 0.0000), (abs((cast(sum_sales as 
DOUBLE) - cast(avg_quarterly_sales as DOUBLE))) / cast(avg_quarterly_sales as 
DOUBLE)), NULL) > 0.1))
+----------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - 
cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / 
avg_quarterly_sales), NULL) > 0.100000))
 ------------PhysicalWindow
 --------------PhysicalQuickSort
 ----------------PhysicalDistribute
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query57.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query57.out
index 88fe4221454..910ffdbf519 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query57.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query57.out
@@ -48,6 +48,6 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 ----------------------PhysicalDistribute
 ------------------------PhysicalProject
---------------------------filter((v2.d_year = 1999)(if((avg_monthly_sales > 
0.0000), (abs((cast(sum_sales as DOUBLE) - cast(avg_monthly_sales as DOUBLE))) 
/ cast(avg_monthly_sales as DOUBLE)), NULL) > 0.1)(v2.avg_monthly_sales > 
0.0000))
+--------------------------filter((v2.d_year = 1999)(v2.avg_monthly_sales > 
0.0000)(if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - 
cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / 
avg_monthly_sales), NULL) > 0.100000))
 ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query63.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query63.out
index 2834c00bfaf..1b979039047 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query63.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query63.out
@@ -5,7 +5,7 @@ PhysicalResultSink
 ----PhysicalDistribute
 ------PhysicalTopN
 --------PhysicalProject
-----------filter((if((avg_monthly_sales > 0.0000), (abs((cast(sum_sales as 
DOUBLE) - cast(avg_monthly_sales as DOUBLE))) / cast(avg_monthly_sales as 
DOUBLE)), NULL) > 0.1))
+----------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - 
cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / 
avg_monthly_sales), NULL) > 0.100000))
 ------------PhysicalWindow
 --------------PhysicalQuickSort
 ----------------PhysicalDistribute
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query73.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query73.out
index 4d82cd3a79d..834f4f2e1df 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query73.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query73.out
@@ -9,7 +9,7 @@ PhysicalResultSink
 ------------PhysicalProject
 --------------PhysicalOlapScan[customer]
 ------------PhysicalDistribute
---------------filter((dj.cnt >= 1)(dj.cnt <= 5))
+--------------filter((dj.cnt <= 5)(dj.cnt >= 1))
 ----------------hashAgg[GLOBAL]
 ------------------PhysicalDistribute
 --------------------hashAgg[LOCAL]
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query76.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query76.out
index 56330b9c247..e66c5338ae8 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query76.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query76.out
@@ -10,44 +10,41 @@ PhysicalResultSink
 --------------PhysicalUnion
 ----------------PhysicalDistribute
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk = 
date_dim.d_date_sk)
+--------------------hashJoin[INNER_JOIN](store_sales.ss_item_sk = 
item.i_item_sk)
 ----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN](store_sales.ss_item_sk = 
item.i_item_sk)
+------------------------PhysicalOlapScan[item]
+----------------------PhysicalDistribute
+------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk = 
date_dim.d_date_sk)
 --------------------------PhysicalProject
-----------------------------filter(ss_hdemo_sk IS NULL)
-------------------------------PhysicalOlapScan[store_sales]
+----------------------------PhysicalOlapScan[date_dim]
 --------------------------PhysicalDistribute
 ----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[item]
+------------------------------filter(ss_hdemo_sk IS NULL)
+--------------------------------PhysicalOlapScan[store_sales]
+----------------PhysicalDistribute
+------------------PhysicalProject
+--------------------hashJoin[INNER_JOIN](web_sales.ws_item_sk = item.i_item_sk)
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[item]
 ----------------------PhysicalDistribute
-------------------------PhysicalProject
---------------------------PhysicalOlapScan[date_dim]
-----------------PhysicalProject
-------------------hashJoin[INNER_JOIN](web_sales.ws_sold_date_sk = 
date_dim.d_date_sk)
---------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN](web_sales.ws_item_sk = 
item.i_item_sk)
-------------------------PhysicalDistribute
---------------------------PhysicalProject
-----------------------------filter(ws_bill_addr_sk IS NULL)
-------------------------------PhysicalOlapScan[web_sales]
-------------------------PhysicalDistribute
+------------------------hashJoin[INNER_JOIN](web_sales.ws_sold_date_sk = 
date_dim.d_date_sk)
 --------------------------PhysicalProject
-----------------------------PhysicalOlapScan[item]
---------------------PhysicalDistribute
-----------------------PhysicalProject
-------------------------PhysicalOlapScan[date_dim]
+----------------------------PhysicalOlapScan[date_dim]
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------filter(ws_bill_addr_sk IS NULL)
+--------------------------------PhysicalOlapScan[web_sales]
 ----------------PhysicalDistribute
 ------------------PhysicalProject
---------------------hashJoin[INNER_JOIN](catalog_sales.cs_sold_date_sk = 
date_dim.d_date_sk)
+--------------------hashJoin[INNER_JOIN](catalog_sales.cs_item_sk = 
item.i_item_sk)
 ----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN](catalog_sales.cs_item_sk = 
item.i_item_sk)
+------------------------PhysicalOlapScan[item]
+----------------------PhysicalDistribute
+------------------------hashJoin[INNER_JOIN](catalog_sales.cs_sold_date_sk = 
date_dim.d_date_sk)
 --------------------------PhysicalProject
-----------------------------filter(cs_warehouse_sk IS NULL)
-------------------------------PhysicalOlapScan[catalog_sales]
+----------------------------PhysicalOlapScan[date_dim]
 --------------------------PhysicalDistribute
 ----------------------------PhysicalProject
-------------------------------PhysicalOlapScan[item]
-----------------------PhysicalDistribute
-------------------------PhysicalProject
---------------------------PhysicalOlapScan[date_dim]
+------------------------------filter(cs_warehouse_sk IS NULL)
+--------------------------------PhysicalOlapScan[catalog_sales]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query78.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query78.out
index 812bbb05795..3cd8d0185ab 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query78.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query78.out
@@ -16,16 +16,16 @@ PhysicalResultSink
 --------------------------PhysicalProject
 ----------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk = 
date_dim.d_date_sk)
 ------------------------------PhysicalProject
---------------------------------filter(sr_ticket_number IS NULL)
-----------------------------------hashJoin[LEFT_OUTER_JOIN](store_sales.ss_item_sk
 = store_returns.sr_item_sk)(store_returns.sr_ticket_number = 
store_sales.ss_ticket_number)
-------------------------------------PhysicalProject
---------------------------------------PhysicalOlapScan[store_sales]
-------------------------------------PhysicalProject
---------------------------------------PhysicalOlapScan[store_returns]
+--------------------------------filter((date_dim.d_year = 2000))
+----------------------------------PhysicalOlapScan[date_dim]
 ------------------------------PhysicalDistribute
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_year = 2000))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------filter(sr_ticket_number IS NULL)
+------------------------------------hashJoin[LEFT_OUTER_JOIN](store_sales.ss_item_sk
 = store_returns.sr_item_sk)(store_returns.sr_ticket_number = 
store_sales.ss_ticket_number)
+--------------------------------------PhysicalProject
+----------------------------------------PhysicalOlapScan[store_sales]
+--------------------------------------PhysicalProject
+----------------------------------------PhysicalOlapScan[store_returns]
 ------------------PhysicalProject
 --------------------hashAgg[GLOBAL]
 ----------------------PhysicalDistribute
@@ -33,16 +33,16 @@ PhysicalResultSink
 --------------------------PhysicalProject
 ----------------------------hashJoin[INNER_JOIN](web_sales.ws_sold_date_sk = 
date_dim.d_date_sk)
 ------------------------------PhysicalProject
---------------------------------filter(wr_order_number IS NULL)
-----------------------------------hashJoin[LEFT_OUTER_JOIN](web_sales.ws_item_sk
 = web_returns.wr_item_sk)(web_returns.wr_order_number = 
web_sales.ws_order_number)
-------------------------------------PhysicalProject
---------------------------------------PhysicalOlapScan[web_sales]
-------------------------------------PhysicalProject
---------------------------------------PhysicalOlapScan[web_returns]
+--------------------------------filter((date_dim.d_year = 2000))
+----------------------------------PhysicalOlapScan[date_dim]
 ------------------------------PhysicalDistribute
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_year = 2000))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------filter(wr_order_number IS NULL)
+------------------------------------hashJoin[LEFT_OUTER_JOIN](web_sales.ws_item_sk
 = web_returns.wr_item_sk)(web_returns.wr_order_number = 
web_sales.ws_order_number)
+--------------------------------------PhysicalProject
+----------------------------------------PhysicalOlapScan[web_sales]
+--------------------------------------PhysicalProject
+----------------------------------------PhysicalOlapScan[web_returns]
 --------------PhysicalProject
 ----------------hashAgg[GLOBAL]
 ------------------PhysicalDistribute
@@ -50,14 +50,14 @@ PhysicalResultSink
 ----------------------PhysicalProject
 ------------------------hashJoin[INNER_JOIN](catalog_sales.cs_sold_date_sk = 
date_dim.d_date_sk)
 --------------------------PhysicalProject
-----------------------------filter(cr_order_number IS NULL)
-------------------------------hashJoin[LEFT_OUTER_JOIN](catalog_sales.cs_item_sk
 = catalog_returns.cr_item_sk)(catalog_returns.cr_order_number = 
catalog_sales.cs_order_number)
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_sales]
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[catalog_returns]
+----------------------------filter((date_dim.d_year = 2000))
+------------------------------PhysicalOlapScan[date_dim]
 --------------------------PhysicalDistribute
 ----------------------------PhysicalProject
-------------------------------filter((date_dim.d_year = 2000))
---------------------------------PhysicalOlapScan[date_dim]
+------------------------------filter(cr_order_number IS NULL)
+--------------------------------hashJoin[LEFT_OUTER_JOIN](catalog_sales.cs_item_sk
 = catalog_returns.cr_item_sk)(catalog_returns.cr_order_number = 
catalog_sales.cs_order_number)
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[catalog_sales]
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[catalog_returns]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query87.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query87.out
index c42693e374c..1618d9f6811 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query87.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query87.out
@@ -55,7 +55,7 @@ PhysicalResultSink
 --------------------------------PhysicalOlapScan[web_sales]
 ------------------------------PhysicalDistribute
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_month_seq <= 
1195)(date_dim.d_month_seq >= 1184))
+----------------------------------filter((date_dim.d_month_seq >= 
1184)(date_dim.d_month_seq <= 1195))
 ------------------------------------PhysicalOlapScan[date_dim]
 ------------------------PhysicalDistribute
 --------------------------PhysicalProject
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query89.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query89.out
index 56d66c5ac33..b516fc682f3 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query89.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query89.out
@@ -6,7 +6,7 @@ PhysicalResultSink
 ------PhysicalDistribute
 --------PhysicalTopN
 ----------PhysicalProject
-------------filter((if(( not (avg_monthly_sales = 0.0000)), 
(abs((cast(sum_sales as DOUBLE) - cast(avg_monthly_sales as DOUBLE))) / 
cast(avg_monthly_sales as DOUBLE)), NULL) > 0.1))
+------------filter((if(( not (avg_monthly_sales = 0.0000)), 
(cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as 
DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000))
 --------------PhysicalWindow
 ----------------PhysicalQuickSort
 ------------------PhysicalDistribute
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query90.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query90.out
index ed9841914df..327ff7b7af0 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query90.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query90.out
@@ -48,7 +48,7 @@ PhysicalResultSink
 --------------------------------------PhysicalOlapScan[web_page]
 ----------------------------PhysicalDistribute
 ------------------------------PhysicalProject
---------------------------------filter((time_dim.t_hour >= 16)(time_dim.t_hour 
<= 17))
+--------------------------------filter((time_dim.t_hour <= 17)(time_dim.t_hour 
>= 16))
 ----------------------------------PhysicalOlapScan[time_dim]
 ----------------------PhysicalDistribute
 ------------------------PhysicalProject
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query94.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query94.out
index 761dc580635..8d508bacd9b 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query94.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query94.out
@@ -3,37 +3,36 @@
 PhysicalResultSink
 --PhysicalTopN
 ----PhysicalTopN
-------PhysicalProject
---------hashAgg[DISTINCT_GLOBAL]
-----------PhysicalDistribute
-------------hashAgg[DISTINCT_LOCAL]
---------------hashAgg[GLOBAL]
-----------------hashAgg[LOCAL]
-------------------PhysicalProject
---------------------hashJoin[RIGHT_SEMI_JOIN](ws1.ws_order_number = 
ws2.ws_order_number)( not (ws_warehouse_sk = ws_warehouse_sk))
+------hashAgg[DISTINCT_GLOBAL]
+--------PhysicalDistribute
+----------hashAgg[DISTINCT_LOCAL]
+------------hashAgg[GLOBAL]
+--------------hashAgg[LOCAL]
+----------------PhysicalProject
+------------------hashJoin[RIGHT_SEMI_JOIN](ws1.ws_order_number = 
ws2.ws_order_number)( not (ws_warehouse_sk = ws_warehouse_sk))
+--------------------PhysicalDistribute
+----------------------PhysicalProject
+------------------------PhysicalOlapScan[web_sales]
+--------------------hashJoin[RIGHT_ANTI_JOIN](ws1.ws_order_number = 
wr1.wr_order_number)
 ----------------------PhysicalDistribute
 ------------------------PhysicalProject
---------------------------PhysicalOlapScan[web_sales]
-----------------------hashJoin[RIGHT_ANTI_JOIN](ws1.ws_order_number = 
wr1.wr_order_number)
-------------------------PhysicalDistribute
---------------------------PhysicalProject
-----------------------------PhysicalOlapScan[web_returns]
-------------------------PhysicalDistribute
---------------------------hashJoin[INNER_JOIN](ws1.ws_web_site_sk = 
web_site.web_site_sk)
-----------------------------hashJoin[INNER_JOIN](ws1.ws_ship_date_sk = 
date_dim.d_date_sk)
-------------------------------hashJoin[INNER_JOIN](ws1.ws_ship_addr_sk = 
customer_address.ca_address_sk)
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[web_sales]
---------------------------------PhysicalDistribute
-----------------------------------PhysicalProject
-------------------------------------filter((customer_address.ca_state = 'OK'))
---------------------------------------PhysicalOlapScan[customer_address]
+--------------------------PhysicalOlapScan[web_returns]
+----------------------PhysicalDistribute
+------------------------hashJoin[INNER_JOIN](ws1.ws_web_site_sk = 
web_site.web_site_sk)
+--------------------------hashJoin[INNER_JOIN](ws1.ws_ship_date_sk = 
date_dim.d_date_sk)
+----------------------------hashJoin[INNER_JOIN](ws1.ws_ship_addr_sk = 
customer_address.ca_address_sk)
+------------------------------PhysicalProject
+--------------------------------PhysicalOlapScan[web_sales]
 ------------------------------PhysicalDistribute
 --------------------------------PhysicalProject
-----------------------------------filter((date_dim.d_date <= 
'2000-04-01')(date_dim.d_date >= '2000-02-01'))
-------------------------------------PhysicalOlapScan[date_dim]
+----------------------------------filter((customer_address.ca_state = 'OK'))
+------------------------------------PhysicalOlapScan[customer_address]
 ----------------------------PhysicalDistribute
 ------------------------------PhysicalProject
---------------------------------filter((web_site.web_company_name = 'pri'))
-----------------------------------PhysicalOlapScan[web_site]
+--------------------------------filter((date_dim.d_date <= 
'2000-04-01')(date_dim.d_date >= '2000-02-01'))
+----------------------------------PhysicalOlapScan[date_dim]
+--------------------------PhysicalDistribute
+----------------------------PhysicalProject
+------------------------------filter((web_site.web_company_name = 'pri'))
+--------------------------------PhysicalOlapScan[web_site]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query95.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query95.out
index eca4e03ce2e..b3a19d18c18 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query95.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query95.out
@@ -13,42 +13,41 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
 --PhysicalResultSink
 ----PhysicalTopN
 ------PhysicalTopN
---------PhysicalProject
-----------hashAgg[DISTINCT_GLOBAL]
-------------PhysicalDistribute
---------------hashAgg[DISTINCT_LOCAL]
-----------------hashAgg[GLOBAL]
-------------------hashAgg[LOCAL]
---------------------PhysicalProject
-----------------------hashJoin[RIGHT_SEMI_JOIN](ws1.ws_order_number = 
web_returns.wr_order_number)
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN](web_returns.wr_order_number = 
ws_wh.ws_order_number)
-----------------------------PhysicalDistribute
-------------------------------PhysicalProject
---------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
-----------------------------PhysicalDistribute
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[web_returns]
-------------------------hashJoin[RIGHT_SEMI_JOIN](ws1.ws_order_number = 
ws_wh.ws_order_number)
+--------hashAgg[DISTINCT_GLOBAL]
+----------PhysicalDistribute
+------------hashAgg[DISTINCT_LOCAL]
+--------------hashAgg[GLOBAL]
+----------------hashAgg[LOCAL]
+------------------PhysicalProject
+--------------------hashJoin[RIGHT_SEMI_JOIN](ws1.ws_order_number = 
web_returns.wr_order_number)
+----------------------PhysicalProject
+------------------------hashJoin[INNER_JOIN](web_returns.wr_order_number = 
ws_wh.ws_order_number)
 --------------------------PhysicalDistribute
 ----------------------------PhysicalProject
 ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
 --------------------------PhysicalDistribute
-----------------------------hashJoin[INNER_JOIN](ws1.ws_web_site_sk = 
web_site.web_site_sk)
-------------------------------hashJoin[INNER_JOIN](ws1.ws_ship_date_sk = 
date_dim.d_date_sk)
---------------------------------hashJoin[INNER_JOIN](ws1.ws_ship_addr_sk = 
customer_address.ca_address_sk)
-----------------------------------PhysicalProject
-------------------------------------PhysicalOlapScan[web_sales]
-----------------------------------PhysicalDistribute
-------------------------------------PhysicalProject
---------------------------------------filter((customer_address.ca_state = 
'NC'))
-----------------------------------------PhysicalOlapScan[customer_address]
+----------------------------PhysicalProject
+------------------------------PhysicalOlapScan[web_returns]
+----------------------hashJoin[RIGHT_SEMI_JOIN](ws1.ws_order_number = 
ws_wh.ws_order_number)
+------------------------PhysicalDistribute
+--------------------------PhysicalProject
+----------------------------PhysicalCteConsumer ( cteId=CTEId#0 )
+------------------------PhysicalDistribute
+--------------------------hashJoin[INNER_JOIN](ws1.ws_web_site_sk = 
web_site.web_site_sk)
+----------------------------hashJoin[INNER_JOIN](ws1.ws_ship_date_sk = 
date_dim.d_date_sk)
+------------------------------hashJoin[INNER_JOIN](ws1.ws_ship_addr_sk = 
customer_address.ca_address_sk)
+--------------------------------PhysicalProject
+----------------------------------PhysicalOlapScan[web_sales]
 --------------------------------PhysicalDistribute
 ----------------------------------PhysicalProject
-------------------------------------filter((date_dim.d_date >= 
'1999-02-01')(date_dim.d_date <= '1999-04-02'))
---------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------filter((customer_address.ca_state = 'NC'))
+--------------------------------------PhysicalOlapScan[customer_address]
 ------------------------------PhysicalDistribute
 --------------------------------PhysicalProject
-----------------------------------filter((web_site.web_company_name = 'pri'))
-------------------------------------PhysicalOlapScan[web_site]
+----------------------------------filter((date_dim.d_date >= 
'1999-02-01')(date_dim.d_date <= '1999-04-02'))
+------------------------------------PhysicalOlapScan[date_dim]
+----------------------------PhysicalDistribute
+------------------------------PhysicalProject
+--------------------------------filter((web_site.web_company_name = 'pri'))
+----------------------------------PhysicalOlapScan[web_site]
 
diff --git 
a/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf76.groovy 
b/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf76.groovy
index 22267b69c27..fac6341d89c 100644
--- a/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf76.groovy
+++ b/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf76.groovy
@@ -74,5 +74,5 @@ limit 100;
     //File file = new File(outFile)
     //file.write(getRuntimeFilters(plan))
     
-    
assertEquals("RF1[d_date_sk->[ss_sold_date_sk],RF0[i_item_sk->[ss_item_sk],RF3[d_date_sk->[ws_sold_date_sk],RF2[i_item_sk->[ws_item_sk],RF5[d_date_sk->[cs_sold_date_sk],RF4[i_item_sk->[cs_item_sk]",
 getRuntimeFilters(plan))
+    
assertEquals("RF1[ss_item_sk->[i_item_sk],RF0[ss_sold_date_sk->[d_date_sk],RF3[ws_item_sk->[i_item_sk],RF2[ws_sold_date_sk->[d_date_sk],RF5[cs_item_sk->[i_item_sk],RF4[cs_sold_date_sk->[d_date_sk]",
 getRuntimeFilters(plan))
 }
diff --git 
a/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf78.groovy 
b/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf78.groovy
index ff672d6ce35..4d0dcc1fd02 100644
--- a/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf78.groovy
+++ b/regression-test/suites/nereids_tpcds_shape_sf100_p0/rf/ds_rf78.groovy
@@ -108,5 +108,5 @@ limit 100;
     //File file = new File(outFile)
     //file.write(getRuntimeFilters(plan))
     
-    
assertEquals("RF2[d_date_sk->[ss_sold_date_sk],RF1[d_date_sk->[ws_sold_date_sk],RF0[d_date_sk->[cs_sold_date_sk]",
 getRuntimeFilters(plan))
+    
assertEquals("RF2[ss_sold_date_sk->[d_date_sk],RF1[ws_sold_date_sk->[d_date_sk],RF0[cs_sold_date_sk->[d_date_sk]",
 getRuntimeFilters(plan))
 }
diff --git 
a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_col.groovy
 
b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_col.groovy
index 67f78e64207..111037ae18f 100644
--- 
a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_col.groovy
+++ 
b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_col.groovy
@@ -136,9 +136,9 @@ suite("test_primary_key_partial_update_seq_col", "p0") {
 
 
             def tableName2 = "nereids_partial_update_native_insert_seq_col2"
-            sql """ DROP TABLE IF EXISTS ${tableName2} """
+            sql """ DROP TABLE IF EXISTS nereids_partial_update_20231227 """
             sql """
-                    CREATE TABLE ${tableName2} (
+                    CREATE TABLE nereids_partial_update_20231227 (
                         `id` int(11) NOT NULL COMMENT "用户 ID",
                         `score` int(11) NOT NULL COMMENT "用户得分",
                         `update_time` DATETIMEV2 NULL DEFAULT 
CURRENT_TIMESTAMP)
@@ -152,7 +152,7 @@ suite("test_primary_key_partial_update_seq_col", "p0") {
             // the input data don't contains sequence mapping column but the 
sequence mapping
             // column's default value is CURRENT_TIMESTAMP, will load 
successfully
             streamLoad {
-                table "${tableName2}"
+                table "nereids_partial_update_20231227"
 
                 set 'column_separator', ','
                 set 'format', 'csv'
@@ -164,8 +164,8 @@ suite("test_primary_key_partial_update_seq_col", "p0") {
 
             sql "sync"
 
-            qt_sql """ select id,score from ${tableName2} order by id;"""
-            sql """ DROP TABLE IF EXISTS ${tableName2}; """
+            qt_sql """ select id,score from nereids_partial_update_20231227 
order by id;"""
+            sql """ DROP TABLE IF EXISTS nereids_partial_update_20231227; """
         }
     }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to