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

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


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new afd94676d52 [fix](Nereids) fix bug for TimestampArithmetic.equals() 
branch-3.0 (#45924)
afd94676d52 is described below

commit afd94676d52dcc98beed1189a4f52986f05c05de
Author: minghong <zhoumingh...@selectdb.com>
AuthorDate: Sun Jan 5 09:51:55 2025 +0800

    [fix](Nereids) fix bug for TimestampArithmetic.equals() branch-3.0 (#45924)
    
    ### What problem does this PR solve?
    
    pr #45106 triggers this bug on regression case
    tpcds_sf1_unique_p1/sql/q24_1.sql
---
 .../doris/nereids/trees/expressions/TimestampArithmetic.java |  1 +
 regression-test/data/nereids_hint_tpcds_p0/shape/query21.out |  2 +-
 regression-test/data/nereids_hint_tpcds_p0/shape/query40.out |  2 +-
 .../data/nereids_tpcds_shape_sf1000_p0/shape/query21.out     | 12 ++++++------
 .../data/nereids_tpcds_shape_sf1000_p0/shape/query40.out     | 12 ++++++------
 .../nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query21.out  |  2 +-
 .../nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query40.out  |  2 +-
 .../nereids_tpcds_shape_sf100_p0/no_stats_shape/query21.out  |  2 +-
 .../nereids_tpcds_shape_sf100_p0/no_stats_shape/query40.out  |  2 +-
 .../data/nereids_tpcds_shape_sf100_p0/rf_prune/query21.out   | 12 ++++++------
 .../data/nereids_tpcds_shape_sf100_p0/rf_prune/query40.out   | 12 ++++++------
 .../data/nereids_tpcds_shape_sf100_p0/shape/query21.out      | 12 ++++++------
 .../data/nereids_tpcds_shape_sf100_p0/shape/query40.out      | 12 ++++++------
 .../data/nereids_tpcds_shape_sf10t_orc/shape/query21.out     |  2 +-
 .../data/nereids_tpcds_shape_sf10t_orc/shape/query40.out     |  2 +-
 .../new_shapes_p0/tpcds_sf100/noStatsRfPrune/query21.out     |  2 +-
 .../new_shapes_p0/tpcds_sf100/noStatsRfPrune/query40.out     |  2 +-
 .../new_shapes_p0/tpcds_sf100/no_stats_shape/query21.out     |  2 +-
 .../new_shapes_p0/tpcds_sf100/no_stats_shape/query40.out     |  2 +-
 .../data/new_shapes_p0/tpcds_sf100/rf_prune/query21.out      | 12 ++++++------
 .../data/new_shapes_p0/tpcds_sf100/rf_prune/query40.out      | 12 ++++++------
 .../data/new_shapes_p0/tpcds_sf100/shape/query21.out         | 12 ++++++------
 .../data/new_shapes_p0/tpcds_sf100/shape/query40.out         | 12 ++++++------
 .../data/new_shapes_p0/tpcds_sf1000/shape/query21.out        | 12 ++++++------
 .../data/new_shapes_p0/tpcds_sf1000/shape/query40.out        | 12 ++++++------
 25 files changed, 85 insertions(+), 84 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/TimestampArithmetic.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/TimestampArithmetic.java
index 737778a82d1..40a727eb175 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/TimestampArithmetic.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/TimestampArithmetic.java
@@ -160,6 +160,7 @@ public class TimestampArithmetic extends Expression 
implements BinaryExpression,
         }
         TimestampArithmetic other = (TimestampArithmetic) o;
         return Objects.equals(funcName, other.funcName) && 
Objects.equals(timeUnit, other.timeUnit)
+                && op.equals(other.op)
                 && Objects.equals(left(), other.left()) && 
Objects.equals(right(), other.right());
     }
 }
diff --git a/regression-test/data/nereids_hint_tpcds_p0/shape/query21.out 
b/regression-test/data/nereids_hint_tpcds_p0/shape/query21.out
index 50515df2906..2076a345643 100644
--- a/regression-test/data/nereids_hint_tpcds_p0/shape/query21.out
+++ b/regression-test/data/nereids_hint_tpcds_p0/shape/query21.out
@@ -19,7 +19,7 @@ PhysicalResultSink
 ------------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
 --------------------------------PhysicalOlapScan[item]
 ------------------------PhysicalProject
