Skip to content

Commit

Permalink
shape
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Dec 11, 2024
1 parent 51b0083 commit b3f9f84
Show file tree
Hide file tree
Showing 290 changed files with 9,345 additions and 8,982 deletions.
68 changes: 35 additions & 33 deletions regression-test/data/nereids_hint_tpcds_p0/shape/query10.out
Original file line number Diff line number Diff line change
@@ -1,49 +1,51 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !ds_shape_10 --
PhysicalResultSink
--PhysicalTopN[MERGE_SORT]
----PhysicalDistribute[DistributionSpecGather]
------PhysicalTopN[LOCAL_SORT]
--------PhysicalProject
----------hashAgg[GLOBAL]
------------PhysicalDistribute[DistributionSpecHash]
--------------hashAgg[LOCAL]
----------------PhysicalProject
------------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)])
--------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
----------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 ss_customer_sk->[c_customer_sk]
--------------------------PhysicalProject
----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 c_current_cdemo_sk->[cd_demo_sk]
------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF4
------------------------------PhysicalProject
--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk]
----------------------------------PhysicalProject
------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF5
----------------------------------PhysicalProject
------------------------------------filter(ca_county IN ('Campbell County', 'Cleburne County', 'Escambia County', 'Fairfield County', 'Washtenaw County'))
--------------------------------------PhysicalOlapScan[customer_address]
--PhysicalProject
----PhysicalTopN[MERGE_SORT]
------PhysicalDistribute[DistributionSpecGather]
--------PhysicalTopN[LOCAL_SORT]
----------PhysicalProject
------------hashAgg[GLOBAL]
--------------PhysicalDistribute[DistributionSpecHash]
----------------hashAgg[LOCAL]
------------------PhysicalProject
--------------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)])
----------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=()
------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
--------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 ss_customer_sk->[c_customer_sk]
----------------------------PhysicalProject
------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 c_current_cdemo_sk->[cd_demo_sk]
--------------------------------PhysicalProject
----------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF4
--------------------------------PhysicalProject
----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk]
------------------------------------PhysicalProject
--------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF5
------------------------------------PhysicalProject
--------------------------------------filter(ca_county IN ('Campbell County', 'Cleburne County', 'Escambia County', 'Fairfield County', 'Washtenaw County'))
----------------------------------------PhysicalOlapScan[customer_address]
----------------------------PhysicalProject
------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk]
--------------------------------PhysicalProject
----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2
--------------------------------PhysicalProject
----------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001))
------------------------------------PhysicalOlapScan[date_dim]
--------------------------PhysicalProject
----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk]
----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
------------------------------PhysicalProject
--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2
--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
------------------------------PhysicalProject
--------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001))
----------------------------------PhysicalOlapScan[date_dim]
------------------------PhysicalProject
--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk]
--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk]
----------------------------PhysicalProject
------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1
------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0
----------------------------PhysicalProject
------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001))
--------------------------------PhysicalOlapScan[date_dim]
----------------------PhysicalProject
------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk]
--------------------------PhysicalProject
----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0
--------------------------PhysicalProject
----------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001))
------------------------------PhysicalOlapScan[date_dim]

