diff --git a/regression-test/data/nereids_hint_tpcds_p0/shape/query49.out b/regression-test/data/nereids_hint_tpcds_p0/shape/query49.out index 2042698b5baf514..049344f4ebca69a 100644 --- a/regression-test/data/nereids_hint_tpcds_p0/shape/query49.out +++ b/regression-test/data/nereids_hint_tpcds_p0/shape/query49.out @@ -5,87 +5,104 @@ PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] -----------PhysicalProject -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[LOCAL] -------------------PhysicalUnion ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) -----------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) -----------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) -----------------------------------------------------------PhysicalOlapScan[date_dim] +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecHash] +--------------hashAgg[LOCAL] +----------------PhysicalUnion +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query49.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query49.out index 2042698b5baf514..049344f4ebca69a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query49.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query49.out @@ -5,87 +5,104 @@ PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] -----------PhysicalProject -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[LOCAL] -------------------PhysicalUnion ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) -----------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) -----------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) -----------------------------------------------------------PhysicalOlapScan[date_dim] +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecHash] +--------------hashAgg[LOCAL] +----------------PhysicalUnion +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query49.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query49.out index 83259727b845b62..aad565578e4fb86 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query49.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query49.out @@ -5,87 +5,104 @@ PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] -----------PhysicalProject -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[LOCAL] -------------------PhysicalUnion ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -----------------------------------------------------------PhysicalOlapScan[web_returns] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -----------------------------------------------------------PhysicalOlapScan[catalog_returns] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -----------------------------------------------------------PhysicalOlapScan[store_returns] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------PhysicalOlapScan[date_dim] +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecHash] +--------------hashAgg[LOCAL] +----------------PhysicalUnion +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) +--------------------------------------------------------------------PhysicalOlapScan[web_returns] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +----------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_returns] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +----------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) +--------------------------------------------------------------------PhysicalOlapScan[store_returns] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +----------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query49.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query49.out index 83259727b845b62..aad565578e4fb86 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query49.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query49.out @@ -5,87 +5,104 @@ PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] -----------PhysicalProject -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[LOCAL] -------------------PhysicalUnion ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -----------------------------------------------------------PhysicalOlapScan[web_returns] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -----------------------------------------------------------PhysicalOlapScan[catalog_returns] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -----------------------------------------------------------PhysicalOlapScan[store_returns] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------PhysicalOlapScan[date_dim] +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecHash] +--------------hashAgg[LOCAL] +----------------PhysicalUnion +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) +--------------------------------------------------------------------PhysicalOlapScan[web_returns] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +----------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_returns] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +----------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) +--------------------------------------------------------------------PhysicalOlapScan[store_returns] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +----------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query49.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query49.out index 90cf1cf013b3d71..383a8771e454905 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query49.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query49.out @@ -5,87 +5,104 @@ PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] -----------PhysicalProject -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[LOCAL] -------------------PhysicalUnion ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -----------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -----------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -----------------------------------------------------------PhysicalOlapScan[date_dim] +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecHash] +--------------hashAgg[LOCAL] +----------------PhysicalUnion +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query49.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query49.out index 90cf1cf013b3d71..383a8771e454905 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query49.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query49.out @@ -5,87 +5,104 @@ PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] -----------PhysicalProject -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[LOCAL] -------------------PhysicalUnion ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -----------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -----------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -----------------------------------------------------------PhysicalOlapScan[date_dim] +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecHash] +--------------hashAgg[LOCAL] +----------------PhysicalUnion +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/nereids_tpcds_shape_sf10t_orc/shape/query49.out b/regression-test/data/nereids_tpcds_shape_sf10t_orc/shape/query49.out index 7a451dcaeecd39b..64d926a9a88282a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf10t_orc/shape/query49.out +++ b/regression-test/data/nereids_tpcds_shape_sf10t_orc/shape/query49.out @@ -5,87 +5,104 @@ PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] -----------PhysicalProject -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[LOCAL] -------------------PhysicalUnion ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -----------------------------------------------------------PhysicalOlapScan[web_returns] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) -------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -----------------------------------------------------------PhysicalOlapScan[catalog_returns] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) -------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -----------------------------------------------------------PhysicalOlapScan[store_returns] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) -------------------------------------------------------PhysicalOlapScan[date_dim] +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecHash] +--------------hashAgg[LOCAL] +----------------PhysicalUnion +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) +--------------------------------------------------------------------PhysicalOlapScan[web_returns] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) +----------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_returns] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) +----------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) +--------------------------------------------------------------------PhysicalOlapScan[store_returns] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) +----------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query49.out b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query49.out index 83259727b845b62..aad565578e4fb86 100644 --- a/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query49.out +++ b/regression-test/data/new_shapes_p0/tpcds_sf100/noStatsRfPrune/query49.out @@ -5,87 +5,104 @@ PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] -----------PhysicalProject -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[LOCAL] -------------------PhysicalUnion ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -----------------------------------------------------------PhysicalOlapScan[web_returns] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -----------------------------------------------------------PhysicalOlapScan[catalog_returns] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -----------------------------------------------------------PhysicalOlapScan[store_returns] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------PhysicalOlapScan[date_dim] +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecHash] +--------------hashAgg[LOCAL] +----------------PhysicalUnion +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) +--------------------------------------------------------------------PhysicalOlapScan[web_returns] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +----------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_returns] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +----------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) +--------------------------------------------------------------------PhysicalOlapScan[store_returns] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +----------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query49.out b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query49.out index 83259727b845b62..aad565578e4fb86 100644 --- a/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query49.out +++ b/regression-test/data/new_shapes_p0/tpcds_sf100/no_stats_shape/query49.out @@ -5,87 +5,104 @@ PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] -----------PhysicalProject -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[LOCAL] -------------------PhysicalUnion ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -----------------------------------------------------------PhysicalOlapScan[web_returns] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -----------------------------------------------------------PhysicalOlapScan[catalog_returns] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -----------------------------------------------------------PhysicalOlapScan[store_returns] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------PhysicalOlapScan[date_dim] +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecHash] +--------------hashAgg[LOCAL] +----------------PhysicalUnion +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) +--------------------------------------------------------------------PhysicalOlapScan[web_returns] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +----------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_returns] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +----------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) +--------------------------------------------------------------------PhysicalOlapScan[store_returns] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +----------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query49.out b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query49.out index 90cf1cf013b3d71..383a8771e454905 100644 --- a/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query49.out +++ b/regression-test/data/new_shapes_p0/tpcds_sf100/rf_prune/query49.out @@ -5,87 +5,104 @@ PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] -----------PhysicalProject -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[LOCAL] -------------------PhysicalUnion ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -----------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -----------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -----------------------------------------------------------PhysicalOlapScan[date_dim] +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecHash] +--------------hashAgg[LOCAL] +----------------PhysicalUnion +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query49.out b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query49.out index 90cf1cf013b3d71..383a8771e454905 100644 --- a/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query49.out +++ b/regression-test/data/new_shapes_p0/tpcds_sf100/shape/query49.out @@ -5,87 +5,104 @@ PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] -----------PhysicalProject -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[LOCAL] -------------------PhysicalUnion ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -----------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -----------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -----------------------------------------------------------PhysicalOlapScan[date_dim] +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecHash] +--------------hashAgg[LOCAL] +----------------PhysicalUnion +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query49.out b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query49.out index 2042698b5baf514..049344f4ebca69a 100644 --- a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query49.out +++ b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query49.out @@ -5,87 +5,104 @@ PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] -----------PhysicalProject -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[LOCAL] -------------------PhysicalUnion ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) -----------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) -----------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalProject -------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) ---------------------------PhysicalWindow -----------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------PhysicalWindow ---------------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -----------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) -----------------------------------------------------------PhysicalOlapScan[date_dim] +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecHash] +--------------hashAgg[LOCAL] +----------------PhysicalUnion +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------PhysicalTopN[MERGE_SORT] +----------------------PhysicalDistribute[DistributionSpecGather] +------------------------PhysicalTopN[LOCAL_SORT] +--------------------------hashAgg[GLOBAL] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------hashAgg[LOCAL] +--------------------------------PhysicalProject +----------------------------------filter(OR[(return_rank <= 10),(currency_rank <= 10)]) +------------------------------------PhysicalWindow +--------------------------------------PhysicalQuickSort[LOCAL_SORT] +----------------------------------------PhysicalWindow +------------------------------------------PhysicalQuickSort[MERGE_SORT] +--------------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------------PhysicalQuickSort[LOCAL_SORT] +------------------------------------------------PhysicalProject +--------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) +----------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +--------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) +--------------------------------------------------------------------PhysicalOlapScan[date_dim]