From 61d556c718b1588ae2f6f653bddf8d0b22becf93 Mon Sep 17 00:00:00 2001 From: minghong Date: Fri, 8 Dec 2023 12:58:42 +0800 Subject: [PATCH] [fix](nereids)runtime filter translator failed on set operator (#28102) * runtime filter translator failed on set operator --- .../nereids/processor/post/RuntimeFilterContext.java | 2 ++ .../trees/plans/physical/AbstractPhysicalPlan.java | 4 ++++ .../doris/nereids/postprocess/RuntimeFilterTest.java | 1 + .../data/nereids_tpcds_shape_sf1000_p0/shape/query2.out | 2 +- .../data/nereids_tpcds_shape_sf1000_p0/shape/query5.out | 6 +++--- .../data/nereids_tpcds_shape_sf1000_p0/shape/query54.out | 2 +- .../data/nereids_tpcds_shape_sf1000_p0/shape/query71.out | 4 ++-- .../noStatsRfPrune/query5.out | 8 ++++---- .../noStatsRfPrune/query54.out | 2 +- .../noStatsRfPrune/query71.out | 4 ++-- .../no_stats_shape/query2.out | 2 +- .../no_stats_shape/query5.out | 8 ++++---- .../no_stats_shape/query54.out | 2 +- .../no_stats_shape/query71.out | 4 ++-- .../data/nereids_tpcds_shape_sf100_p0/rf_prune/query5.out | 6 +++--- .../nereids_tpcds_shape_sf100_p0/rf_prune/query54.out | 2 +- .../nereids_tpcds_shape_sf100_p0/rf_prune/query71.out | 4 ++-- .../data/nereids_tpcds_shape_sf100_p0/shape/query2.out | 2 +- .../data/nereids_tpcds_shape_sf100_p0/shape/query5.out | 6 +++--- .../data/nereids_tpcds_shape_sf100_p0/shape/query54.out | 2 +- .../data/nereids_tpcds_shape_sf100_p0/shape/query71.out | 4 ++-- 21 files changed, 42 insertions(+), 35 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterContext.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterContext.java index 7f6eeedeaf..e986921d72 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterContext.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterContext.java @@ -52,6 +52,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.stream.Collectors; /** * runtime filter context used at post process and translation. @@ -273,6 +274,7 @@ public class RuntimeFilterContext { l.addAll(r); return l; }); + filters = filters.stream().distinct().collect(Collectors.toList()); filters.sort((a, b) -> a.getId().compareTo(b.getId())); return filters; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/AbstractPhysicalPlan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/AbstractPhysicalPlan.java index 145f459202..14aa44e794 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/AbstractPhysicalPlan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/AbstractPhysicalPlan.java @@ -122,8 +122,12 @@ public abstract class AbstractPhysicalPlan extends AbstractPlan implements Physi ctx.getRuntimeFilterBySrcAndType(src, type, builderNode); Preconditions.checkState(scanSlot != null, "scan slot is null"); if (filter != null) { + this.addAppliedRuntimeFilter(filter); filter.addTargetSlot(scanSlot); filter.addTargetExpression(scanSlot); + ctx.addJoinToTargetMap(builderNode, scanSlot.getExprId()); + ctx.setTargetExprIdToFilter(scanSlot.getExprId(), filter); + ctx.setTargetsOnScanNode(aliasTransferMap.get(probeExpr).first, scanSlot); } else { filter = new RuntimeFilter(generator.getNextId(), src, ImmutableList.of(scanSlot), type, exprOrder, builderNode, buildSideNdv); diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/postprocess/RuntimeFilterTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/postprocess/RuntimeFilterTest.java index 17b8c53fa8..e8753d1e5c 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/postprocess/RuntimeFilterTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/postprocess/RuntimeFilterTest.java @@ -275,6 +275,7 @@ public class RuntimeFilterTest extends SSBTestBase { checkRuntimeFilterExprs(filters, ImmutableList.of( Pair.of("s_suppkey", "lo_partkey"), Pair.of("p_partkey", "lo_partkey"))); + connectContext.getSessionVariable().enableRuntimeFilterPrune = false; connectContext.getSessionVariable().expandRuntimeFilterByInnerJoin = true; filters = getRuntimeFilters(sql).get(); Assertions.assertEquals(2, filters.size()); diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query2.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query2.out index 4a45ede0d2..4ef14e4020 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query2.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query2.out @@ -13,7 +13,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ----------------PhysicalDistribute ------------------PhysicalProject ---------------------PhysicalOlapScan[catalog_sales] +--------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 --------------PhysicalDistribute ----------------PhysicalProject ------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query5.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query5.out index 3b26c6e90d..9e38aadcf2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query5.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query5.out @@ -24,7 +24,7 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 --------------------------------------PhysicalDistribute ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_returns] +------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) @@ -46,7 +46,7 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 --------------------------------------PhysicalDistribute ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[catalog_returns] +------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) @@ -72,7 +72,7 @@ PhysicalResultSink --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_returns] +----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query54.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query54.out index b701376ffd..98696b80e4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query54.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query54.out @@ -68,7 +68,7 @@ PhysicalResultSink ------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 --------------------------------------------------------------------PhysicalDistribute ----------------------------------------------------------------------PhysicalProject -------------------------------------------------------------------------PhysicalOlapScan[web_sales] +------------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ------------------------------------------------------------------PhysicalDistribute --------------------------------------------------------------------PhysicalProject ----------------------------------------------------------------------filter((item.i_category = 'Music') and (item.i_class = 'country')) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query71.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query71.out index 4732148060..9bdb925a31 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query71.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query71.out @@ -26,7 +26,7 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 +----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF3 --------------------------------PhysicalDistribute ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2002)) @@ -35,7 +35,7 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 --------------------------------PhysicalDistribute ----------------------------------PhysicalProject ------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2002)) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query5.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query5.out index b494cf4de1..ec32848249 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query5.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query5.out @@ -23,7 +23,7 @@ PhysicalResultSink ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_returns] +----------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF1 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store] @@ -44,7 +44,7 @@ PhysicalResultSink ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[catalog_returns] +----------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_page] @@ -67,9 +67,9 @@ PhysicalResultSink --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +--------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF6 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_returns] +--------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF7 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query54.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query54.out index 8ac92ae47e..c0c2047082 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query54.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query54.out @@ -34,7 +34,7 @@ PhysicalResultSink --------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 ----------------------------------------------------PhysicalDistribute ------------------------------------------------------PhysicalProject ---------------------------------------------------------PhysicalOlapScan[web_sales] +--------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 --------------------------------------------------PhysicalDistribute ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query71.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query71.out index 7876464659..77172537ad 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query71.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query71.out @@ -25,7 +25,7 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF3 RF4 ------------------------------PhysicalDistribute --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) @@ -34,7 +34,7 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF4 ------------------------------PhysicalDistribute --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query2.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query2.out index 54e40af026..10d0547d00 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query2.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query2.out @@ -13,7 +13,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ----------------PhysicalDistribute ------------------PhysicalProject ---------------------PhysicalOlapScan[catalog_sales] +--------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 --------------PhysicalDistribute ----------------PhysicalProject ------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query5.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query5.out index b7b86ac808..77148e5b99 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query5.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query5.out @@ -23,7 +23,7 @@ PhysicalResultSink ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_returns] +----------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store] @@ -44,7 +44,7 @@ PhysicalResultSink ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[catalog_returns] +----------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_page] @@ -67,9 +67,9 @@ PhysicalResultSink --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +--------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF6 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_returns] +--------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF7 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query54.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query54.out index 6ad6a2dcc7..79fea752c1 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query54.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query54.out @@ -34,7 +34,7 @@ PhysicalResultSink --------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 ----------------------------------------------------PhysicalDistribute ------------------------------------------------------PhysicalProject ---------------------------------------------------------PhysicalOlapScan[web_sales] +--------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 --------------------------------------------------PhysicalDistribute ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query71.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query71.out index 7876464659..77172537ad 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query71.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query71.out @@ -25,7 +25,7 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF3 RF4 ------------------------------PhysicalDistribute --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) @@ -34,7 +34,7 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF4 ------------------------------PhysicalDistribute --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query5.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query5.out index 3b26c6e90d..9e38aadcf2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query5.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query5.out @@ -24,7 +24,7 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 --------------------------------------PhysicalDistribute ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_returns] +------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) @@ -46,7 +46,7 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 --------------------------------------PhysicalDistribute ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[catalog_returns] +------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) @@ -72,7 +72,7 @@ PhysicalResultSink --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_returns] +----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query54.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query54.out index fdd19aa1e6..74994c2cd2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query54.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query54.out @@ -48,7 +48,7 @@ PhysicalResultSink ------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 --------------------------------------------------------------------------PhysicalDistribute ----------------------------------------------------------------------------PhysicalProject -------------------------------------------------------------------------------PhysicalOlapScan[web_sales] +------------------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ------------------------------------------------------------------------PhysicalDistribute --------------------------------------------------------------------------PhysicalProject ----------------------------------------------------------------------------filter((item.i_category = 'Women') and (item.i_class = 'maternity')) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query71.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query71.out index a689ad41e1..99e1f5621a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query71.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query71.out @@ -27,7 +27,7 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 +------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF3 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) @@ -36,7 +36,7 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query2.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query2.out index 4a45ede0d2..4ef14e4020 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query2.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query2.out @@ -13,7 +13,7 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ----------------PhysicalDistribute ------------------PhysicalProject ---------------------PhysicalOlapScan[catalog_sales] +--------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 --------------PhysicalDistribute ----------------PhysicalProject ------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query5.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query5.out index 3b26c6e90d..9e38aadcf2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query5.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query5.out @@ -24,7 +24,7 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 --------------------------------------PhysicalDistribute ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_returns] +------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) @@ -46,7 +46,7 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 --------------------------------------PhysicalDistribute ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[catalog_returns] +------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) @@ -72,7 +72,7 @@ PhysicalResultSink --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_returns] +----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 ------------------------------------PhysicalDistribute --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query54.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query54.out index 7df5b18f2a..4cdbeaaa86 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query54.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query54.out @@ -48,7 +48,7 @@ PhysicalResultSink ------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 --------------------------------------------------------------------------PhysicalDistribute ----------------------------------------------------------------------------PhysicalProject -------------------------------------------------------------------------------PhysicalOlapScan[web_sales] +------------------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ------------------------------------------------------------------------PhysicalDistribute --------------------------------------------------------------------------PhysicalProject ----------------------------------------------------------------------------filter((item.i_category = 'Women') and (item.i_class = 'maternity')) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query71.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query71.out index a689ad41e1..99e1f5621a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query71.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query71.out @@ -27,7 +27,7 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 +------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF3 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) @@ -36,7 +36,7 @@ PhysicalResultSink ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ----------------------------------PhysicalDistribute ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998))