Hint log:
Used: leading(customer_demographics broadcast { c broadcast ca } )
Expand Down
146 changes: 74 additions & 72 deletions regression-test/data/nereids_hint_tpcds_p0/shape/query14.out
Original file line number Diff line number Diff line change
Expand Up @@ -71,84 +71,86 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
------------------filter((date_dim.d_year <= 2001) and (date_dim.d_year >= 1999))
--------------------PhysicalOlapScan[date_dim]
----PhysicalResultSink
------PhysicalTopN[MERGE_SORT]
--------PhysicalDistribute[DistributionSpecGather]
----------PhysicalTopN[LOCAL_SORT]
------------PhysicalProject
--------------hashAgg[GLOBAL]
----------------PhysicalDistribute[DistributionSpecHash]
------------------hashAgg[LOCAL]
--------------------PhysicalRepeat
----------------------PhysicalUnion
------------------------PhysicalProject
--------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE))
------PhysicalProject
--------PhysicalTopN[MERGE_SORT]
----------PhysicalDistribute[DistributionSpecGather]
------------PhysicalTopN[LOCAL_SORT]
--------------PhysicalProject
----------------hashAgg[GLOBAL]
------------------PhysicalDistribute[DistributionSpecHash]
--------------------hashAgg[LOCAL]
----------------------PhysicalProject
------------------------PhysicalRepeat
--------------------------PhysicalUnion
----------------------------PhysicalProject
------------------------------hashAgg[GLOBAL]
--------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------hashAgg[LOCAL]
------------------------------------PhysicalProject
--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[ss_item_sk,ss_item_sk]
----------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF11 ss_item_sk->[ss_item_sk]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF10 d_date_sk->[ss_sold_date_sk]
----------------------------------------------PhysicalProject
------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF10 RF11 RF12
----------------------------------------------PhysicalProject
------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001))
--------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF12
------------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE))
--------------------------------PhysicalProject
----------------------------------hashAgg[GLOBAL]
------------------------------------PhysicalDistribute[DistributionSpecHash]
--------------------------------------hashAgg[LOCAL]
----------------------------------------PhysicalProject
------------------------------------------PhysicalOlapScan[item]
----------------------------PhysicalProject
------------------------------PhysicalAssertNumRows
--------------------------------PhysicalDistribute[DistributionSpecGather]
----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 )
------------------------PhysicalProject
--------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE))
----------------------------PhysicalProject
------------------------------hashAgg[GLOBAL]
--------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------hashAgg[LOCAL]
------------------------------------PhysicalProject
--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF15 i_item_sk->[cs_item_sk,ss_item_sk]
----------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF14 ss_item_sk->[cs_item_sk]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF13 d_date_sk->[cs_sold_date_sk]
------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[ss_item_sk,ss_item_sk]
--------------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF11 ss_item_sk->[ss_item_sk]
----------------------------------------------PhysicalProject
------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF13 RF14 RF15
----------------------------------------------PhysicalProject
------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001))
--------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF15
----------------------------------------PhysicalProject
------------------------------------------PhysicalOlapScan[item]
------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF10 d_date_sk->[ss_sold_date_sk]
--------------------------------------------------PhysicalProject
----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF10 RF11 RF12
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001))
------------------------------------------------------PhysicalOlapScan[date_dim]
----------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF12
--------------------------------------------PhysicalProject
----------------------------------------------PhysicalOlapScan[item]
--------------------------------PhysicalProject
----------------------------------PhysicalAssertNumRows
------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------PhysicalCteConsumer ( cteId=CTEId#1 )
----------------------------PhysicalProject
------------------------------PhysicalAssertNumRows
--------------------------------PhysicalDistribute[DistributionSpecGather]
----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 )
------------------------PhysicalProject
--------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE))
----------------------------PhysicalProject
------------------------------hashAgg[GLOBAL]
--------------------------------PhysicalDistribute[DistributionSpecHash]
----------------------------------hashAgg[LOCAL]
------------------------------------PhysicalProject
--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF18 i_item_sk->[ss_item_sk,ws_item_sk]
----------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF17 ss_item_sk->[ws_item_sk]
------------------------------------------PhysicalProject
--------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF16 d_date_sk->[ws_sold_date_sk]
----------------------------------------------PhysicalProject
------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF16 RF17 RF18
----------------------------------------------PhysicalProject
------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001))
--------------------------------------------------PhysicalOlapScan[date_dim]
------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF18
------------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE))
--------------------------------PhysicalProject
----------------------------------hashAgg[GLOBAL]
------------------------------------PhysicalDistribute[DistributionSpecHash]
--------------------------------------hashAgg[LOCAL]
----------------------------------------PhysicalProject
------------------------------------------PhysicalOlapScan[item]
------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF15 i_item_sk->[cs_item_sk,ss_item_sk]
--------------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF14 ss_item_sk->[cs_item_sk]
----------------------------------------------PhysicalProject
------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF13 d_date_sk->[cs_sold_date_sk]
--------------------------------------------------PhysicalProject
----------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF13 RF14 RF15
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001))
------------------------------------------------------PhysicalOlapScan[date_dim]
----------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF15
--------------------------------------------PhysicalProject
----------------------------------------------PhysicalOlapScan[item]
--------------------------------PhysicalProject
----------------------------------PhysicalAssertNumRows
------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------PhysicalCteConsumer ( cteId=CTEId#1 )
----------------------------PhysicalProject
------------------------------PhysicalAssertNumRows
--------------------------------PhysicalDistribute[DistributionSpecGather]
----------------------------------PhysicalCteConsumer ( cteId=CTEId#1 )
------------------------------NestedLoopJoin[INNER_JOIN](cast(sales as DOUBLE) > cast(average_sales as DOUBLE))
--------------------------------PhysicalProject
----------------------------------hashAgg[GLOBAL]
------------------------------------PhysicalDistribute[DistributionSpecHash]
--------------------------------------hashAgg[LOCAL]
----------------------------------------PhysicalProject
------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF18 i_item_sk->[ss_item_sk,ws_item_sk]
--------------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF17 ss_item_sk->[ws_item_sk]
----------------------------------------------PhysicalProject
------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF16 d_date_sk->[ws_sold_date_sk]
--------------------------------------------------PhysicalProject
----------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF16 RF17 RF18
--------------------------------------------------PhysicalProject
----------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001))
------------------------------------------------------PhysicalOlapScan[date_dim]
----------------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF18
--------------------------------------------PhysicalProject
----------------------------------------------PhysicalOlapScan[item]
--------------------------------PhysicalProject
----------------------------------PhysicalAssertNumRows
------------------------------------PhysicalDistribute[DistributionSpecGather]
--------------------------------------PhysicalCteConsumer ( cteId=CTEId#1 )

Hint log:
Used:
Expand Down
Loading

0 comments on commit b3f9f84

Please sign in to comment.