Skip to content

Commit

Permalink
update shape plan
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Nov 24, 2023
1 parent 72f7867 commit ae95bda
Show file tree
Hide file tree
Showing 232 changed files with 4,378 additions and 4,737 deletions.
17 changes: 17 additions & 0 deletions regression-test/data/nereids_ssb_shape_sf100_p0/shape/flat.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !select --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[INNER_JOIN] hashCondition=((s.s_suppkey = l.lo_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[lo_suppkey]
--------PhysicalProject
----------hashJoin[INNER_JOIN] hashCondition=((c.c_custkey = l.lo_custkey)) otherCondition=() build RFs:RF1 c_custkey->[lo_custkey]
------------hashJoin[INNER_JOIN] hashCondition=((p.p_partkey = l.lo_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey]
--------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2
--------------PhysicalDistribute
----------------PhysicalOlapScan[part]
------------PhysicalDistribute
--------------PhysicalOlapScan[customer]
--------PhysicalDistribute
----------PhysicalOlapScan[supplier]

24 changes: 11 additions & 13 deletions regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.2.out
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,19 @@ PhysicalResultSink
------------hashAgg[LOCAL]
--------------PhysicalProject
----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate]
------------------PhysicalDistribute
--------------------PhysicalProject
----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey]
------------------------PhysicalDistribute
--------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey]
----------------------------PhysicalProject
------------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2
----------------------------PhysicalDistribute
------------------------------PhysicalProject
--------------------------------filter((part.p_brand <= 'MFGR#2228') and (part.p_brand >= 'MFGR#2221'))
----------------------------------PhysicalOlapScan[part]
------------------PhysicalProject
--------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey]
----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey]
------------------------PhysicalProject
--------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2
------------------------PhysicalDistribute
--------------------------PhysicalProject
----------------------------filter((supplier.s_region = 'ASIA'))
------------------------------PhysicalOlapScan[supplier]
----------------------------filter((part.p_brand <= 'MFGR#2228') and (part.p_brand >= 'MFGR#2221'))
------------------------------PhysicalOlapScan[part]
----------------------PhysicalDistribute
------------------------PhysicalProject
--------------------------filter((supplier.s_region = 'ASIA'))
----------------------------PhysicalOlapScan[supplier]
------------------PhysicalDistribute
--------------------PhysicalProject
----------------------PhysicalOlapScan[dates]
Expand Down
24 changes: 11 additions & 13 deletions regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.3.out
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,19 @@ PhysicalResultSink
------------hashAgg[LOCAL]
--------------PhysicalProject
----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate]
------------------PhysicalDistribute
--------------------PhysicalProject
----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey]
------------------------PhysicalDistribute
--------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey]
----------------------------PhysicalProject
------------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2
----------------------------PhysicalDistribute
------------------------------PhysicalProject
--------------------------------filter((part.p_brand = 'MFGR#2239'))
----------------------------------PhysicalOlapScan[part]
------------------PhysicalProject
--------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey]
----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey]
------------------------PhysicalProject
--------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2
------------------------PhysicalDistribute
--------------------------PhysicalProject
----------------------------filter((supplier.s_region = 'EUROPE'))
------------------------------PhysicalOlapScan[supplier]
----------------------------filter((part.p_brand = 'MFGR#2239'))
------------------------------PhysicalOlapScan[part]
----------------------PhysicalDistribute
------------------------PhysicalProject
--------------------------filter((supplier.s_region = 'EUROPE'))
----------------------------PhysicalOlapScan[supplier]
------------------PhysicalDistribute
--------------------PhysicalProject
----------------------PhysicalOlapScan[dates]
Expand Down
24 changes: 11 additions & 13 deletions regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.3.out
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,19 @@ PhysicalResultSink
------------hashAgg[LOCAL]
--------------PhysicalProject
----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate]
------------------PhysicalDistribute
--------------------PhysicalProject
----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF1 c_custkey->[lo_custkey]
------------------------PhysicalDistribute
--------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey]
----------------------------PhysicalProject
------------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2
----------------------------PhysicalDistribute
------------------------------PhysicalProject
--------------------------------filter(s_city IN ('UNITED KI1', 'UNITED KI5'))
----------------------------------PhysicalOlapScan[supplier]
------------------PhysicalProject
--------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF1 c_custkey->[lo_custkey]
----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey]
------------------------PhysicalProject
--------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2
------------------------PhysicalDistribute
--------------------------PhysicalProject
----------------------------filter(c_city IN ('UNITED KI1', 'UNITED KI5'))
------------------------------PhysicalOlapScan[customer]
----------------------------filter(s_city IN ('UNITED KI1', 'UNITED KI5'))
------------------------------PhysicalOlapScan[supplier]
----------------------PhysicalDistribute
------------------------PhysicalProject
--------------------------filter(c_city IN ('UNITED KI1', 'UNITED KI5'))
----------------------------PhysicalOlapScan[customer]
------------------PhysicalDistribute
--------------------PhysicalProject
----------------------filter((dates.d_year <= 1997) and (dates.d_year >= 1992))
Expand Down
29 changes: 14 additions & 15 deletions regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.4.out
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,22 @@ PhysicalResultSink
----------PhysicalDistribute
------------hashAgg[LOCAL]
--------------PhysicalProject
----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF2 c_custkey->[lo_custkey]
------------------PhysicalDistribute
--------------------PhysicalProject
----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF1 d_datekey->[lo_orderdate]
------------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey]
--------------------------PhysicalProject
----------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2
--------------------------PhysicalDistribute
----------------------------PhysicalProject
------------------------------filter(s_city IN ('UNITED KI1', 'UNITED KI5'))
--------------------------------PhysicalOlapScan[supplier]
----------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate]
------------------PhysicalProject
--------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF1 c_custkey->[lo_custkey]
----------------------hashJoin[INNER_JOIN] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey]
------------------------PhysicalProject
--------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2
------------------------PhysicalDistribute
--------------------------PhysicalProject
----------------------------filter((dates.d_yearmonth = 'Dec1997'))
------------------------------PhysicalOlapScan[dates]
----------------------------filter(s_city IN ('UNITED KI1', 'UNITED KI5'))
------------------------------PhysicalOlapScan[supplier]
----------------------PhysicalDistribute
------------------------PhysicalProject
--------------------------filter(c_city IN ('UNITED KI1', 'UNITED KI5'))
----------------------------PhysicalOlapScan[customer]
------------------PhysicalDistribute
--------------------PhysicalProject
----------------------filter(c_city IN ('UNITED KI1', 'UNITED KI5'))
------------------------PhysicalOlapScan[customer]
----------------------filter((dates.d_yearmonth = 'Dec1997'))
------------------------PhysicalOlapScan[dates]

Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ PhysicalResultSink
----------------------------hashJoin[LEFT_SEMI_JOIN] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=()
------------------------------PhysicalProject
--------------------------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 c_current_cdemo_sk->[cd_demo_sk]
----------------------------------PhysicalDistribute
------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3
----------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3
----------------------------------PhysicalDistribute
------------------------------------PhysicalProject
--------------------------------------hashJoin[INNER_JOIN] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,33 @@ PhysicalResultSink
------hashAgg[LOCAL]
--------PhysicalProject
----------hashJoin[INNER_JOIN] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk]
------------PhysicalDistribute
--------------PhysicalProject
----------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(((((((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = 'College')) AND ((store_sales.ss_sales_price >= 100.00) AND (store_sales.ss_sales_price <= 150.00))) AND (household_demographics.hd_dep_count = 3)) OR ((((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = 'Primary')) AND ((store_sales.ss_sales_price >= 50.00) AND (store_sales.ss_sales_price <= 100.00))) AND (household_demographics.hd_dep_count = 1))) OR ((((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = '2 yr Degree')) AND ((store_sales.ss_sales_price >= 150.00) AND (store_sales.ss_sales_price <= 200.00))) AND (household_demographics.hd_dep_count = 1)))) build RFs:RF3 ss_cdemo_sk->[cd_demo_sk]
------------------PhysicalDistribute
--------------------PhysicalProject
----------------------filter(((((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = 'College')) OR ((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = 'Primary'))) OR ((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = '2 yr Degree'))))
------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3
------------------PhysicalDistribute
--------------------PhysicalProject
----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_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]
--------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=((((ca_state IN ('IL', 'TN', 'TX') AND ((store_sales.ss_net_profit >= 100.00) AND (store_sales.ss_net_profit <= 200.00))) OR (ca_state IN ('ID', 'OH', 'WY') AND ((store_sales.ss_net_profit >= 150.00) AND (store_sales.ss_net_profit <= 300.00)))) OR (ca_state IN ('IA', 'MS', 'SC') AND ((store_sales.ss_net_profit >= 50.00) AND (store_sales.ss_net_profit <= 250.00))))) build RFs:RF0 ca_address_sk->[ss_addr_sk]
----------------------------PhysicalDistribute
------------------------------PhysicalProject
--------------------------------filter(((((store_sales.ss_net_profit >= 100.00) AND (store_sales.ss_net_profit <= 200.00)) OR ((store_sales.ss_net_profit >= 150.00) AND (store_sales.ss_net_profit <= 300.00))) OR ((store_sales.ss_net_profit >= 50.00) AND (store_sales.ss_net_profit <= 250.00))) and ((((store_sales.ss_sales_price >= 100.00) AND (store_sales.ss_sales_price <= 150.00)) OR ((store_sales.ss_sales_price >= 50.00) AND (store_sales.ss_sales_price <= 100.00))) OR ((store_sales.ss_sales_price >= 150.00) AND (store_sales.ss_sales_price <= 200.00))))
----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4
----------------------------PhysicalDistribute
------------------------------PhysicalProject
--------------------------------filter(((ca_state IN ('IL', 'TN', 'TX') OR ca_state IN ('ID', 'OH', 'WY')) OR ca_state IN ('IA', 'MS', 'SC')) and (customer_address.ca_country = 'United States'))
----------------------------------PhysicalOlapScan[customer_address]
------------PhysicalProject
--------------hashJoin[INNER_JOIN] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(((((((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = 'College')) AND ((store_sales.ss_sales_price >= 100.00) AND (store_sales.ss_sales_price <= 150.00))) AND (household_demographics.hd_dep_count = 3)) OR ((((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = 'Primary')) AND ((store_sales.ss_sales_price >= 50.00) AND (store_sales.ss_sales_price <= 100.00))) AND (household_demographics.hd_dep_count = 1))) OR ((((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = '2 yr Degree')) AND ((store_sales.ss_sales_price >= 150.00) AND (store_sales.ss_sales_price <= 200.00))) AND (household_demographics.hd_dep_count = 1)))) build RFs:RF3 ss_cdemo_sk->[cd_demo_sk]
----------------PhysicalDistribute
------------------PhysicalProject
--------------------filter(((((customer_demographics.cd_marital_status = 'M') AND (customer_demographics.cd_education_status = 'College')) OR ((customer_demographics.cd_marital_status = 'D') AND (customer_demographics.cd_education_status = 'Primary'))) OR ((customer_demographics.cd_marital_status = 'W') AND (customer_demographics.cd_education_status = '2 yr Degree'))))
----------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3
----------------PhysicalDistribute
------------------PhysicalProject
--------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_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]
------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=((((ca_state IN ('IL', 'TN', 'TX') AND ((store_sales.ss_net_profit >= 100.00) AND (store_sales.ss_net_profit <= 200.00))) OR (ca_state IN ('ID', 'OH', 'WY') AND ((store_sales.ss_net_profit >= 150.00) AND (store_sales.ss_net_profit <= 300.00)))) OR (ca_state IN ('IA', 'MS', 'SC') AND ((store_sales.ss_net_profit >= 50.00) AND (store_sales.ss_net_profit <= 250.00))))) build RFs:RF0 ca_address_sk->[ss_addr_sk]
--------------------------PhysicalDistribute
----------------------------PhysicalProject
------------------------------filter(((((store_sales.ss_net_profit >= 100.00) AND (store_sales.ss_net_profit <= 200.00)) OR ((store_sales.ss_net_profit >= 150.00) AND (store_sales.ss_net_profit <= 300.00))) OR ((store_sales.ss_net_profit >= 50.00) AND (store_sales.ss_net_profit <= 250.00))) and ((((store_sales.ss_sales_price >= 100.00) AND (store_sales.ss_sales_price <= 150.00)) OR ((store_sales.ss_sales_price >= 50.00) AND (store_sales.ss_sales_price <= 100.00))) OR ((store_sales.ss_sales_price >= 150.00) AND (store_sales.ss_sales_price <= 200.00))))
--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4
--------------------------PhysicalDistribute
----------------------------PhysicalProject
------------------------------filter((date_dim.d_year = 2001))
--------------------------------PhysicalOlapScan[date_dim]
------------------------------filter(((ca_state IN ('IL', 'TN', 'TX') OR ca_state IN ('ID', 'OH', 'WY')) OR ca_state IN ('IA', 'MS', 'SC')) and (customer_address.ca_country = 'United States'))
--------------------------------PhysicalOlapScan[customer_address]
------------------------PhysicalDistribute
--------------------------PhysicalProject
----------------------------filter(((household_demographics.hd_dep_count = 3) OR (household_demographics.hd_dep_count = 1)))
------------------------------PhysicalOlapScan[household_demographics]
----------------------------filter((date_dim.d_year = 2001))
------------------------------PhysicalOlapScan[date_dim]
----------------------PhysicalDistribute
------------------------PhysicalProject
--------------------------filter(((household_demographics.hd_dep_count = 3) OR (household_demographics.hd_dep_count = 1)))
----------------------------PhysicalOlapScan[household_demographics]
------------PhysicalDistribute
--------------PhysicalProject
----------------PhysicalOlapScan[store]
Expand Down
Loading

0 comments on commit ae95bda

Please sign in to comment.