diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildrenPropertiesRegulator.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildrenPropertiesRegulator.java index 02cb56ef8e..10b52dee89 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildrenPropertiesRegulator.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildrenPropertiesRegulator.java @@ -42,6 +42,7 @@ import org.apache.doris.nereids.trees.plans.physical.PhysicalNestedLoopJoin; import org.apache.doris.nereids.trees.plans.physical.PhysicalPartitionTopN; import org.apache.doris.nereids.trees.plans.physical.PhysicalProject; import org.apache.doris.nereids.trees.plans.physical.PhysicalSetOperation; +import org.apache.doris.nereids.trees.plans.physical.PhysicalTopN; import org.apache.doris.nereids.trees.plans.physical.PhysicalUnion; import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor; import org.apache.doris.nereids.util.JoinUtils; @@ -464,6 +465,19 @@ public class ChildrenPropertiesRegulator extends PlanVisitor { return true; } + @Override + public Boolean visitPhysicalTopN(PhysicalTopN topN, Void context) { + // process must shuffle + visit(topN, context); + + // If child is DistributionSpecGather, topN should forbid two-phase topN + if (topN.getSortPhase() == SortPhase.LOCAL_SORT + && childrenProperties.get(0).getDistributionSpec().equals(DistributionSpecGather.INSTANCE)) { + return false; + } + return true; + } + /** * check both side real output hash key order are same or not. * diff --git a/regression-test/data/nereids_rules_p0/limit_push_down/order_push_down.out b/regression-test/data/nereids_rules_p0/limit_push_down/order_push_down.out index d1684890a5..9b511664c7 100644 --- a/regression-test/data/nereids_rules_p0/limit_push_down/order_push_down.out +++ b/regression-test/data/nereids_rules_p0/limit_push_down/order_push_down.out @@ -75,13 +75,12 @@ PhysicalResultSink -- !cross_join_order -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------NestedLoopJoin[CROSS_JOIN] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +--PhysicalTopN[GATHER_SORT] +----NestedLoopJoin[CROSS_JOIN] +------PhysicalTopN[MERGE_SORT] +--------PhysicalTopN[LOCAL_SORT] +----------PhysicalOlapScan[t1] +------PhysicalOlapScan[t2] -- !limit_offset_sort_join -- PhysicalResultSink @@ -172,12 +171,11 @@ PhysicalResultSink -- !limit_sort_window -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalWindow ---------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalOlapScan[t1] +--PhysicalTopN[GATHER_SORT] +----PhysicalWindow +------PhysicalQuickSort[MERGE_SORT] +--------PhysicalQuickSort[LOCAL_SORT] +----------PhysicalOlapScan[t1] -- !limit_offset_window -- PhysicalResultSink @@ -191,12 +189,11 @@ PhysicalResultSink -- !limit_offset_sort_window -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalWindow ---------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalOlapScan[t1] +--PhysicalTopN[GATHER_SORT] +----PhysicalWindow +------PhysicalQuickSort[MERGE_SORT] +--------PhysicalQuickSort[LOCAL_SORT] +----------PhysicalOlapScan[t1] -- !limit_sort_filter -- PhysicalResultSink @@ -264,21 +261,19 @@ PhysicalResultSink -- !limit_window -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalWindow ---------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalOlapScan[t1] +--PhysicalTopN[GATHER_SORT] +----PhysicalWindow +------PhysicalQuickSort[MERGE_SORT] +--------PhysicalQuickSort[LOCAL_SORT] +----------PhysicalOlapScan[t1] -- !limit_offset_window -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalWindow ---------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalOlapScan[t1] +--PhysicalTopN[GATHER_SORT] +----PhysicalWindow +------PhysicalQuickSort[MERGE_SORT] +--------PhysicalQuickSort[LOCAL_SORT] +----------PhysicalOlapScan[t1] -- !limit_filter -- PhysicalResultSink @@ -334,12 +329,11 @@ PhysicalResultSink -- !limit_subquery_window -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalWindow ---------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalOlapScan[t1] +--PhysicalTopN[GATHER_SORT] +----PhysicalWindow +------PhysicalQuickSort[MERGE_SORT] +--------PhysicalQuickSort[LOCAL_SORT] +----------PhysicalOlapScan[t1] -- !limit_nested_subquery -- PhysicalResultSink @@ -384,18 +378,16 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------PhysicalUnion ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalWindow ---------------PhysicalQuickSort[MERGE_SORT] -----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalOlapScan[t1] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalWindow ---------------PhysicalQuickSort[MERGE_SORT] -----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalOlapScan[t2] +--------PhysicalTopN[GATHER_SORT] +----------PhysicalWindow +------------PhysicalQuickSort[MERGE_SORT] +--------------PhysicalQuickSort[LOCAL_SORT] +----------------PhysicalOlapScan[t1] +--------PhysicalTopN[GATHER_SORT] +----------PhysicalWindow +------------PhysicalQuickSort[MERGE_SORT] +--------------PhysicalQuickSort[LOCAL_SORT] +----------------PhysicalOlapScan[t2] -- !limit_subquery_join_filter -- PhysicalResultSink @@ -533,12 +525,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----filter((t1.id < 10)) ------PhysicalOlapScan[t1] --PhysicalResultSink -----PhysicalTopN[MERGE_SORT] -------PhysicalTopN[LOCAL_SORT] ---------PhysicalWindow -----------PhysicalQuickSort[MERGE_SORT] -------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----PhysicalTopN[GATHER_SORT] +------PhysicalWindow +--------PhysicalQuickSort[MERGE_SORT] +----------PhysicalQuickSort[LOCAL_SORT] +------------PhysicalCteConsumer ( cteId=CTEId#0 ) -- !limit_project_filter -- PhysicalResultSink @@ -567,12 +558,11 @@ PhysicalResultSink -- !limit_subquery_window -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalWindow ---------PhysicalQuickSort[MERGE_SORT] -----------PhysicalQuickSort[LOCAL_SORT] -------------PhysicalOlapScan[t1] +--PhysicalTopN[GATHER_SORT] +----PhysicalWindow +------PhysicalQuickSort[MERGE_SORT] +--------PhysicalQuickSort[LOCAL_SORT] +----------PhysicalOlapScan[t1] -- !limit_nested_subquery -- PhysicalResultSink @@ -589,13 +579,12 @@ PhysicalResultSink -- !limit_cross_join -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------NestedLoopJoin[CROSS_JOIN] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +--PhysicalTopN[GATHER_SORT] +----NestedLoopJoin[CROSS_JOIN] +------PhysicalTopN[MERGE_SORT] +--------PhysicalTopN[LOCAL_SORT] +----------PhysicalOlapScan[t1] +------PhysicalOlapScan[t2] -- !limit_multiple_left_outer_join -- PhysicalResultSink @@ -633,13 +622,12 @@ PhysicalResultSink -- !limit_subquery_cross_join -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------NestedLoopJoin[CROSS_JOIN] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalOlapScan[t1] ---------PhysicalOlapScan[t2] +--PhysicalTopN[GATHER_SORT] +----NestedLoopJoin[CROSS_JOIN] +------PhysicalTopN[MERGE_SORT] +--------PhysicalTopN[LOCAL_SORT] +----------PhysicalOlapScan[t1] +------PhysicalOlapScan[t2] -- !limit_subquery_multiple_join -- PhysicalResultSink diff --git a/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_through_union.out b/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_through_union.out index 285156732d..be8053d834 100644 --- a/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_through_union.out +++ b/regression-test/data/nereids_rules_p0/push_down_top_n/push_down_top_n_through_union.out @@ -106,16 +106,14 @@ PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalTopN[LOCAL_SORT] ------PhysicalUnion ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalLimit[GLOBAL] ---------------PhysicalLimit[LOCAL] -----------------PhysicalOlapScan[table1] ---------PhysicalTopN[MERGE_SORT] -----------PhysicalTopN[LOCAL_SORT] -------------PhysicalLimit[GLOBAL] ---------------PhysicalLimit[LOCAL] -----------------PhysicalOlapScan[table1] +--------PhysicalTopN[GATHER_SORT] +----------PhysicalLimit[GLOBAL] +------------PhysicalLimit[LOCAL] +--------------PhysicalOlapScan[table1] +--------PhysicalTopN[GATHER_SORT] +----------PhysicalLimit[GLOBAL] +------------PhysicalLimit[LOCAL] +--------------PhysicalOlapScan[table1] -- !push_down_topn_union_complex_conditions -- PhysicalResultSink diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/bs_downgrade_shape/query61.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/bs_downgrade_shape/query61.out index 982462b51c..115af0703b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/bs_downgrade_shape/query61.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/bs_downgrade_shape/query61.out @@ -1,83 +1,82 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_61 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalProject ---------NestedLoopJoin[CROSS_JOIN] +--PhysicalTopN[GATHER_SORT] +----PhysicalProject +------NestedLoopJoin[CROSS_JOIN] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecGather] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------filter((customer_address.ca_gmt_offset = -7.00)) +------------------------PhysicalOlapScan[customer_address] apply RFs: RF10 +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF9 ss_customer_sk->[c_customer_sk] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] apply RFs: RF9 +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[ss_promo_sk] +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[ss_item_sk] +------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF7 RF8 +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------------------PhysicalProject +------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) +--------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------------------PhysicalProject +----------------------------------------filter((item.i_category = 'Home')) +------------------------------------------PhysicalOlapScan[item] +----------------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------------PhysicalProject +--------------------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) +----------------------------------------PhysicalOlapScan[promotion] +------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------------PhysicalProject +----------------------------------filter((store.s_gmt_offset = -7.00)) +------------------------------------PhysicalOlapScan[store] +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------filter((customer_address.ca_gmt_offset = -7.00)) ---------------------------PhysicalOlapScan[customer_address] apply RFs: RF10 ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF9 ss_customer_sk->[c_customer_sk] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] apply RFs: RF9 ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------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 -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[ss_promo_sk] -------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[ss_item_sk] ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF7 RF8 -----------------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) -----------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------------PhysicalProject -------------------------------------------filter((item.i_category = 'Home')) ---------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------------PhysicalProject -----------------------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) -------------------------------------------PhysicalOlapScan[promotion] +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject -------------------------------------filter((store.s_gmt_offset = -7.00)) ---------------------------------------PhysicalOlapScan[store] -----------PhysicalDistribute[DistributionSpecReplicated] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecGather] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] +------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) +--------------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------------PhysicalProject +----------------------------------filter((item.i_category = 'Home')) +------------------------------------PhysicalOlapScan[item] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------PhysicalProject +--------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +----------------------------------PhysicalOlapScan[customer_address] +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ---------------------------------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 -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 -----------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------PhysicalProject ---------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) -----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) -------------------------------------PhysicalOlapScan[customer_address] -----------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------PhysicalProject ---------------------------filter((store.s_gmt_offset = -7.00)) -----------------------------PhysicalOlapScan[store] +------------------------filter((store.s_gmt_offset = -7.00)) +--------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/bs_downgrade_shape/query95.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/bs_downgrade_shape/query95.out index 1fd11f4156..4311ae4d19 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/bs_downgrade_shape/query95.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/bs_downgrade_shape/query95.out @@ -11,43 +11,42 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalProject ------------PhysicalOlapScan[web_sales] apply RFs: RF7 --PhysicalResultSink -----PhysicalTopN[MERGE_SORT] -------PhysicalTopN[LOCAL_SORT] ---------hashAgg[DISTINCT_GLOBAL] -----------PhysicalDistribute[DistributionSpecGather] -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF6 ws_order_number->[wr_order_number,ws_order_number] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------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] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 RF6 -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +----PhysicalTopN[GATHER_SORT] +------hashAgg[DISTINCT_GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------hashAgg[DISTINCT_LOCAL] +------------hashAgg[GLOBAL] +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF6 ws_order_number->[wr_order_number,ws_order_number] +--------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject -------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF7 ws_order_number->[ws_order_number,ws_order_number] +------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number] --------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 RF6 --------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------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[DistributionSpecReplicated] -------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_state = 'VA')) -----------------------------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +--------------------PhysicalProject +----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF7 ws_order_number->[ws_order_number,ws_order_number] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------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[DistributionSpecReplicated] ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_date <= '2001-05-31') and (date_dim.d_date >= '2001-04-01')) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------------------filter((customer_address.ca_state = 'VA')) +--------------------------------------PhysicalOlapScan[customer_address] ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((web_site.web_company_name = 'pri')) -------------------------------------PhysicalOlapScan[web_site] +----------------------------------filter((date_dim.d_date <= '2001-05-31') and (date_dim.d_date >= '2001-04-01')) +------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------PhysicalProject +--------------------------------filter((web_site.web_company_name = 'pri')) +----------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query16.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query16.out index 7351b064d7..2a7c289297 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query16.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query16.out @@ -1,39 +1,38 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_16 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 +--PhysicalTopN[GATHER_SORT] +----hashAgg[DISTINCT_GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[DISTINCT_LOCAL] +----------hashAgg[GLOBAL] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject -----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 ---------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'PA')) ---------------------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 +------------------PhysicalProject +--------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------filter((customer_address.ca_state = 'PA')) +------------------------------------PhysicalOlapScan[customer_address] ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject ---------------------------------filter((call_center.cc_county = 'Williamson County')) -----------------------------------PhysicalOlapScan[call_center] +--------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +----------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------PhysicalProject +------------------------------filter((call_center.cc_county = 'Williamson County')) +--------------------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query51.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query51.out index 06a6c3d034..3cacbaeedc 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query51.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query51.out @@ -19,9 +19,9 @@ PhysicalResultSink --------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +--------------------------------------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 -------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_month_seq <= 1223) and (date_dim.d_month_seq >= 1212)) @@ -35,9 +35,9 @@ PhysicalResultSink --------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject ---------------------------------------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] +--------------------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_month_seq <= 1223) and (date_dim.d_month_seq >= 1212)) diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query61.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query61.out index ed60e93b26..9a6422ac46 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query61.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query61.out @@ -1,82 +1,81 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_61 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalProject ---------NestedLoopJoin[CROSS_JOIN] +--PhysicalTopN[GATHER_SORT] +----PhysicalProject +------NestedLoopJoin[CROSS_JOIN] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecGather] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk] +------------------PhysicalProject +--------------------filter((customer_address.ca_gmt_offset = -7.00)) +----------------------PhysicalOlapScan[customer_address] apply RFs: RF10 +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF9 ss_customer_sk->[c_customer_sk] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] apply RFs: RF9 +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[ss_promo_sk] +----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[ss_item_sk] +------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF7 RF8 +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------------------PhysicalProject +------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) +--------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------------------PhysicalProject +----------------------------------------filter((item.i_category = 'Home')) +------------------------------------------PhysicalOlapScan[item] +----------------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------------PhysicalProject +--------------------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) +----------------------------------------PhysicalOlapScan[promotion] +------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------------PhysicalProject +----------------------------------filter((store.s_gmt_offset = -7.00)) +------------------------------------PhysicalOlapScan[store] +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] --------------------PhysicalProject -----------------------filter((customer_address.ca_gmt_offset = -7.00)) -------------------------PhysicalOlapScan[customer_address] apply RFs: RF10 ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF9 ss_customer_sk->[c_customer_sk] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] apply RFs: RF9 ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------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 -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[ss_promo_sk] -------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[ss_item_sk] ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF7 RF8 -----------------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) -----------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------------PhysicalProject -------------------------------------------filter((item.i_category = 'Home')) ---------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------------PhysicalProject -----------------------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) -------------------------------------------PhysicalOlapScan[promotion] +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject -------------------------------------filter((store.s_gmt_offset = -7.00)) ---------------------------------------PhysicalOlapScan[store] -----------PhysicalDistribute[DistributionSpecReplicated] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecGather] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] +------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) +--------------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------------PhysicalProject +----------------------------------filter((item.i_category = 'Home')) +------------------------------------PhysicalOlapScan[item] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------PhysicalProject +--------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +----------------------------------PhysicalOlapScan[customer_address] +--------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ---------------------------------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 -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 -----------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------PhysicalProject ---------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) -----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) -------------------------------------PhysicalOlapScan[customer_address] -----------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------PhysicalProject ---------------------------filter((store.s_gmt_offset = -7.00)) -----------------------------PhysicalOlapScan[store] +------------------------filter((store.s_gmt_offset = -7.00)) +--------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query90.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query90.out index 3313e04f0d..a38c8995c7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query90.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query90.out @@ -1,53 +1,52 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_90 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalProject ---------NestedLoopJoin[CROSS_JOIN] +--PhysicalTopN[GATHER_SORT] +----PhysicalProject +------NestedLoopJoin[CROSS_JOIN] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecGather] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[ws_ship_hdemo_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ws_sold_time_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF3 wp_web_page_sk->[ws_web_page_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalProject +----------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +------------------------------PhysicalOlapScan[web_page] +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter((time_dim.t_hour <= 13) and (time_dim.t_hour >= 12)) +----------------------------PhysicalOlapScan[time_dim] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------filter((household_demographics.hd_dep_count = 6)) +------------------------PhysicalOlapScan[household_demographics] +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[ws_ship_hdemo_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ws_ship_hdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ws_sold_time_sk] -------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF3 wp_web_page_sk->[ws_web_page_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ws_sold_time_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF0 wp_web_page_sk->[ws_web_page_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 +----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) --------------------------------PhysicalOlapScan[web_page] ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour <= 13) and (time_dim.t_hour >= 12)) +----------------------------filter((time_dim.t_hour <= 15) and (time_dim.t_hour >= 14)) ------------------------------PhysicalOlapScan[time_dim] --------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((household_demographics.hd_dep_count = 6)) --------------------------PhysicalOlapScan[household_demographics] -----------PhysicalDistribute[DistributionSpecReplicated] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecGather] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ws_ship_hdemo_sk] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ws_sold_time_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF0 wp_web_page_sk->[ws_web_page_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -----------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------PhysicalProject ---------------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -----------------------------------PhysicalOlapScan[web_page] ---------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------PhysicalProject -------------------------------filter((time_dim.t_hour <= 15) and (time_dim.t_hour >= 14)) ---------------------------------PhysicalOlapScan[time_dim] -----------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------PhysicalProject ---------------------------filter((household_demographics.hd_dep_count = 6)) -----------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query92.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query92.out index e094e85ecb..a09ada275d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query92.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query92.out @@ -1,28 +1,27 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_92 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[LOCAL] -------------PhysicalProject ---------------filter((cast(ws_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(ws_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) -----------------PhysicalWindow -------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------PhysicalProject -----------------------------------filter((item.i_manufact_id = 714)) -------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute[DistributionSpecReplicated] +--PhysicalTopN[GATHER_SORT] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[LOCAL] +----------PhysicalProject +------------filter((cast(ws_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(ws_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) +--------------PhysicalWindow +----------------PhysicalQuickSort[LOCAL_SORT] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------filter((date_dim.d_date <= '2000-05-01') and (date_dim.d_date >= '2000-02-01')) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +----------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------PhysicalProject +--------------------------------filter((item.i_manufact_id = 714)) +----------------------------------PhysicalOlapScan[item] +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalProject +----------------------------filter((date_dim.d_date <= '2000-05-01') and (date_dim.d_date >= '2000-02-01')) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query94.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query94.out index c78c35b5af..f9bd1b64a4 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query94.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query94.out @@ -1,39 +1,38 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_94 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 +--PhysicalTopN[GATHER_SORT] +----hashAgg[DISTINCT_GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[DISTINCT_LOCAL] +----------hashAgg[GLOBAL] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject -----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_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] -------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 ---------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'OK')) ---------------------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalOlapScan[web_sales] apply RFs: RF4 +------------------PhysicalProject +--------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_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] +----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '2002-06-30') and (date_dim.d_date >= '2002-05-01')) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------filter((customer_address.ca_state = 'OK')) +------------------------------------PhysicalOlapScan[customer_address] ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject ---------------------------------filter((web_site.web_company_name = 'pri')) -----------------------------------PhysicalOlapScan[web_site] +--------------------------------filter((date_dim.d_date <= '2002-06-30') and (date_dim.d_date >= '2002-05-01')) +----------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------PhysicalProject +------------------------------filter((web_site.web_company_name = 'pri')) +--------------------------------PhysicalOlapScan[web_site] 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 index c6f2d22db1..cdd54a29fe 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query95.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query95.out @@ -11,42 +11,41 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalProject ------------PhysicalOlapScan[web_sales] apply RFs: RF7 --PhysicalResultSink -----PhysicalTopN[MERGE_SORT] -------PhysicalTopN[LOCAL_SORT] ---------hashAgg[DISTINCT_GLOBAL] -----------PhysicalDistribute[DistributionSpecGather] -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF6 ws_order_number->[wr_order_number,ws_order_number] -----------------------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] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 RF6 ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 -----------------------PhysicalProject -------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF7 ws_order_number->[ws_order_number,ws_order_number] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------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[DistributionSpecReplicated] -------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_state = 'VA')) -----------------------------------------PhysicalOlapScan[customer_address] +----PhysicalTopN[GATHER_SORT] +------hashAgg[DISTINCT_GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------hashAgg[DISTINCT_LOCAL] +------------hashAgg[GLOBAL] +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF6 ws_order_number->[wr_order_number,ws_order_number] +--------------------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] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 RF6 +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +--------------------PhysicalProject +----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF7 ws_order_number->[ws_order_number,ws_order_number] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------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[DistributionSpecReplicated] ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_date <= '2001-05-31') and (date_dim.d_date >= '2001-04-01')) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------------------filter((customer_address.ca_state = 'VA')) +--------------------------------------PhysicalOlapScan[customer_address] ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((web_site.web_company_name = 'pri')) -------------------------------------PhysicalOlapScan[web_site] +----------------------------------filter((date_dim.d_date <= '2001-05-31') and (date_dim.d_date >= '2001-04-01')) +------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------PhysicalProject +--------------------------------filter((web_site.web_company_name = 'pri')) +----------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query96.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query96.out index 7dc3835f27..35b83c5a8d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query96.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query96.out @@ -1,28 +1,27 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_96 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[LOCAL] -------------PhysicalProject ---------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] -----------------------PhysicalProject -------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------PhysicalProject ---------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) -----------------------------PhysicalOlapScan[time_dim] +--PhysicalTopN[GATHER_SORT] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[LOCAL] +----------PhysicalProject +------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +--------------------PhysicalProject +----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 --------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject -------------------------filter((household_demographics.hd_dep_count = 0)) ---------------------------PhysicalOlapScan[household_demographics] -----------------PhysicalDistribute[DistributionSpecReplicated] -------------------PhysicalProject ---------------------filter((store.s_store_name = 'ese')) -----------------------PhysicalOlapScan[store] +------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) +--------------------------PhysicalOlapScan[time_dim] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------filter((household_demographics.hd_dep_count = 0)) +------------------------PhysicalOlapScan[household_demographics] +--------------PhysicalDistribute[DistributionSpecReplicated] +----------------PhysicalProject +------------------filter((store.s_store_name = 'ese')) +--------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query16.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query16.out index 2464c1efa3..54177b9d2b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query16.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query16.out @@ -1,39 +1,38 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_16 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] -------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[cs_ship_addr_sk] ---------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF1 cs_order_number->[cs_order_number] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF2 RF3 ---------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) ---------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute[DistributionSpecReplicated] +--PhysicalTopN[GATHER_SORT] +----hashAgg[DISTINCT_GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[DISTINCT_LOCAL] +----------hashAgg[GLOBAL] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[cs_ship_addr_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF1 cs_order_number->[cs_order_number] +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject -------------------------------filter((customer_address.ca_state = 'WV')) ---------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 +--------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF2 RF3 +------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +------------------------------------PhysicalOlapScan[date_dim] ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject -----------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) -------------------------------PhysicalOlapScan[call_center] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_returns] +----------------------------filter((customer_address.ca_state = 'WV')) +------------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) +----------------------------PhysicalOlapScan[call_center] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------PhysicalOlapScan[catalog_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query61.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query61.out index 8bbe7fab06..86e01ac4b2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query61.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query61.out @@ -1,80 +1,79 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_61 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalProject ---------NestedLoopJoin[CROSS_JOIN] +--PhysicalTopN[GATHER_SORT] +----PhysicalProject +------NestedLoopJoin[CROSS_JOIN] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecGather] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF10 s_store_sk->[ss_store_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF9 p_promo_sk->[ss_promo_sk] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[ss_item_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[c_current_addr_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] +--------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF7 RF8 RF9 RF10 +--------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[customer] apply RFs: RF6 +------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Jewelry')) +----------------------------------PhysicalOlapScan[item] +--------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------PhysicalProject +------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) +--------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) +----------------------------PhysicalOlapScan[promotion] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------filter((store.s_gmt_offset = -7.00)) +------------------------PhysicalOlapScan[store] +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF10 s_store_sk->[ss_store_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF9 p_promo_sk->[ss_promo_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[ss_item_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[c_current_addr_sk] ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF7 RF8 RF9 RF10 -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer] apply RFs: RF6 ---------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ---------------------------------------PhysicalOlapScan[customer_address] +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 RF3 RF4 +--------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((item.i_category = 'Jewelry')) -------------------------------------PhysicalOlapScan[item] +----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +------------------------------------PhysicalOlapScan[customer_address] ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) ----------------------------------PhysicalOlapScan[date_dim] ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject -----------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) -------------------------------PhysicalOlapScan[promotion] +----------------------------filter((store.s_gmt_offset = -7.00)) +------------------------------PhysicalOlapScan[store] --------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject -------------------------filter((store.s_gmt_offset = -7.00)) ---------------------------PhysicalOlapScan[store] -----------PhysicalDistribute[DistributionSpecReplicated] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecGather] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 RF3 RF4 -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 ---------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ---------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------PhysicalProject -----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) -------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------PhysicalProject -------------------------------filter((store.s_gmt_offset = -7.00)) ---------------------------------PhysicalOlapScan[store] -----------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------PhysicalProject ---------------------------filter((item.i_category = 'Jewelry')) -----------------------------PhysicalOlapScan[item] +------------------------filter((item.i_category = 'Jewelry')) +--------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query90.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query90.out index 0628931542..11141c8967 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query90.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query90.out @@ -1,23 +1,45 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_90 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalProject ---------NestedLoopJoin[CROSS_JOIN] +--PhysicalTopN[GATHER_SORT] +----PhysicalProject +------NestedLoopJoin[CROSS_JOIN] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecGather] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF5 wp_web_page_sk->[ws_web_page_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ws_ship_hdemo_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ws_sold_time_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalProject +----------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) +------------------------------PhysicalOlapScan[time_dim] +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter((household_demographics.hd_dep_count = 2)) +----------------------------PhysicalOlapScan[household_demographics] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +------------------------PhysicalOlapScan[web_page] +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF5 wp_web_page_sk->[ws_web_page_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 wp_web_page_sk->[ws_web_page_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ws_ship_hdemo_sk] -------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ws_sold_time_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ws_ship_hdemo_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ws_sold_time_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 +----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject -------------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) +------------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) --------------------------------PhysicalOlapScan[time_dim] ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject @@ -27,27 +49,4 @@ PhysicalResultSink ----------------------PhysicalProject ------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) --------------------------PhysicalOlapScan[web_page] -----------PhysicalDistribute[DistributionSpecReplicated] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecGather] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 wp_web_page_sk->[ws_web_page_sk] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ws_ship_hdemo_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ws_sold_time_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -----------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------PhysicalProject ---------------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) -----------------------------------PhysicalOlapScan[time_dim] ---------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------PhysicalProject -------------------------------filter((household_demographics.hd_dep_count = 2)) ---------------------------------PhysicalOlapScan[household_demographics] -----------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------PhysicalProject ---------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -----------------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query92.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query92.out index 03fe8c943d..403b892a03 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query92.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query92.out @@ -1,28 +1,27 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_92 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[LOCAL] -------------PhysicalProject ---------------filter((cast(ws_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(ws_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) -----------------PhysicalWindow -------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------PhysicalProject -----------------------------------filter((item.i_manufact_id = 320)) -------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute[DistributionSpecReplicated] +--PhysicalTopN[GATHER_SORT] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[LOCAL] +----------PhysicalProject +------------filter((cast(ws_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(ws_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) +--------------PhysicalWindow +----------------PhysicalQuickSort[LOCAL_SORT] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------filter((date_dim.d_date <= '2002-05-27') and (date_dim.d_date >= '2002-02-26')) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +----------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------PhysicalProject +--------------------------------filter((item.i_manufact_id = 320)) +----------------------------------PhysicalOlapScan[item] +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalProject +----------------------------filter((date_dim.d_date <= '2002-05-27') and (date_dim.d_date >= '2002-02-26')) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query94.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query94.out index 04c19bd17c..ebd583b693 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query94.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query94.out @@ -1,39 +1,38 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_94 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() ---------------------PhysicalProject -----------------------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[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF2 ws_order_number->[ws_order_number] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------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] -------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF3 ---------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'OK')) ---------------------------------------PhysicalOlapScan[customer_address] +--PhysicalTopN[GATHER_SORT] +----hashAgg[DISTINCT_GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[DISTINCT_LOCAL] +----------hashAgg[GLOBAL] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() +------------------PhysicalProject +--------------------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[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF2 ws_order_number->[ws_order_number] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------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] +----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF3 ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) -------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------PhysicalProject -----------------------------filter((web_site.web_company_name = 'pri')) -------------------------------PhysicalOlapScan[web_site] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------PhysicalOlapScan[web_returns] +----------------------------------filter((customer_address.ca_state = 'OK')) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) +----------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter((web_site.web_company_name = 'pri')) +----------------------------PhysicalOlapScan[web_site] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------PhysicalOlapScan[web_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out index 3cc3f5843b..d292313530 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query95.out @@ -11,42 +11,41 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalProject ------------PhysicalOlapScan[web_sales] apply RFs: RF7 --PhysicalResultSink -----PhysicalTopN[MERGE_SORT] -------PhysicalTopN[LOCAL_SORT] ---------hashAgg[DISTINCT_GLOBAL] -----------PhysicalDistribute[DistributionSpecGather] -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF6 ws_order_number->[ws_order_number] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF5 web_site_sk->[ws_web_site_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[ws_ship_addr_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_ship_date_sk] -------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF2 ws_order_number->[wr_order_number];RF7 ws_order_number->[ws_order_number,ws_order_number] +----PhysicalTopN[GATHER_SORT] +------hashAgg[DISTINCT_GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------hashAgg[DISTINCT_LOCAL] +------------hashAgg[GLOBAL] +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF6 ws_order_number->[ws_order_number] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF5 web_site_sk->[ws_web_site_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[ws_ship_addr_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_ship_date_sk] +----------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF2 ws_order_number->[wr_order_number];RF7 ws_order_number->[ws_order_number,ws_order_number] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() +----------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2 +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() -------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2 ---------------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 -------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject ---------------------------------filter((customer_address.ca_state = 'NC')) -----------------------------------PhysicalOlapScan[customer_address] +--------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject -------------------------------filter((web_site.web_company_name = 'pri')) ---------------------------------PhysicalOlapScan[web_site] +------------------------------filter((customer_address.ca_state = 'NC')) +--------------------------------PhysicalOlapScan[customer_address] +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalProject +----------------------------filter((web_site.web_company_name = 'pri')) +------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query96.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query96.out index 4f48a46df2..f1997791a7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query96.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query96.out @@ -1,28 +1,27 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_96 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[LOCAL] -------------PhysicalProject ---------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] -----------------------PhysicalProject -------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------PhysicalProject ---------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) -----------------------------PhysicalOlapScan[time_dim] +--PhysicalTopN[GATHER_SORT] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[LOCAL] +----------PhysicalProject +------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +--------------------PhysicalProject +----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 --------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject -------------------------filter((household_demographics.hd_dep_count = 3)) ---------------------------PhysicalOlapScan[household_demographics] -----------------PhysicalDistribute[DistributionSpecReplicated] -------------------PhysicalProject ---------------------filter((store.s_store_name = 'ese')) -----------------------PhysicalOlapScan[store] +------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) +--------------------------PhysicalOlapScan[time_dim] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------filter((household_demographics.hd_dep_count = 3)) +------------------------PhysicalOlapScan[household_demographics] +--------------PhysicalDistribute[DistributionSpecReplicated] +----------------PhysicalProject +------------------filter((store.s_store_name = 'ese')) +--------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query16.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query16.out index 2464c1efa3..54177b9d2b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query16.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query16.out @@ -1,39 +1,38 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_16 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] -------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[cs_ship_addr_sk] ---------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF1 cs_order_number->[cs_order_number] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF2 RF3 ---------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) ---------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute[DistributionSpecReplicated] +--PhysicalTopN[GATHER_SORT] +----hashAgg[DISTINCT_GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[DISTINCT_LOCAL] +----------hashAgg[GLOBAL] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[cs_ship_addr_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF1 cs_order_number->[cs_order_number] +--------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject -------------------------------filter((customer_address.ca_state = 'WV')) ---------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 +--------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF2 RF3 +------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------------PhysicalProject +----------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +------------------------------------PhysicalOlapScan[date_dim] ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject -----------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) -------------------------------PhysicalOlapScan[call_center] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_returns] +----------------------------filter((customer_address.ca_state = 'WV')) +------------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) +----------------------------PhysicalOlapScan[call_center] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------PhysicalOlapScan[catalog_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query61.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query61.out index 8bbe7fab06..86e01ac4b2 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query61.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query61.out @@ -1,80 +1,79 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_61 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalProject ---------NestedLoopJoin[CROSS_JOIN] +--PhysicalTopN[GATHER_SORT] +----PhysicalProject +------NestedLoopJoin[CROSS_JOIN] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecGather] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF10 s_store_sk->[ss_store_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF9 p_promo_sk->[ss_promo_sk] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[ss_item_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[c_current_addr_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] +--------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF7 RF8 RF9 RF10 +--------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[customer] apply RFs: RF6 +------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Jewelry')) +----------------------------------PhysicalOlapScan[item] +--------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------PhysicalProject +------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) +--------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) +----------------------------PhysicalOlapScan[promotion] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------filter((store.s_gmt_offset = -7.00)) +------------------------PhysicalOlapScan[store] +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF10 s_store_sk->[ss_store_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF9 p_promo_sk->[ss_promo_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[ss_item_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[c_current_addr_sk] ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF7 RF8 RF9 RF10 -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer] apply RFs: RF6 ---------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] +--------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ---------------------------------------PhysicalOlapScan[customer_address] +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 RF3 RF4 +--------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((item.i_category = 'Jewelry')) -------------------------------------PhysicalOlapScan[item] +----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +------------------------------------PhysicalOlapScan[customer_address] ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) ----------------------------------PhysicalOlapScan[date_dim] ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject -----------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) -------------------------------PhysicalOlapScan[promotion] +----------------------------filter((store.s_gmt_offset = -7.00)) +------------------------------PhysicalOlapScan[store] --------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject -------------------------filter((store.s_gmt_offset = -7.00)) ---------------------------PhysicalOlapScan[store] -----------PhysicalDistribute[DistributionSpecReplicated] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecGather] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] ---------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 RF3 RF4 -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 ---------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ---------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------PhysicalProject -----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) -------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------PhysicalProject -------------------------------filter((store.s_gmt_offset = -7.00)) ---------------------------------PhysicalOlapScan[store] -----------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------PhysicalProject ---------------------------filter((item.i_category = 'Jewelry')) -----------------------------PhysicalOlapScan[item] +------------------------filter((item.i_category = 'Jewelry')) +--------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query90.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query90.out index 0628931542..11141c8967 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query90.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query90.out @@ -1,23 +1,45 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_90 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalProject ---------NestedLoopJoin[CROSS_JOIN] +--PhysicalTopN[GATHER_SORT] +----PhysicalProject +------NestedLoopJoin[CROSS_JOIN] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecGather] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF5 wp_web_page_sk->[ws_web_page_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ws_ship_hdemo_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ws_sold_time_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalProject +----------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) +------------------------------PhysicalOlapScan[time_dim] +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter((household_demographics.hd_dep_count = 2)) +----------------------------PhysicalOlapScan[household_demographics] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +------------------------PhysicalOlapScan[web_page] +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF5 wp_web_page_sk->[ws_web_page_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 wp_web_page_sk->[ws_web_page_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ws_ship_hdemo_sk] -------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ws_sold_time_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ws_ship_hdemo_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ws_sold_time_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 +----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject -------------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) +------------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) --------------------------------PhysicalOlapScan[time_dim] ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject @@ -27,27 +49,4 @@ PhysicalResultSink ----------------------PhysicalProject ------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) --------------------------PhysicalOlapScan[web_page] -----------PhysicalDistribute[DistributionSpecReplicated] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecGather] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 wp_web_page_sk->[ws_web_page_sk] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ws_ship_hdemo_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ws_sold_time_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -----------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------PhysicalProject ---------------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) -----------------------------------PhysicalOlapScan[time_dim] ---------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------PhysicalProject -------------------------------filter((household_demographics.hd_dep_count = 2)) ---------------------------------PhysicalOlapScan[household_demographics] -----------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------PhysicalProject ---------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -----------------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query92.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query92.out index 03fe8c943d..403b892a03 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query92.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query92.out @@ -1,28 +1,27 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_92 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[LOCAL] -------------PhysicalProject ---------------filter((cast(ws_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(ws_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) -----------------PhysicalWindow -------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------PhysicalProject -----------------------------------filter((item.i_manufact_id = 320)) -------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute[DistributionSpecReplicated] +--PhysicalTopN[GATHER_SORT] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[LOCAL] +----------PhysicalProject +------------filter((cast(ws_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(ws_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) +--------------PhysicalWindow +----------------PhysicalQuickSort[LOCAL_SORT] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------filter((date_dim.d_date <= '2002-05-27') and (date_dim.d_date >= '2002-02-26')) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +----------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------PhysicalProject +--------------------------------filter((item.i_manufact_id = 320)) +----------------------------------PhysicalOlapScan[item] +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalProject +----------------------------filter((date_dim.d_date <= '2002-05-27') and (date_dim.d_date >= '2002-02-26')) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query94.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query94.out index 04c19bd17c..ebd583b693 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query94.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query94.out @@ -1,39 +1,38 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_94 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() ---------------------PhysicalProject -----------------------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[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF2 ws_order_number->[ws_order_number] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------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] -------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF3 ---------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'OK')) ---------------------------------------PhysicalOlapScan[customer_address] +--PhysicalTopN[GATHER_SORT] +----hashAgg[DISTINCT_GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[DISTINCT_LOCAL] +----------hashAgg[GLOBAL] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() +------------------PhysicalProject +--------------------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[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF2 ws_order_number->[ws_order_number] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------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] +----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF3 ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) -------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------PhysicalProject -----------------------------filter((web_site.web_company_name = 'pri')) -------------------------------PhysicalOlapScan[web_site] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------PhysicalOlapScan[web_returns] +----------------------------------filter((customer_address.ca_state = 'OK')) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) +----------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter((web_site.web_company_name = 'pri')) +----------------------------PhysicalOlapScan[web_site] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------PhysicalOlapScan[web_returns] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out index 4fd762ec99..685e2c0df3 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query95.out @@ -11,42 +11,41 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalProject ------------PhysicalOlapScan[web_sales] apply RFs: RF14 RF15 --PhysicalResultSink -----PhysicalTopN[MERGE_SORT] -------PhysicalTopN[LOCAL_SORT] ---------hashAgg[DISTINCT_GLOBAL] -----------PhysicalDistribute[DistributionSpecGather] -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF12 ws_order_number->[ws_order_number];RF13 ws_order_number->[ws_order_number] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF12 RF13 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF10 web_site_sk->[ws_web_site_sk];RF11 web_site_sk->[ws_web_site_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF8 ca_address_sk->[ws_ship_addr_sk];RF9 ca_address_sk->[ws_ship_addr_sk] -----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ws_ship_date_sk];RF7 d_date_sk->[ws_ship_date_sk] -------------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[wr_order_number];RF5 ws_order_number->[wr_order_number];RF14 ws_order_number->[ws_order_number,ws_order_number];RF15 ws_order_number->[ws_order_number,ws_order_number] +----PhysicalTopN[GATHER_SORT] +------hashAgg[DISTINCT_GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------hashAgg[DISTINCT_LOCAL] +------------hashAgg[GLOBAL] +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF12 ws_order_number->[ws_order_number];RF13 ws_order_number->[ws_order_number] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF12 RF13 +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF10 web_site_sk->[ws_web_site_sk];RF11 web_site_sk->[ws_web_site_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF8 ca_address_sk->[ws_ship_addr_sk];RF9 ca_address_sk->[ws_ship_addr_sk] +--------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ws_ship_date_sk];RF7 d_date_sk->[ws_ship_date_sk] +----------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[wr_order_number];RF5 ws_order_number->[wr_order_number];RF14 ws_order_number->[ws_order_number,ws_order_number];RF15 ws_order_number->[ws_order_number,ws_order_number] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF2 wr_order_number->[ws_order_number];RF3 wr_order_number->[ws_order_number] +----------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 RF3 +----------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 RF5 +------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF2 wr_order_number->[ws_order_number];RF3 wr_order_number->[ws_order_number] -------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 RF3 -------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 RF5 ---------------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 RF8 RF9 RF10 RF11 -------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 RF8 RF9 RF10 RF11 ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject ---------------------------------filter((customer_address.ca_state = 'NC')) -----------------------------------PhysicalOlapScan[customer_address] +--------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject -------------------------------filter((web_site.web_company_name = 'pri')) ---------------------------------PhysicalOlapScan[web_site] +------------------------------filter((customer_address.ca_state = 'NC')) +--------------------------------PhysicalOlapScan[customer_address] +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------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/query96.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query96.out index 4f48a46df2..f1997791a7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query96.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query96.out @@ -1,28 +1,27 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_96 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[LOCAL] -------------PhysicalProject ---------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] -----------------------PhysicalProject -------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------PhysicalProject ---------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) -----------------------------PhysicalOlapScan[time_dim] +--PhysicalTopN[GATHER_SORT] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[LOCAL] +----------PhysicalProject +------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +--------------------PhysicalProject +----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 --------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject -------------------------filter((household_demographics.hd_dep_count = 3)) ---------------------------PhysicalOlapScan[household_demographics] -----------------PhysicalDistribute[DistributionSpecReplicated] -------------------PhysicalProject ---------------------filter((store.s_store_name = 'ese')) -----------------------PhysicalOlapScan[store] +------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) +--------------------------PhysicalOlapScan[time_dim] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------filter((household_demographics.hd_dep_count = 3)) +------------------------PhysicalOlapScan[household_demographics] +--------------PhysicalDistribute[DistributionSpecReplicated] +----------------PhysicalProject +------------------filter((store.s_store_name = 'ese')) +--------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query16.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query16.out index c867983673..926866a07b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query16.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query16.out @@ -1,39 +1,38 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_16 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 +--PhysicalTopN[GATHER_SORT] +----hashAgg[DISTINCT_GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[DISTINCT_LOCAL] +----------hashAgg[GLOBAL] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] -------------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 ---------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'WV')) ---------------------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] +----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) -------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------PhysicalProject -----------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) -------------------------------PhysicalOlapScan[call_center] +----------------------------------filter((customer_address.ca_state = 'WV')) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +----------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) +----------------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query61.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query61.out index ba60aeda3f..8396f36855 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query61.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query61.out @@ -1,79 +1,78 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_61 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalProject ---------NestedLoopJoin[CROSS_JOIN] +--PhysicalTopN[GATHER_SORT] +----PhysicalProject +------NestedLoopJoin[CROSS_JOIN] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecGather] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk] +------------------PhysicalProject +--------------------filter((customer_address.ca_gmt_offset = -7.00)) +----------------------PhysicalOlapScan[customer_address] apply RFs: RF10 +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF9 ss_customer_sk->[c_customer_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[customer] apply RFs: RF9 +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF8 ss_item_sk->[i_item_sk] +----------------------------PhysicalProject +------------------------------filter((item.i_category = 'Jewelry')) +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 ss_promo_sk->[p_promo_sk] +----------------------------------PhysicalProject +------------------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) +--------------------------------------PhysicalOlapScan[promotion] apply RFs: RF7 +----------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 ss_sold_date_sk->[d_date_sk] +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) +------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF6 +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------------------------PhysicalProject +------------------------------------------------filter((store.s_gmt_offset = -7.00)) +--------------------------------------------------PhysicalOlapScan[store] +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF4 c_current_addr_sk->[ca_address_sk] --------------------PhysicalProject ----------------------filter((customer_address.ca_gmt_offset = -7.00)) -------------------------PhysicalOlapScan[customer_address] apply RFs: RF10 +------------------------PhysicalOlapScan[customer_address] apply RFs: RF4 --------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF9 ss_customer_sk->[c_customer_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 ss_item_sk->[i_item_sk] +------------------------PhysicalProject +--------------------------filter((item.i_category = 'Jewelry')) +----------------------------PhysicalOlapScan[item] apply RFs: RF3 +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF9 ---------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF8 ss_item_sk->[i_item_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 ss_sold_date_sk->[d_date_sk] ------------------------------PhysicalProject ---------------------------------filter((item.i_category = 'Jewelry')) -----------------------------------PhysicalOlapScan[item] apply RFs: RF8 -------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 ss_promo_sk->[p_promo_sk] +--------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF2 +------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 ss_customer_sk->[c_customer_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject ---------------------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) -----------------------------------------PhysicalOlapScan[promotion] apply RFs: RF7 -------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 ss_sold_date_sk->[d_date_sk] +--------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] ----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) ---------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF6 +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject ---------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] -----------------------------------------------PhysicalProject -------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 -----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------------------PhysicalProject ---------------------------------------------------filter((store.s_gmt_offset = -7.00)) -----------------------------------------------------PhysicalOlapScan[store] -----------PhysicalDistribute[DistributionSpecReplicated] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecGather] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF4 c_current_addr_sk->[ca_address_sk] -----------------------PhysicalProject -------------------------filter((customer_address.ca_gmt_offset = -7.00)) ---------------------------PhysicalOlapScan[customer_address] apply RFs: RF4 -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 ss_item_sk->[i_item_sk] ---------------------------PhysicalProject -----------------------------filter((item.i_category = 'Jewelry')) -------------------------------PhysicalOlapScan[item] apply RFs: RF3 ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 ss_sold_date_sk->[d_date_sk] ---------------------------------PhysicalProject -----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) -------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF2 ---------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 ss_customer_sk->[c_customer_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 -------------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------------------PhysicalProject -----------------------------------------------filter((store.s_gmt_offset = -7.00)) -------------------------------------------------PhysicalOlapScan[store] +--------------------------------------------filter((store.s_gmt_offset = -7.00)) +----------------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query90.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query90.out index b74a499038..dbd4355ed7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query90.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query90.out @@ -1,53 +1,52 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_90 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalProject ---------NestedLoopJoin[CROSS_JOIN] +--PhysicalTopN[GATHER_SORT] +----PhysicalProject +------NestedLoopJoin[CROSS_JOIN] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecGather] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[ws_ship_hdemo_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ws_sold_time_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF3 wp_web_page_sk->[ws_web_page_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalProject +----------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +------------------------------PhysicalOlapScan[web_page] +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) +----------------------------PhysicalOlapScan[time_dim] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------filter((household_demographics.hd_dep_count = 2)) +------------------------PhysicalOlapScan[household_demographics] +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[ws_ship_hdemo_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ws_ship_hdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ws_sold_time_sk] -------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF3 wp_web_page_sk->[ws_web_page_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ws_sold_time_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF0 wp_web_page_sk->[ws_web_page_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 +----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) --------------------------------PhysicalOlapScan[web_page] ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) +----------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) ------------------------------PhysicalOlapScan[time_dim] --------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((household_demographics.hd_dep_count = 2)) --------------------------PhysicalOlapScan[household_demographics] -----------PhysicalDistribute[DistributionSpecReplicated] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecGather] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ws_ship_hdemo_sk] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ws_sold_time_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF0 wp_web_page_sk->[ws_web_page_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -----------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------PhysicalProject ---------------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -----------------------------------PhysicalOlapScan[web_page] ---------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------PhysicalProject -------------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) ---------------------------------PhysicalOlapScan[time_dim] -----------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------PhysicalProject ---------------------------filter((household_demographics.hd_dep_count = 2)) -----------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query92.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query92.out index 03fe8c943d..403b892a03 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query92.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query92.out @@ -1,28 +1,27 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_92 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[LOCAL] -------------PhysicalProject ---------------filter((cast(ws_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(ws_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) -----------------PhysicalWindow -------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------PhysicalProject -----------------------------------filter((item.i_manufact_id = 320)) -------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute[DistributionSpecReplicated] +--PhysicalTopN[GATHER_SORT] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[LOCAL] +----------PhysicalProject +------------filter((cast(ws_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(ws_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) +--------------PhysicalWindow +----------------PhysicalQuickSort[LOCAL_SORT] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------filter((date_dim.d_date <= '2002-05-27') and (date_dim.d_date >= '2002-02-26')) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +----------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------PhysicalProject +--------------------------------filter((item.i_manufact_id = 320)) +----------------------------------PhysicalOlapScan[item] +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalProject +----------------------------filter((date_dim.d_date <= '2002-05-27') and (date_dim.d_date >= '2002-02-26')) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query94.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query94.out index c2b1f42cc8..57ddcdd5d7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query94.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query94.out @@ -1,39 +1,38 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_94 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 +--PhysicalTopN[GATHER_SORT] +----hashAgg[DISTINCT_GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[DISTINCT_LOCAL] +----------hashAgg[GLOBAL] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject -----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_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] -------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 ---------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'OK')) ---------------------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalOlapScan[web_sales] apply RFs: RF4 +------------------PhysicalProject +--------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_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] +----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------filter((customer_address.ca_state = 'OK')) +------------------------------------PhysicalOlapScan[customer_address] ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject ---------------------------------filter((web_site.web_company_name = 'pri')) -----------------------------------PhysicalOlapScan[web_site] +--------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) +----------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------PhysicalProject +------------------------------filter((web_site.web_company_name = 'pri')) +--------------------------------PhysicalOlapScan[web_site] 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 index 2a0ae9b413..b5a8000d83 100644 --- 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 @@ -11,42 +11,41 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalProject ------------PhysicalOlapScan[web_sales] apply RFs: RF7 --PhysicalResultSink -----PhysicalTopN[MERGE_SORT] -------PhysicalTopN[LOCAL_SORT] ---------hashAgg[DISTINCT_GLOBAL] -----------PhysicalDistribute[DistributionSpecGather] -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF6 ws_order_number->[wr_order_number,ws_order_number] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 -----------------------PhysicalProject -------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF7 ws_order_number->[ws_order_number,ws_order_number] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------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[DistributionSpecReplicated] -------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_state = 'NC')) -----------------------------------------PhysicalOlapScan[customer_address] +----PhysicalTopN[GATHER_SORT] +------hashAgg[DISTINCT_GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------hashAgg[DISTINCT_LOCAL] +------------hashAgg[GLOBAL] +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF6 ws_order_number->[wr_order_number,ws_order_number] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +--------------------PhysicalProject +----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF7 ws_order_number->[ws_order_number,ws_order_number] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------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[DistributionSpecReplicated] ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------------------filter((customer_address.ca_state = 'NC')) +--------------------------------------PhysicalOlapScan[customer_address] ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((web_site.web_company_name = 'pri')) -------------------------------------PhysicalOlapScan[web_site] +----------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) +------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------PhysicalProject +--------------------------------filter((web_site.web_company_name = 'pri')) +----------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query96.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query96.out index 4f48a46df2..f1997791a7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query96.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query96.out @@ -1,28 +1,27 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_96 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[LOCAL] -------------PhysicalProject ---------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] -----------------------PhysicalProject -------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------PhysicalProject ---------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) -----------------------------PhysicalOlapScan[time_dim] +--PhysicalTopN[GATHER_SORT] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[LOCAL] +----------PhysicalProject +------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +--------------------PhysicalProject +----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 --------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject -------------------------filter((household_demographics.hd_dep_count = 3)) ---------------------------PhysicalOlapScan[household_demographics] -----------------PhysicalDistribute[DistributionSpecReplicated] -------------------PhysicalProject ---------------------filter((store.s_store_name = 'ese')) -----------------------PhysicalOlapScan[store] +------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) +--------------------------PhysicalOlapScan[time_dim] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------filter((household_demographics.hd_dep_count = 3)) +------------------------PhysicalOlapScan[household_demographics] +--------------PhysicalDistribute[DistributionSpecReplicated] +----------------PhysicalProject +------------------filter((store.s_store_name = 'ese')) +--------------------PhysicalOlapScan[store] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query16.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query16.out index c867983673..926866a07b 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query16.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query16.out @@ -1,39 +1,38 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_16 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 +--PhysicalTopN[GATHER_SORT] +----hashAgg[DISTINCT_GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[DISTINCT_LOCAL] +----------hashAgg[GLOBAL] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] -------------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 ---------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'WV')) ---------------------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] +----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) -------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------PhysicalProject -----------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) -------------------------------PhysicalOlapScan[call_center] +----------------------------------filter((customer_address.ca_state = 'WV')) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +----------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) +----------------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query61.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query61.out index ba60aeda3f..8396f36855 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query61.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query61.out @@ -1,79 +1,78 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_61 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalProject ---------NestedLoopJoin[CROSS_JOIN] +--PhysicalTopN[GATHER_SORT] +----PhysicalProject +------NestedLoopJoin[CROSS_JOIN] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecGather] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk] +------------------PhysicalProject +--------------------filter((customer_address.ca_gmt_offset = -7.00)) +----------------------PhysicalOlapScan[customer_address] apply RFs: RF10 +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF9 ss_customer_sk->[c_customer_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[customer] apply RFs: RF9 +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF8 ss_item_sk->[i_item_sk] +----------------------------PhysicalProject +------------------------------filter((item.i_category = 'Jewelry')) +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 ss_promo_sk->[p_promo_sk] +----------------------------------PhysicalProject +------------------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) +--------------------------------------PhysicalOlapScan[promotion] apply RFs: RF7 +----------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 ss_sold_date_sk->[d_date_sk] +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) +------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF6 +--------------------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------------------------PhysicalProject +------------------------------------------------filter((store.s_gmt_offset = -7.00)) +--------------------------------------------------PhysicalOlapScan[store] +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF4 c_current_addr_sk->[ca_address_sk] --------------------PhysicalProject ----------------------filter((customer_address.ca_gmt_offset = -7.00)) -------------------------PhysicalOlapScan[customer_address] apply RFs: RF10 +------------------------PhysicalOlapScan[customer_address] apply RFs: RF4 --------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF9 ss_customer_sk->[c_customer_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 ss_item_sk->[i_item_sk] +------------------------PhysicalProject +--------------------------filter((item.i_category = 'Jewelry')) +----------------------------PhysicalOlapScan[item] apply RFs: RF3 +------------------------PhysicalDistribute[DistributionSpecHash] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF9 ---------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF8 ss_item_sk->[i_item_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 ss_sold_date_sk->[d_date_sk] ------------------------------PhysicalProject ---------------------------------filter((item.i_category = 'Jewelry')) -----------------------------------PhysicalOlapScan[item] apply RFs: RF8 -------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 ss_promo_sk->[p_promo_sk] +--------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF2 +------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 ss_customer_sk->[c_customer_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 +----------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------PhysicalProject ---------------------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y'))) -----------------------------------------PhysicalOlapScan[promotion] apply RFs: RF7 -------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 ss_sold_date_sk->[d_date_sk] +--------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] ----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) ---------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF6 +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ----------------------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------------------PhysicalProject ---------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] -----------------------------------------------PhysicalProject -------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 -----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------------------PhysicalProject ---------------------------------------------------filter((store.s_gmt_offset = -7.00)) -----------------------------------------------------PhysicalOlapScan[store] -----------PhysicalDistribute[DistributionSpecReplicated] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecGather] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF4 c_current_addr_sk->[ca_address_sk] -----------------------PhysicalProject -------------------------filter((customer_address.ca_gmt_offset = -7.00)) ---------------------------PhysicalOlapScan[customer_address] apply RFs: RF4 -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 ss_item_sk->[i_item_sk] ---------------------------PhysicalProject -----------------------------filter((item.i_category = 'Jewelry')) -------------------------------PhysicalOlapScan[item] apply RFs: RF3 ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 ss_sold_date_sk->[d_date_sk] ---------------------------------PhysicalProject -----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) -------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF2 ---------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 ss_customer_sk->[c_customer_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 -------------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------------------PhysicalProject -----------------------------------------------filter((store.s_gmt_offset = -7.00)) -------------------------------------------------PhysicalOlapScan[store] +--------------------------------------------filter((store.s_gmt_offset = -7.00)) +----------------------------------------------PhysicalOlapScan[store] 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 b74a499038..dbd4355ed7 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 @@ -1,53 +1,52 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_90 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------PhysicalProject ---------NestedLoopJoin[CROSS_JOIN] +--PhysicalTopN[GATHER_SORT] +----PhysicalProject +------NestedLoopJoin[CROSS_JOIN] +--------hashAgg[GLOBAL] +----------PhysicalDistribute[DistributionSpecGather] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[ws_ship_hdemo_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ws_sold_time_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF3 wp_web_page_sk->[ws_web_page_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalProject +----------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) +------------------------------PhysicalOlapScan[web_page] +----------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------PhysicalProject +--------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) +----------------------------PhysicalOlapScan[time_dim] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------filter((household_demographics.hd_dep_count = 2)) +------------------------PhysicalOlapScan[household_demographics] +--------PhysicalDistribute[DistributionSpecReplicated] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[ws_ship_hdemo_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ws_ship_hdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ws_sold_time_sk] -------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF3 wp_web_page_sk->[ws_web_page_sk] +----------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ws_sold_time_sk] +------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF0 wp_web_page_sk->[ws_web_page_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 +----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 --------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------PhysicalProject ------------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) --------------------------------PhysicalOlapScan[web_page] ------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) +----------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) ------------------------------PhysicalOlapScan[time_dim] --------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject ------------------------filter((household_demographics.hd_dep_count = 2)) --------------------------PhysicalOlapScan[household_demographics] -----------PhysicalDistribute[DistributionSpecReplicated] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecGather] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ws_ship_hdemo_sk] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ws_sold_time_sk] ---------------------------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF0 wp_web_page_sk->[ws_web_page_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -----------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------PhysicalProject ---------------------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) -----------------------------------PhysicalOlapScan[web_page] ---------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------PhysicalProject -------------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) ---------------------------------PhysicalOlapScan[time_dim] -----------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------PhysicalProject ---------------------------filter((household_demographics.hd_dep_count = 2)) -----------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query92.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query92.out index 03fe8c943d..403b892a03 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query92.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query92.out @@ -1,28 +1,27 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_92 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[LOCAL] -------------PhysicalProject ---------------filter((cast(ws_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(ws_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) -----------------PhysicalWindow -------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------PhysicalProject -----------------------------------filter((item.i_manufact_id = 320)) -------------------------------------PhysicalOlapScan[item] ---------------------------PhysicalDistribute[DistributionSpecReplicated] +--PhysicalTopN[GATHER_SORT] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[LOCAL] +----------PhysicalProject +------------filter((cast(ws_ext_discount_amt as DECIMALV3(38, 5)) > (1.3 * avg(cast(ws_ext_discount_amt as DECIMALV3(9, 4))) OVER(PARTITION BY i_item_sk)))) +--------------PhysicalWindow +----------------PhysicalQuickSort[LOCAL_SORT] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------filter((date_dim.d_date <= '2002-05-27') and (date_dim.d_date >= '2002-02-26')) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +----------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------PhysicalProject +--------------------------------filter((item.i_manufact_id = 320)) +----------------------------------PhysicalOlapScan[item] +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalProject +----------------------------filter((date_dim.d_date <= '2002-05-27') and (date_dim.d_date >= '2002-02-26')) +------------------------------PhysicalOlapScan[date_dim] 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 c2b1f42cc8..57ddcdd5d7 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 @@ -1,39 +1,38 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_94 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[DISTINCT_GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 +--PhysicalTopN[GATHER_SORT] +----hashAgg[DISTINCT_GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[DISTINCT_LOCAL] +----------hashAgg[GLOBAL] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] +------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject -----------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_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] -------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 ---------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'OK')) ---------------------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalOlapScan[web_sales] apply RFs: RF4 +------------------PhysicalProject +--------------------hashJoin[RIGHT_ANTI_JOIN] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_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] +----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------filter((customer_address.ca_state = 'OK')) +------------------------------------PhysicalOlapScan[customer_address] ----------------------------PhysicalDistribute[DistributionSpecReplicated] ------------------------------PhysicalProject ---------------------------------filter((web_site.web_company_name = 'pri')) -----------------------------------PhysicalOlapScan[web_site] +--------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) +----------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------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 9a971d30ae..09fc4b4d5a 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 @@ -11,42 +11,41 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalProject ------------PhysicalOlapScan[web_sales] apply RFs: RF14 RF15 --PhysicalResultSink -----PhysicalTopN[MERGE_SORT] -------PhysicalTopN[LOCAL_SORT] ---------hashAgg[DISTINCT_GLOBAL] -----------PhysicalDistribute[DistributionSpecGather] -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF12 ws_order_number->[wr_order_number,ws_order_number];RF13 ws_order_number->[wr_order_number,ws_order_number] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF10 wr_order_number->[ws_order_number];RF11 wr_order_number->[ws_order_number] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF10 RF11 RF12 RF13 ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_returns] apply RFs: RF12 RF13 -----------------------PhysicalProject -------------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF14 ws_order_number->[ws_order_number,ws_order_number];RF15 ws_order_number->[ws_order_number,ws_order_number] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF6 web_site_sk->[ws_web_site_sk];RF7 web_site_sk->[ws_web_site_sk] -------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_ship_date_sk];RF5 d_date_sk->[ws_ship_date_sk] ---------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk];RF3 ca_address_sk->[ws_ship_addr_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 RF4 RF5 RF6 RF7 -----------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_state = 'NC')) -----------------------------------------PhysicalOlapScan[customer_address] +----PhysicalTopN[GATHER_SORT] +------hashAgg[DISTINCT_GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------hashAgg[DISTINCT_LOCAL] +------------hashAgg[GLOBAL] +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF12 ws_order_number->[wr_order_number,ws_order_number];RF13 ws_order_number->[wr_order_number,ws_order_number] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF10 wr_order_number->[ws_order_number];RF11 wr_order_number->[ws_order_number] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF10 RF11 RF12 RF13 +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[web_returns] apply RFs: RF12 RF13 +--------------------PhysicalProject +----------------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF14 ws_order_number->[ws_order_number,ws_order_number];RF15 ws_order_number->[ws_order_number,ws_order_number] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF6 web_site_sk->[ws_web_site_sk];RF7 web_site_sk->[ws_web_site_sk] +----------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_ship_date_sk];RF5 d_date_sk->[ws_ship_date_sk] +------------------------------hashJoin[INNER_JOIN] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk];RF3 ca_address_sk->[ws_ship_addr_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 RF4 RF5 RF6 RF7 --------------------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------------------filter((customer_address.ca_state = 'NC')) +--------------------------------------PhysicalOlapScan[customer_address] ------------------------------PhysicalDistribute[DistributionSpecReplicated] --------------------------------PhysicalProject -----------------------------------filter((web_site.web_company_name = 'pri')) -------------------------------------PhysicalOlapScan[web_site] +----------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) +------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------PhysicalProject +--------------------------------filter((web_site.web_company_name = 'pri')) +----------------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query96.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query96.out index 4f48a46df2..f1997791a7 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query96.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query96.out @@ -1,28 +1,27 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_96 -- PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[LOCAL] -------------PhysicalProject ---------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] ---------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] -----------------------PhysicalProject -------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 -----------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------PhysicalProject ---------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) -----------------------------PhysicalOlapScan[time_dim] +--PhysicalTopN[GATHER_SORT] +----hashAgg[GLOBAL] +------PhysicalDistribute[DistributionSpecGather] +--------hashAgg[LOCAL] +----------PhysicalProject +------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +--------------------PhysicalProject +----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 --------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject -------------------------filter((household_demographics.hd_dep_count = 3)) ---------------------------PhysicalOlapScan[household_demographics] -----------------PhysicalDistribute[DistributionSpecReplicated] -------------------PhysicalProject ---------------------filter((store.s_store_name = 'ese')) -----------------------PhysicalOlapScan[store] +------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) +--------------------------PhysicalOlapScan[time_dim] +------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------PhysicalProject +----------------------filter((household_demographics.hd_dep_count = 3)) +------------------------PhysicalOlapScan[household_demographics] +--------------PhysicalDistribute[DistributionSpecReplicated] +----------------PhysicalProject +------------------filter((store.s_store_name = 'ese')) +--------------------PhysicalOlapScan[store]