Skip to content

Commit

Permalink
update TOPN test
Browse files Browse the repository at this point in the history
  • Loading branch information
xiedeyantu committed Jul 19, 2024
1 parent 2f102ef commit a8e392b
Show file tree
Hide file tree
Showing 41 changed files with 1,385 additions and 1,441 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,12 @@ PhysicalResultSink

-- !cross_join_order --
PhysicalResultSink
--PhysicalTopN[MERGE_SORT]
----PhysicalTopN[LOCAL_SORT]
------NestedLoopJoin[CROSS_JOIN]
--------PhysicalTopN[MERGE_SORT]
----------PhysicalTopN[LOCAL_SORT]
------------PhysicalOlapScan[t1]
--------PhysicalOlapScan[t2]
--PhysicalTopN[GATHER_SORT]
----NestedLoopJoin[CROSS_JOIN]
------PhysicalTopN[MERGE_SORT]
--------PhysicalTopN[LOCAL_SORT]
----------PhysicalOlapScan[t1]
------PhysicalOlapScan[t2]

-- !limit_offset_sort_join --
PhysicalResultSink
Expand Down Expand Up @@ -172,12 +171,11 @@ PhysicalResultSink

-- !limit_sort_window --
PhysicalResultSink
--PhysicalTopN[MERGE_SORT]
----PhysicalTopN[LOCAL_SORT]
------PhysicalWindow
--------PhysicalQuickSort[MERGE_SORT]
----------PhysicalQuickSort[LOCAL_SORT]
------------PhysicalOlapScan[t1]
--PhysicalTopN[GATHER_SORT]
----PhysicalWindow
------PhysicalQuickSort[MERGE_SORT]
--------PhysicalQuickSort[LOCAL_SORT]
----------PhysicalOlapScan[t1]

-- !limit_offset_window --
PhysicalResultSink
Expand All @@ -191,12 +189,11 @@ PhysicalResultSink

-- !limit_offset_sort_window --
PhysicalResultSink
--PhysicalTopN[MERGE_SORT]
----PhysicalTopN[LOCAL_SORT]
------PhysicalWindow
--------PhysicalQuickSort[MERGE_SORT]
----------PhysicalQuickSort[LOCAL_SORT]
------------PhysicalOlapScan[t1]
--PhysicalTopN[GATHER_SORT]
----PhysicalWindow
------PhysicalQuickSort[MERGE_SORT]
--------PhysicalQuickSort[LOCAL_SORT]
----------PhysicalOlapScan[t1]

-- !limit_sort_filter --
PhysicalResultSink
Expand Down Expand Up @@ -264,21 +261,19 @@ PhysicalResultSink

-- !limit_window --
PhysicalResultSink
--PhysicalTopN[MERGE_SORT]
----PhysicalTopN[LOCAL_SORT]
------PhysicalWindow
--------PhysicalQuickSort[MERGE_SORT]
----------PhysicalQuickSort[LOCAL_SORT]
------------PhysicalOlapScan[t1]
--PhysicalTopN[GATHER_SORT]
----PhysicalWindow
------PhysicalQuickSort[MERGE_SORT]
--------PhysicalQuickSort[LOCAL_SORT]
----------PhysicalOlapScan[t1]

-- !limit_offset_window --
PhysicalResultSink
--PhysicalTopN[MERGE_SORT]
----PhysicalTopN[LOCAL_SORT]
------PhysicalWindow
--------PhysicalQuickSort[MERGE_SORT]
----------PhysicalQuickSort[LOCAL_SORT]
------------PhysicalOlapScan[t1]
--PhysicalTopN[GATHER_SORT]
----PhysicalWindow
------PhysicalQuickSort[MERGE_SORT]
--------PhysicalQuickSort[LOCAL_SORT]
----------PhysicalOlapScan[t1]

-- !limit_filter --
PhysicalResultSink
Expand Down Expand Up @@ -334,12 +329,11 @@ PhysicalResultSink