---------------------------filter((date_dim.d_date = '1999-05-23'))
+--------------------------filter((date_dim.d_date <= '1999-07-22') and 
(date_dim.d_date >= '1999-05-23'))
 ----------------------------PhysicalOlapScan[date_dim]
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[warehouse]
diff --git a/regression-test/data/nereids_hint_tpcds_p0/shape/query40.out 
b/regression-test/data/nereids_hint_tpcds_p0/shape/query40.out
index 04e0789bf8a..b8219c68f1f 100644
--- a/regression-test/data/nereids_hint_tpcds_p0/shape/query40.out
+++ b/regression-test/data/nereids_hint_tpcds_p0/shape/query40.out
@@ -23,7 +23,7 @@ PhysicalResultSink
 --------------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
 ----------------------------------PhysicalOlapScan[item]
 --------------------------PhysicalProject
-----------------------------filter((date_dim.d_date = '2001-04-02'))
+----------------------------filter((date_dim.d_date <= '2001-06-01') and 
(date_dim.d_date >= '2001-04-02'))
 ------------------------------PhysicalOlapScan[date_dim]
 ------------------PhysicalProject
 --------------------PhysicalOlapScan[warehouse]
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query21.out 
b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query21.out
index 2c44317371e..f68b978b0b2 100644
--- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query21.out
+++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query21.out
@@ -11,16 +11,16 @@ PhysicalResultSink
 ----------------PhysicalProject
 ------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) 
otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk]
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() 
build RFs:RF1 i_item_sk->[inv_item_sk]
+----------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() 
build RFs:RF1 d_date_sk->[inv_date_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() 
build RFs:RF0 d_date_sk->[inv_date_sk]
+--------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() 
build RFs:RF0 i_item_sk->[inv_item_sk]
 ----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2
 ----------------------------PhysicalProject
-------------------------------filter((date_dim.d_date = '1999-05-23'))
---------------------------------PhysicalOlapScan[date_dim]
+------------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
+--------------------------------PhysicalOlapScan[item]
 ------------------------PhysicalProject
---------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
-----------------------------PhysicalOlapScan[item]
+--------------------------filter((date_dim.d_date <= '1999-07-22') and 
(date_dim.d_date >= '1999-05-23'))
+----------------------------PhysicalOlapScan[date_dim]
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[warehouse]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query40.out 
b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query40.out
index 61d2306286e..041e5711184 100644
--- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query40.out
+++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query40.out
@@ -14,17 +14,17 @@ PhysicalResultSink
 ----------------------PhysicalProject
 ------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3
 ----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() 
build RFs:RF1 i_item_sk->[cs_item_sk]
+------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) 
otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk]
 --------------------------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]
+----------------------------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
 --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 
RF1 RF4
 ------------------------------PhysicalProject
---------------------------------filter((date_dim.d_date = '2001-04-02'))
-----------------------------------PhysicalOlapScan[date_dim]
+--------------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
+----------------------------------PhysicalOlapScan[item]
 --------------------------PhysicalProject
-----------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
-------------------------------PhysicalOlapScan[item]
+----------------------------filter((date_dim.d_date <= '2001-06-01') and 
(date_dim.d_date >= '2001-04-02'))
+------------------------------PhysicalOlapScan[date_dim]
 ------------------PhysicalProject
 --------------------PhysicalOlapScan[warehouse]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query21.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query21.out
index 621490d6608..db506f0acaa 100644
--- 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query21.out
+++ 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query21.out
@@ -21,6 +21,6 @@ PhysicalResultSink
 --------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
 ----------------------------PhysicalOlapScan[item]
 --------------------PhysicalProject
-----------------------filter((date_dim.d_date = '2002-01-28'))
+----------------------filter((date_dim.d_date <= '2002-03-29') and 
(date_dim.d_date >= '2002-01-28'))
 ------------------------PhysicalOlapScan[date_dim]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query40.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query40.out
