Skip to content

Commit

Permalink
shape2-proj-topn-agg
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Dec 19, 2024
1 parent 321f4f2 commit d472eae
Show file tree
Hide file tree
Showing 12 changed files with 1,200 additions and 996 deletions.
183 changes: 100 additions & 83 deletions regression-test/data/nereids_hint_tpcds_p0/shape/query49.out
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Loading

0 comments on commit d472eae

Please sign in to comment.