-- !limit_subquery_window --
PhysicalResultSink
--PhysicalTopN[MERGE_SORT]
----PhysicalTopN[LOCAL_SORT]
------PhysicalWindow
--------PhysicalQuickSort[MERGE_SORT]
----------PhysicalQuickSort[LOCAL_SORT]
------------PhysicalOlapScan[t1]
--PhysicalTopN[GATHER_SORT]
----PhysicalWindow
------PhysicalQuickSort[MERGE_SORT]
--------PhysicalQuickSort[LOCAL_SORT]
----------PhysicalOlapScan[t1]

-- !limit_nested_subquery --
PhysicalResultSink
Expand Down Expand Up @@ -384,18 +378,16 @@ PhysicalResultSink
--PhysicalTopN[MERGE_SORT]
----PhysicalTopN[LOCAL_SORT]
------PhysicalUnion
--------PhysicalTopN[MERGE_SORT]
----------PhysicalTopN[LOCAL_SORT]
------------PhysicalWindow
--------------PhysicalQuickSort[MERGE_SORT]
----------------PhysicalQuickSort[LOCAL_SORT]
------------------PhysicalOlapScan[t1]
--------PhysicalTopN[MERGE_SORT]
----------PhysicalTopN[LOCAL_SORT]
------------PhysicalWindow
--------------PhysicalQuickSort[MERGE_SORT]
----------------PhysicalQuickSort[LOCAL_SORT]
------------------PhysicalOlapScan[t2]
--------PhysicalTopN[GATHER_SORT]
----------PhysicalWindow
------------PhysicalQuickSort[MERGE_SORT]
--------------PhysicalQuickSort[LOCAL_SORT]
----------------PhysicalOlapScan[t1]
--------PhysicalTopN[GATHER_SORT]
----------PhysicalWindow
------------PhysicalQuickSort[MERGE_SORT]
--------------PhysicalQuickSort[LOCAL_SORT]
----------------PhysicalOlapScan[t2]