index a7af45b01ff..14654718173 100644
--- 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query40.out
+++ 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query40.out
@@ -25,6 +25,6 @@ PhysicalResultSink
 ------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
 --------------------------PhysicalOlapScan[item]
 ------------------PhysicalProject
---------------------filter((date_dim.d_date = '2001-03-03'))
+--------------------filter((date_dim.d_date <= '2001-05-02') and 
(date_dim.d_date >= '2001-03-03'))
 ----------------------PhysicalOlapScan[date_dim]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query21.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query21.out
index 8fe10ba628d..6a3b7ecf26c 100644
--- 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query21.out
+++ 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query21.out
@@ -21,6 +21,6 @@ PhysicalResultSink
 --------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
 ----------------------------PhysicalOlapScan[item]
 --------------------PhysicalProject
-----------------------filter((date_dim.d_date = '2002-01-28'))
+----------------------filter((date_dim.d_date <= '2002-03-29') and 
(date_dim.d_date >= '2002-01-28'))
 ------------------------PhysicalOlapScan[date_dim]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query40.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query40.out
index 1fa5c0aabf5..aae0d788557 100644
--- 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query40.out
+++ 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query40.out
@@ -25,6 +25,6 @@ PhysicalResultSink
 ------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
 --------------------------PhysicalOlapScan[item]
 ------------------PhysicalProject
---------------------filter((date_dim.d_date = '2001-03-03'))
+--------------------filter((date_dim.d_date <= '2001-05-02') and 
(date_dim.d_date >= '2001-03-03'))
 ----------------------PhysicalOlapScan[date_dim]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query21.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query21.out
index 6950418da2e..991b448adf9 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query21.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query21.out
@@ -11,16 +11,16 @@ PhysicalResultSink
 ----------------PhysicalProject
 ------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) 
otherCondition=()
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() 
build RFs:RF1 i_item_sk->[inv_item_sk]
+----------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() 
build RFs:RF1 d_date_sk->[inv_date_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() 
build RFs:RF0 d_date_sk->[inv_date_sk]
+--------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() 
build RFs:RF0 i_item_sk->[inv_item_sk]
 ----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1
 ----------------------------PhysicalProject
-------------------------------filter((date_dim.d_date = '2002-01-28'))
---------------------------------PhysicalOlapScan[date_dim]
+------------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
+--------------------------------PhysicalOlapScan[item]
 ------------------------PhysicalProject
---------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
-----------------------------PhysicalOlapScan[item]
+--------------------------filter((date_dim.d_date <= '2002-03-29') and 
(date_dim.d_date >= '2002-01-28'))
+----------------------------PhysicalOlapScan[date_dim]
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[warehouse]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query40.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query40.out
index cc14224e1c7..ade38048fb9 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query40.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query40.out
@@ -14,17 +14,17 @@ PhysicalResultSink
 ----------------------PhysicalProject
 ------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3
 ----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() 
build RFs:RF1 i_item_sk->[cs_item_sk]
+------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) 
otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk]
 --------------------------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]
+----------------------------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
 --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 
RF1
 ------------------------------PhysicalProject
---------------------------------filter((date_dim.d_date = '2001-03-03'))
-----------------------------------PhysicalOlapScan[date_dim]
+--------------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
+----------------------------------PhysicalOlapScan[item]
 --------------------------PhysicalProject
-----------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
-------------------------------PhysicalOlapScan[item]
+----------------------------filter((date_dim.d_date <= '2001-05-02') and 
(date_dim.d_date >= '2001-03-03'))
+------------------------------PhysicalOlapScan[date_dim]
 ------------------PhysicalProject
 --------------------PhysicalOlapScan[warehouse]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query21.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query21.out
index cb45325ac9e..e80000c6353 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query21.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query21.out
@@ -11,16 +11,16 @@ PhysicalResultSink
 ----------------PhysicalProject
 ------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) 
otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk]
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() 
build RFs:RF1 i_item_sk->[inv_item_sk]
+----------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() 
build RFs:RF1 d_date_sk->[inv_date_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() 
build RFs:RF0 d_date_sk->[inv_date_sk]
+--------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() 
build RFs:RF0 i_item_sk->[inv_item_sk]
 ----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2
 ----------------------------PhysicalProject
-------------------------------filter((date_dim.d_date = '2002-01-28'))
---------------------------------PhysicalOlapScan[date_dim]
+------------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
+--------------------------------PhysicalOlapScan[item]
 ------------------------PhysicalProject
---------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
-----------------------------PhysicalOlapScan[item]
+--------------------------filter((date_dim.d_date <= '2002-03-29') and 
(date_dim.d_date >= '2002-01-28'))
+----------------------------PhysicalOlapScan[date_dim]
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[warehouse]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query40.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query40.out
index 5c9d8fbfe4f..5ff27658e2e 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query40.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query40.out
@@ -14,17 +14,17 @@ PhysicalResultSink
 ----------------------PhysicalProject
 ------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3
 ----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() 
build RFs:RF1 i_item_sk->[cs_item_sk]
+------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) 
otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk]
 --------------------------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]
+----------------------------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
 --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 
RF1 RF4
 ------------------------------PhysicalProject
---------------------------------filter((date_dim.d_date = '2001-03-03'))
-----------------------------------PhysicalOlapScan[date_dim]
+--------------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
+----------------------------------PhysicalOlapScan[item]
 --------------------------PhysicalProject
-----------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
-------------------------------PhysicalOlapScan[item]
+----------------------------filter((date_dim.d_date <= '2001-05-02') and 
(date_dim.d_date >= '2001-03-03'))
+------------------------------PhysicalOlapScan[date_dim]
 ------------------PhysicalProject
 --------------------PhysicalOlapScan[warehouse]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf10t_orc/shape/query21.out 
b/regression-test/data/nereids_tpcds_shape_sf10t_orc/shape/query21.out
index 47437f6e6cc..31448491385 100644
--- a/regression-test/data/nereids_tpcds_shape_sf10t_orc/shape/query21.out
+++ b/regression-test/data/nereids_tpcds_shape_sf10t_orc/shape/query21.out
@@ -21,6 +21,6 @@ PhysicalResultSink
 --------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
 ----------------------------PhysicalOlapScan[item]
 --------------------PhysicalProject
-----------------------filter((date_dim.d_date = '1999-02-18'))
+----------------------filter((date_dim.d_date <= '1999-04-19') and 
(date_dim.d_date >= '1999-02-18'))
 ------------------------PhysicalOlapScan[date_dim]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf10t_orc/shape/query40.out 
b/regression-test/data/nereids_tpcds_shape_sf10t_orc/shape/query40.out
index e7fac15753c..414f6e3e0bd 100644
--- a/regression-test/data/nereids_tpcds_shape_sf10t_orc/shape/query40.out
+++ b/regression-test/data/nereids_tpcds_shape_sf10t_orc/shape/query40.out
@@ -25,6 +25,6 @@ PhysicalResultSink
 ------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
 --------------------------PhysicalOlapScan[item]
 ------------------PhysicalProject
---------------------filter((date_dim.d_date = '2000-02-17'))
+--------------------filter((date_dim.d_date <= '2000-04-17') and 
(date_dim.d_date >= '2000-02-17'))
 ----------------------PhysicalOlapScan[date_dim]
 
diff --git 
a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query21.out 
b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query21.out
index 621490d6608..db506f0acaa 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query21.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query21.out
@@ -21,6 +21,6 @@ PhysicalResultSink
 --------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
 ----------------------------PhysicalOlapScan[item]
 --------------------PhysicalProject
-----------------------filter((date_dim.d_date = '2002-01-28'))
+----------------------filter((date_dim.d_date <= '2002-03-29') and 
(date_dim.d_date >= '2002-01-28'))
 ------------------------PhysicalOlapScan[date_dim]
 
diff --git 
a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query40.out 
b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query40.out
index a7af45b01ff..14654718173 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query40.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query40.out
@@ -25,6 +25,6 @@ PhysicalResultSink
 ------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
 --------------------------PhysicalOlapScan[item]
 ------------------PhysicalProject
---------------------filter((date_dim.d_date = '2001-03-03'))
+--------------------filter((date_dim.d_date <= '2001-05-02') and 
(date_dim.d_date >= '2001-03-03'))
 ----------------------PhysicalOlapScan[date_dim]
 
diff --git 
a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query21.out 
b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query21.out
index 8fe10ba628d..6a3b7ecf26c 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query21.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query21.out
@@ -21,6 +21,6 @@ PhysicalResultSink
 --------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
 ----------------------------PhysicalOlapScan[item]
 --------------------PhysicalProject
-----------------------filter((date_dim.d_date = '2002-01-28'))
+----------------------filter((date_dim.d_date <= '2002-03-29') and 
(date_dim.d_date >= '2002-01-28'))
 ------------------------PhysicalOlapScan[date_dim]
 
diff --git 
a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query40.out 
b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query40.out
index 1fa5c0aabf5..aae0d788557 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query40.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query40.out
@@ -25,6 +25,6 @@ PhysicalResultSink
 ------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
 --------------------------PhysicalOlapScan[item]
 ------------------PhysicalProject
---------------------filter((date_dim.d_date = '2001-03-03'))
+--------------------filter((date_dim.d_date <= '2001-05-02') and 
(date_dim.d_date >= '2001-03-03'))
 ----------------------PhysicalOlapScan[date_dim]
 
diff --git 
a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query21.out 
b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query21.out
index 6950418da2e..991b448adf9 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query21.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query21.out
@@ -11,16 +11,16 @@ PhysicalResultSink
 ----------------PhysicalProject
 ------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) 
otherCondition=()
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() 
build RFs:RF1 i_item_sk->[inv_item_sk]
+----------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() 
build RFs:RF1 d_date_sk->[inv_date_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() 
build RFs:RF0 d_date_sk->[inv_date_sk]
+--------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() 
build RFs:RF0 i_item_sk->[inv_item_sk]
 ----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1
 ----------------------------PhysicalProject
-------------------------------filter((date_dim.d_date = '2002-01-28'))
---------------------------------PhysicalOlapScan[date_dim]
+------------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
+--------------------------------PhysicalOlapScan[item]
 ------------------------PhysicalProject
---------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
-----------------------------PhysicalOlapScan[item]
+--------------------------filter((date_dim.d_date <= '2002-03-29') and 
(date_dim.d_date >= '2002-01-28'))
+----------------------------PhysicalOlapScan[date_dim]
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[warehouse]
 
diff --git 
a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query40.out 
b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query40.out
index cc14224e1c7..ade38048fb9 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query40.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query40.out
@@ -14,17 +14,17 @@ PhysicalResultSink
 ----------------------PhysicalProject
 ------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3
 ----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() 
build RFs:RF1 i_item_sk->[cs_item_sk]
+------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) 
otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk]
 --------------------------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]
+----------------------------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
 --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 
RF1
 ------------------------------PhysicalProject
---------------------------------filter((date_dim.d_date = '2001-03-03'))
-----------------------------------PhysicalOlapScan[date_dim]
+--------------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
+----------------------------------PhysicalOlapScan[item]
 --------------------------PhysicalProject
-----------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
-------------------------------PhysicalOlapScan[item]
+----------------------------filter((date_dim.d_date <= '2001-05-02') and 
(date_dim.d_date >= '2001-03-03'))
+------------------------------PhysicalOlapScan[date_dim]
 ------------------PhysicalProject
 --------------------PhysicalOlapScan[warehouse]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query21.out 
b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query21.out
index cb45325ac9e..e80000c6353 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query21.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query21.out
@@ -11,16 +11,16 @@ PhysicalResultSink
 ----------------PhysicalProject
 ------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) 
otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk]
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() 
build RFs:RF1 i_item_sk->[inv_item_sk]
+----------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() 
build RFs:RF1 d_date_sk->[inv_date_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() 
build RFs:RF0 d_date_sk->[inv_date_sk]
+--------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() 
build RFs:RF0 i_item_sk->[inv_item_sk]
 ----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2
 ----------------------------PhysicalProject
-------------------------------filter((date_dim.d_date = '2002-01-28'))
---------------------------------PhysicalOlapScan[date_dim]
+------------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
+--------------------------------PhysicalOlapScan[item]
 ------------------------PhysicalProject
---------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
-----------------------------PhysicalOlapScan[item]
+--------------------------filter((date_dim.d_date <= '2002-03-29') and 
(date_dim.d_date >= '2002-01-28'))
+----------------------------PhysicalOlapScan[date_dim]
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[warehouse]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query40.out 
b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query40.out
index 5c9d8fbfe4f..5ff27658e2e 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query40.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query40.out
@@ -14,17 +14,17 @@ PhysicalResultSink
 ----------------------PhysicalProject
 ------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3
 ----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() 
build RFs:RF1 i_item_sk->[cs_item_sk]
+------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) 
otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk]
 --------------------------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]
+----------------------------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
 --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 
RF1 RF4
 ------------------------------PhysicalProject
---------------------------------filter((date_dim.d_date = '2001-03-03'))
-----------------------------------PhysicalOlapScan[date_dim]
+--------------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
+----------------------------------PhysicalOlapScan[item]
 --------------------------PhysicalProject
-----------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
-------------------------------PhysicalOlapScan[item]
+----------------------------filter((date_dim.d_date <= '2001-05-02') and 
(date_dim.d_date >= '2001-03-03'))
+------------------------------PhysicalOlapScan[date_dim]
 ------------------PhysicalProject
 --------------------PhysicalOlapScan[warehouse]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query21.out 
b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query21.out
index 2c44317371e..f68b978b0b2 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query21.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query21.out
@@ -11,16 +11,16 @@ PhysicalResultSink
 ----------------PhysicalProject
 ------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) 
otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk]
 --------------------PhysicalProject
-----------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() 
build RFs:RF1 i_item_sk->[inv_item_sk]
+----------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() 
build RFs:RF1 d_date_sk->[inv_date_sk]
 ------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() 
build RFs:RF0 d_date_sk->[inv_date_sk]
+--------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() 
build RFs:RF0 i_item_sk->[inv_item_sk]
 ----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2
 ----------------------------PhysicalProject
-------------------------------filter((date_dim.d_date = '1999-05-23'))
---------------------------------PhysicalOlapScan[date_dim]
+------------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
+--------------------------------PhysicalOlapScan[item]
 ------------------------PhysicalProject
---------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
-----------------------------PhysicalOlapScan[item]
+--------------------------filter((date_dim.d_date <= '1999-07-22') and 
(date_dim.d_date >= '1999-05-23'))
+----------------------------PhysicalOlapScan[date_dim]
 --------------------PhysicalProject
 ----------------------PhysicalOlapScan[warehouse]
 
diff --git a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query40.out 
b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query40.out
index 61d2306286e..041e5711184 100644
--- a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query40.out
+++ b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query40.out
@@ -14,17 +14,17 @@ PhysicalResultSink
 ----------------------PhysicalProject
 ------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3
 ----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() 
build RFs:RF1 i_item_sk->[cs_item_sk]
+------------------------hashJoin[INNER_JOIN broadcast] 
hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) 
otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk]
 --------------------------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]
+----------------------------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
 --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 
RF1 RF4
 ------------------------------PhysicalProject
---------------------------------filter((date_dim.d_date = '2001-04-02'))
-----------------------------------PhysicalOlapScan[date_dim]
+--------------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
+----------------------------------PhysicalOlapScan[item]
 --------------------------PhysicalProject
-----------------------------filter((item.i_current_price <= 1.49) and 
(item.i_current_price >= 0.99))
-------------------------------PhysicalOlapScan[item]
+----------------------------filter((date_dim.d_date <= '2001-06-01') and 
(date_dim.d_date >= '2001-04-02'))
+------------------------------PhysicalOlapScan[date_dim]
 ------------------PhysicalProject
 --------------------PhysicalOlapScan[warehouse]
 


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


Reply via email to