-- !limit_subquery_join_filter --
PhysicalResultSink
Expand Down Expand Up @@ -533,12 +525,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
----filter((t1.id < 10))
------PhysicalOlapScan[t1]
--PhysicalResultSink
----PhysicalTopN[MERGE_SORT]
------PhysicalTopN[LOCAL_SORT]
--------PhysicalWindow
----------PhysicalQuickSort[MERGE_SORT]
------------PhysicalQuickSort[LOCAL_SORT]
--------------PhysicalCteConsumer ( cteId=CTEId#0 )
----PhysicalTopN[GATHER_SORT]
------PhysicalWindow
--------PhysicalQuickSort[MERGE_SORT]
----------PhysicalQuickSort[LOCAL_SORT]
------------PhysicalCteConsumer ( cteId=CTEId#0 )

-- !limit_project_filter --
PhysicalResultSink
Expand Down Expand Up @@ -567,12 +558,11 @@ PhysicalResultSink

-- !limit_subquery_window --
PhysicalResultSink
--PhysicalTopN[MERGE_SORT]
----PhysicalTopN[LOCAL_SORT]
------PhysicalWindow
--------PhysicalQuickSort[MERGE_SORT]
----------PhysicalQuickSort[LOCAL_SORT]
------------PhysicalOlapScan[t1]
--PhysicalTopN[GATHER_SORT]
----PhysicalWindow
------PhysicalQuickSort[MERGE_SORT]
--------PhysicalQuickSort[LOCAL_SORT]
----------PhysicalOlapScan[t1]

-- !limit_nested_subquery --
PhysicalResultSink
Expand All @@ -589,13 +579,12 @@ PhysicalResultSink

-- !limit_cross_join --
PhysicalResultSink
--PhysicalTopN[MERGE_SORT]
----PhysicalTopN[LOCAL_SORT]
------NestedLoopJoin[CROSS_JOIN]
--------PhysicalTopN[MERGE_SORT]
----------PhysicalTopN[LOCAL_SORT]
------------PhysicalOlapScan[t1]
--------PhysicalOlapScan[t2]
--PhysicalTopN[GATHER_SORT]
----NestedLoopJoin[CROSS_JOIN]
------PhysicalTopN[MERGE_SORT]
--------PhysicalTopN[LOCAL_SORT]
----------PhysicalOlapScan[t1]
------PhysicalOlapScan[t2]

-- !limit_multiple_left_outer_join --
PhysicalResultSink
Expand Down Expand Up @@ -633,13 +622,12 @@ PhysicalResultSink

-- !limit_subquery_cross_join --
PhysicalResultSink
--PhysicalTopN[MERGE_SORT]
----PhysicalTopN[LOCAL_SORT]
------NestedLoopJoin[CROSS_JOIN]
--------PhysicalTopN[MERGE_SORT]
----------PhysicalTopN[LOCAL_SORT]
------------PhysicalOlapScan[t1]
--------PhysicalOlapScan[t2]
--PhysicalTopN[GATHER_SORT]
----NestedLoopJoin[CROSS_JOIN]
------PhysicalTopN[MERGE_SORT]
--------PhysicalTopN[LOCAL_SORT]
----------PhysicalOlapScan[t1]
------PhysicalOlapScan[t2]

-- !limit_subquery_multiple_join --
PhysicalResultSink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,14 @@ PhysicalResultSink
--PhysicalTopN[MERGE_SORT]
----PhysicalTopN[LOCAL_SORT]
------PhysicalUnion
--------PhysicalTopN[MERGE_SORT]
----------PhysicalTopN[LOCAL_SORT]
------------PhysicalLimit[GLOBAL]
--------------PhysicalLimit[LOCAL]
----------------PhysicalOlapScan[table1]
--------PhysicalTopN[MERGE_SORT]
----------PhysicalTopN[LOCAL_SORT]
------------PhysicalLimit[GLOBAL]
--------------PhysicalLimit[LOCAL]
----------------PhysicalOlapScan[table1]
--------PhysicalTopN[GATHER_SORT]
----------PhysicalLimit[GLOBAL]
------------PhysicalLimit[LOCAL]
--------------PhysicalOlapScan[table1]
--------PhysicalTopN[GATHER_SORT]
----------PhysicalLimit[GLOBAL]
------------PhysicalLimit[LOCAL]
--------------PhysicalOlapScan[table1]

-- !push_down_topn_union_complex_conditions --
PhysicalResultSink
Expand Down
Original file line number Diff line number Diff line change
@@ -1,83 +1,82 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !ds_shape_61 --
PhysicalResultSink
--PhysicalTopN[MERGE_SORT]
----PhysicalTopN[LOCAL_SORT]
------PhysicalProject
--------NestedLoopJoin[CROSS_JOIN]
----------hashAgg[GLOBAL]
------------PhysicalDistribute[DistributionSpecGather]
--------------hashAgg[LOCAL]
----------------PhysicalProject
------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk]
--------------------PhysicalDistribute[DistributionSpecHash]
----------------------PhysicalProject
------------------------filter((customer_address.ca_gmt_offset = -7.00))
--------------------------PhysicalOlapScan[customer_address] apply RFs: RF10
--------------------PhysicalDistribute[DistributionSpecHash]
----------------------PhysicalProject
------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF9 ss_customer_sk->[c_customer_sk]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------PhysicalProject
------------------------------PhysicalOlapScan[customer] apply RFs: RF9
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------PhysicalProject
------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk]
--------------------------------PhysicalProject
----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[ss_promo_sk]
------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[ss_item_sk]
--------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk]
----------------------------------------PhysicalProject
------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF7 RF8
----------------------------------------PhysicalDistribute[DistributionSpecReplicated]
------------------------------------------PhysicalProject
--------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000))
----------------------------------------------PhysicalOlapScan[date_dim]
--PhysicalTopN[GATHER_SORT]
----PhysicalProject
------NestedLoopJoin[CROSS_JOIN]
--------hashAgg[GLOBAL]
----------PhysicalDistribute[DistributionSpecGather]
------------hashAgg[LOCAL]
--------------PhysicalProject
----------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk]
------------------PhysicalDistribute[DistributionSpecHash]
--------------------PhysicalProject
----------------------filter((customer_address.ca_gmt_offset = -7.00))
------------------------PhysicalOlapScan[customer_address] apply RFs: RF10
------------------PhysicalDistribute[DistributionSpecHash]
--------------------PhysicalProject
----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF9 ss_customer_sk->[c_customer_sk]
------------------------PhysicalDistribute[DistributionSpecHash]
--------------------------PhysicalProject
----------------------------PhysicalOlapScan[customer] apply RFs: RF9
------------------------PhysicalDistribute[DistributionSpecHash]
--------------------------PhysicalProject
----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk]
------------------------------PhysicalProject
--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[ss_promo_sk]
----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[ss_item_sk]
------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk]
--------------------------------------PhysicalProject
----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF7 RF8
--------------------------------------PhysicalDistribute[DistributionSpecReplicated]
----------------------------------------PhysicalProject
------------------------------------------filter((item.i_category = 'Home'))
--------------------------------------------PhysicalOlapScan[item]
------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000))
--------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------------PhysicalProject
----------------------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y')))
------------------------------------------PhysicalOlapScan[promotion]
--------------------------------PhysicalDistribute[DistributionSpecReplicated]
----------------------------------PhysicalProject
------------------------------------filter((store.s_gmt_offset = -7.00))
--------------------------------------PhysicalOlapScan[store]
----------PhysicalDistribute[DistributionSpecReplicated]
------------hashAgg[GLOBAL]
--------------PhysicalDistribute[DistributionSpecGather]
----------------hashAgg[LOCAL]
------------------PhysicalProject
--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk]
----------------------PhysicalProject
------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------PhysicalProject
------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk]
--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk]
----------------------------------PhysicalProject
------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4
----------------------------------------filter((item.i_category = 'Home'))
------------------------------------------PhysicalOlapScan[item]
----------------------------------PhysicalDistribute[DistributionSpecReplicated]
------------------------------------PhysicalProject
--------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000))
----------------------------------------PhysicalOlapScan[date_dim]
--------------------------------------filter((((promotion.p_channel_dmail = 'Y') OR (promotion.p_channel_email = 'Y')) OR (promotion.p_channel_tv = 'Y')))
----------------------------------------PhysicalOlapScan[promotion]
------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------PhysicalProject
----------------------------------filter((store.s_gmt_offset = -7.00))
------------------------------------PhysicalOlapScan[store]
--------PhysicalDistribute[DistributionSpecReplicated]
----------hashAgg[GLOBAL]
------------PhysicalDistribute[DistributionSpecGather]
--------------hashAgg[LOCAL]
----------------PhysicalProject
------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk]
--------------------PhysicalProject
----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk]
------------------------PhysicalDistribute[DistributionSpecHash]
--------------------------PhysicalProject
----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk]
------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk]
--------------------------------PhysicalProject
----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4
--------------------------------PhysicalDistribute[DistributionSpecReplicated]
----------------------------------PhysicalProject
------------------------------------filter((item.i_category = 'Home'))
--------------------------------------PhysicalOlapScan[item]
--------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk]
------------------------------PhysicalDistribute[DistributionSpecHash]
------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000))
--------------------------------------PhysicalOlapScan[date_dim]
------------------------------PhysicalDistribute[DistributionSpecReplicated]
--------------------------------PhysicalProject
----------------------------------PhysicalOlapScan[customer] apply RFs: RF0
------------------------------PhysicalDistribute[DistributionSpecHash]
--------------------------------PhysicalProject
----------------------------------filter((customer_address.ca_gmt_offset = -7.00))
------------------------------------PhysicalOlapScan[customer_address]
----------------------PhysicalDistribute[DistributionSpecReplicated]
------------------------PhysicalProject
--------------------------filter((store.s_gmt_offset = -7.00))
----------------------------PhysicalOlapScan[store]
----------------------------------filter((item.i_category = 'Home'))
------------------------------------PhysicalOlapScan[item]
------------------------PhysicalDistribute[DistributionSpecHash]
--------------------------hashJoin[INNER_JOIN] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk]
----------------------------PhysicalDistribute[DistributionSpecHash]
------------------------------PhysicalProject
--------------------------------PhysicalOlapScan[customer] apply RFs: RF0
----------------------------PhysicalDistribute[DistributionSpecHash]
------------------------------PhysicalProject
--------------------------------filter((customer_address.ca_gmt_offset = -7.00))
----------------------------------PhysicalOlapScan[customer_address]
--------------------PhysicalDistribute[DistributionSpecReplicated]
----------------------PhysicalProject
------------------------filter((store.s_gmt_offset = -7.00))
--------------------------PhysicalOlapScan[store]

Loading

0 comments on commit a8e392b

Please sign in to comment.