From c7312f7d3bc61b91d96e9e6242c3b0df9ce1b5b3 Mon Sep 17 00:00:00 2001 From: 924060929 <924060929@qq.com> Date: Mon, 8 Jul 2024 17:31:14 +0800 Subject: [PATCH] fix --- .../tpcds_sf1000/shape/query13.out | 2 +- .../tpcds_sf1000/shape/query16.out | 38 +-- .../tpcds_sf1000/shape/query78.out | 30 +-- .../tpcds_sf1000/shape/query85.out | 2 +- .../tpcds_sf1000/shape/query94.out | 38 +-- .../bs_downgrade_shape/query13.groovy | 138 ---------- .../bs_downgrade_shape/query19.groovy | 84 ------ .../bs_downgrade_shape/query44.groovy | 104 -------- .../bs_downgrade_shape/query45.groovy | 74 ------ .../bs_downgrade_shape/query54.groovy | 146 ---------- .../bs_downgrade_shape/query56.groovy | 172 ------------ .../bs_downgrade_shape/query6.groovy | 86 ------ .../bs_downgrade_shape/query61.groovy | 122 --------- .../bs_downgrade_shape/query68.groovy | 118 --------- .../bs_downgrade_shape/query8.groovy | 250 ------------------ .../bs_downgrade_shape/query91.groovy | 96 ------- .../bs_downgrade_shape/query95.groovy | 98 ------- 17 files changed, 55 insertions(+), 1543 deletions(-) delete mode 100644 regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query13.groovy delete mode 100644 regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query19.groovy delete mode 100644 regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query44.groovy delete mode 100644 regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query45.groovy delete mode 100644 regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query54.groovy delete mode 100644 regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query56.groovy delete mode 100644 regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query6.groovy delete mode 100644 regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query61.groovy delete mode 100644 regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query68.groovy delete mode 100644 regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query8.groovy delete mode 100644 regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query91.groovy delete mode 100644 regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query95.groovy diff --git a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query13.out b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query13.out index b998d66d1f89531..d9563b8a6379946 100644 --- a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query13.out +++ b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query13.out @@ -5,7 +5,7 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] +----------hashJoin[INNER_JOIN shuffle] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] ------------PhysicalProject --------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=((((household_demographics.hd_dep_count = 1) AND ((((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))) 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))))) OR ((((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)))) build RFs:RF3 ss_cdemo_sk->[cd_demo_sk] ----------------PhysicalProject diff --git a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query16.out b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query16.out index db5bf9b39a05ecd..20329136007c864 100644 --- a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query16.out +++ b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query16.out @@ -8,27 +8,27 @@ PhysicalResultSink ----------hashAgg[GLOBAL] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] +----------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF3 cs_order_number->[cs_order_number] ------------------PhysicalProject ---------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 -------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number] ---------------------PhysicalProject -----------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] +--------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] +------------------------------hashJoin[LEFT_ANTI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 --------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_state = 'PA')) -------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) ---------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------filter((call_center.cc_county = 'Williamson County')) -----------------------------PhysicalOlapScan[call_center] +----------------------------------PhysicalOlapScan[catalog_returns] +------------------------------PhysicalProject +--------------------------------filter((customer_address.ca_state = 'PA')) +----------------------------------PhysicalOlapScan[customer_address] +--------------------------PhysicalProject +----------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalProject +------------------------filter((call_center.cc_county = 'Williamson County')) +--------------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query78.out b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query78.out index f7bf10489603754..3b2d980a6ac2c7a 100644 --- a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query78.out +++ b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query78.out @@ -14,44 +14,44 @@ PhysicalResultSink ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[LEFT_ANTI_JOIN colocated] hashCondition=((store_returns.sr_ticket_number = store_sales.ss_ticket_number) and (store_sales.ss_item_sk = store_returns.sr_item_sk)) otherCondition=() +----------------------------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 ---------------------------------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[LEFT_ANTI_JOIN colocated] hashCondition=((store_returns.sr_ticket_number = store_sales.ss_ticket_number) and (store_sales.ss_item_sk = store_returns.sr_item_sk)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_year = 1998)) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[store_returns] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_returns] +--------------------------------filter((date_dim.d_year = 1998)) +----------------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject --------------------hashAgg[GLOBAL] ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[LEFT_ANTI_JOIN colocated] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() +----------------------------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 ---------------------------------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[LEFT_ANTI_JOIN colocated] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_year = 1998)) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[web_returns] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_returns] +--------------------------------filter((date_dim.d_year = 1998)) +----------------------------------PhysicalOlapScan[date_dim] --------------PhysicalProject ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[LEFT_ANTI_JOIN colocated] hashCondition=((catalog_returns.cr_order_number = catalog_sales.cs_order_number) and (catalog_sales.cs_item_sk = catalog_returns.cr_item_sk)) otherCondition=() +------------------------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 -----------------------------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] +----------------------------hashJoin[LEFT_ANTI_JOIN colocated] hashCondition=((catalog_returns.cr_order_number = catalog_sales.cs_order_number) and (catalog_sales.cs_item_sk = catalog_returns.cr_item_sk)) otherCondition=() ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_year = 1998)) -----------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[catalog_returns] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_returns] +----------------------------filter((date_dim.d_year = 1998)) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query85.out b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query85.out index 98e830239b80117..9f5f22d4f1cb662 100644 --- a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query85.out +++ b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query85.out @@ -9,7 +9,7 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 ws_web_page_sk->[wp_web_page_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 ws_web_page_sk->[wp_web_page_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[web_page] apply RFs: RF9 --------------------PhysicalProject diff --git a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query94.out b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query94.out index 0f35f2dc29e44e8..5dc756bf1d860c1 100644 --- a/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query94.out +++ b/regression-test/data/new_shapes_p0/tpcds_sf1000/shape/query94.out @@ -8,27 +8,27 @@ PhysicalResultSink ----------hashAgg[GLOBAL] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] +----------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF3 ws_order_number->[ws_order_number] ------------------PhysicalProject ---------------------PhysicalOlapScan[web_sales] apply RFs: RF4 -------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] ---------------------PhysicalProject -----------------------PhysicalOlapScan[web_returns] apply RFs: RF3 ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] +--------------------PhysicalOlapScan[web_sales] apply RFs: RF3 +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] +------------------------------hashJoin[LEFT_ANTI_JOIN shuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 --------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_state = 'OK')) -------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_date <= '2002-06-30') and (date_dim.d_date >= '2002-05-01')) ---------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------filter((web_site.web_company_name = 'pri')) -----------------------------PhysicalOlapScan[web_site] +----------------------------------PhysicalOlapScan[web_returns] +------------------------------PhysicalProject +--------------------------------filter((customer_address.ca_state = 'OK')) +----------------------------------PhysicalOlapScan[customer_address] +--------------------------PhysicalProject +----------------------------filter((date_dim.d_date <= '2002-06-30') and (date_dim.d_date >= '2002-05-01')) +------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalProject +------------------------filter((web_site.web_company_name = 'pri')) +--------------------------PhysicalOlapScan[web_site] diff --git a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query13.groovy b/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query13.groovy deleted file mode 100644 index 00b71e8963c4f60..000000000000000 --- a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query13.groovy +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -suite("query13") { - String db = context.config.getDbNameByFile(new File(context.file.parent)) - sql "use ${db}" - sql 'set enable_nereids_planner=true' - sql 'set enable_nereids_distribute_planner=true' - sql 'set enable_fallback_to_original_planner=false' - sql 'set exec_mem_limit=21G' - sql 'set be_number_for_test=3' - sql 'set parallel_fragment_exec_instance_num=8; ' - sql 'set parallel_pipeline_task_num=8; ' - sql 'set forbid_unknown_col_stats=true' - sql 'set enable_nereids_timeout = false' - sql 'set enable_runtime_filter_prune=false' - sql 'set runtime_filter_type=8' - sql 'set dump_nereids_memo=false' - sql 'set enable_bucket_shuffle_downgrade=true' - sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION" - def ds = """select avg(ss_quantity) - ,avg(ss_ext_sales_price) - ,avg(ss_ext_wholesale_cost) - ,sum(ss_ext_wholesale_cost) - from store_sales - ,store - ,customer_demographics - ,household_demographics - ,customer_address - ,date_dim - where s_store_sk = ss_store_sk - and ss_sold_date_sk = d_date_sk and d_year = 2001 - and((ss_hdemo_sk=hd_demo_sk - and cd_demo_sk = ss_cdemo_sk - and cd_marital_status = 'M' - and cd_education_status = 'College' - and ss_sales_price between 100.00 and 150.00 - and hd_dep_count = 3 - )or - (ss_hdemo_sk=hd_demo_sk - and cd_demo_sk = ss_cdemo_sk - and cd_marital_status = 'D' - and cd_education_status = 'Primary' - and ss_sales_price between 50.00 and 100.00 - and hd_dep_count = 1 - ) or - (ss_hdemo_sk=hd_demo_sk - and cd_demo_sk = ss_cdemo_sk - and cd_marital_status = 'W' - and cd_education_status = '2 yr Degree' - and ss_sales_price between 150.00 and 200.00 - and hd_dep_count = 1 - )) - and((ss_addr_sk = ca_address_sk - and ca_country = 'United States' - and ca_state in ('IL', 'TN', 'TX') - and ss_net_profit between 100 and 200 - ) or - (ss_addr_sk = ca_address_sk - and ca_country = 'United States' - and ca_state in ('WY', 'OH', 'ID') - and ss_net_profit between 150 and 300 - ) or - (ss_addr_sk = ca_address_sk - and ca_country = 'United States' - and ca_state in ('MS', 'SC', 'IA') - and ss_net_profit between 50 and 250 - )) -""" - qt_ds_shape_13 ''' - explain shape plan - select avg(ss_quantity) - ,avg(ss_ext_sales_price) - ,avg(ss_ext_wholesale_cost) - ,sum(ss_ext_wholesale_cost) - from store_sales - ,store - ,customer_demographics - ,household_demographics - ,customer_address - ,date_dim - where s_store_sk = ss_store_sk - and ss_sold_date_sk = d_date_sk and d_year = 2001 - and((ss_hdemo_sk=hd_demo_sk - and cd_demo_sk = ss_cdemo_sk - and cd_marital_status = 'M' - and cd_education_status = 'College' - and ss_sales_price between 100.00 and 150.00 - and hd_dep_count = 3 - )or - (ss_hdemo_sk=hd_demo_sk - and cd_demo_sk = ss_cdemo_sk - and cd_marital_status = 'D' - and cd_education_status = 'Primary' - and ss_sales_price between 50.00 and 100.00 - and hd_dep_count = 1 - ) or - (ss_hdemo_sk=hd_demo_sk - and cd_demo_sk = ss_cdemo_sk - and cd_marital_status = 'W' - and cd_education_status = '2 yr Degree' - and ss_sales_price between 150.00 and 200.00 - and hd_dep_count = 1 - )) - and((ss_addr_sk = ca_address_sk - and ca_country = 'United States' - and ca_state in ('IL', 'TN', 'TX') - and ss_net_profit between 100 and 200 - ) or - (ss_addr_sk = ca_address_sk - and ca_country = 'United States' - and ca_state in ('WY', 'OH', 'ID') - and ss_net_profit between 150 and 300 - ) or - (ss_addr_sk = ca_address_sk - and ca_country = 'United States' - and ca_state in ('MS', 'SC', 'IA') - and ss_net_profit between 50 and 250 - )) - - ''' -} diff --git a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query19.groovy b/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query19.groovy deleted file mode 100644 index 59cfe847a2913fc..000000000000000 --- a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query19.groovy +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -suite("query19") { - String db = context.config.getDbNameByFile(new File(context.file.parent)) - sql "use ${db}" - sql 'set enable_nereids_planner=true' - sql 'set enable_nereids_distribute_planner=true' - sql 'set enable_fallback_to_original_planner=false' - sql 'set exec_mem_limit=21G' - sql 'set be_number_for_test=3' - sql 'set parallel_fragment_exec_instance_num=8; ' - sql 'set parallel_pipeline_task_num=8; ' - sql 'set forbid_unknown_col_stats=true' - sql 'set enable_nereids_timeout = false' - sql 'set enable_runtime_filter_prune=false' - sql 'set runtime_filter_type=8' - sql 'set dump_nereids_memo=false' - sql 'set enable_bucket_shuffle_downgrade=true' - sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION" - def ds = """select i_brand_id brand_id, i_brand brand, i_manufact_id, i_manufact, - sum(ss_ext_sales_price) ext_price - from date_dim, store_sales, item,customer,customer_address,store - where d_date_sk = ss_sold_date_sk - and ss_item_sk = i_item_sk - and i_manager_id=14 - and d_moy=11 - and d_year=2002 - and ss_customer_sk = c_customer_sk - and c_current_addr_sk = ca_address_sk - and substr(ca_zip,1,5) <> substr(s_zip,1,5) - and ss_store_sk = s_store_sk - group by i_brand - ,i_brand_id - ,i_manufact_id - ,i_manufact - order by ext_price desc - ,i_brand - ,i_brand_id - ,i_manufact_id - ,i_manufact -limit 100 """ - qt_ds_shape_19 ''' - explain shape plan - select i_brand_id brand_id, i_brand brand, i_manufact_id, i_manufact, - sum(ss_ext_sales_price) ext_price - from date_dim, store_sales, item,customer,customer_address,store - where d_date_sk = ss_sold_date_sk - and ss_item_sk = i_item_sk - and i_manager_id=14 - and d_moy=11 - and d_year=2002 - and ss_customer_sk = c_customer_sk - and c_current_addr_sk = ca_address_sk - and substr(ca_zip,1,5) <> substr(s_zip,1,5) - and ss_store_sk = s_store_sk - group by i_brand - ,i_brand_id - ,i_manufact_id - ,i_manufact - order by ext_price desc - ,i_brand - ,i_brand_id - ,i_manufact_id - ,i_manufact -limit 100 - ''' -} diff --git a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query44.groovy b/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query44.groovy deleted file mode 100644 index 6f7d3b2cb9be60e..000000000000000 --- a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query44.groovy +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -suite("query44") { - String db = context.config.getDbNameByFile(new File(context.file.parent)) - sql "use ${db}" - sql 'set enable_nereids_planner=true' - sql 'set enable_nereids_distribute_planner=true' - sql 'set enable_fallback_to_original_planner=false' - sql 'set exec_mem_limit=21G' - sql 'set be_number_for_test=3' - sql 'set parallel_fragment_exec_instance_num=8; ' - sql 'set parallel_pipeline_task_num=8; ' - sql 'set forbid_unknown_col_stats=true' - sql 'set enable_nereids_timeout = false' - sql 'set enable_runtime_filter_prune=false' - sql 'set runtime_filter_type=8' - sql 'set dump_nereids_memo=false' - sql 'set enable_bucket_shuffle_downgrade=true' - sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION" - def ds = """select asceding.rnk, i1.i_product_name best_performing, i2.i_product_name worst_performing -from(select * - from (select item_sk,rank() over (order by rank_col asc) rnk - from (select ss_item_sk item_sk,avg(ss_net_profit) rank_col - from store_sales ss1 - where ss_store_sk = 4 - group by ss_item_sk - having avg(ss_net_profit) > 0.9*(select avg(ss_net_profit) rank_col - from store_sales - where ss_store_sk = 4 - and ss_hdemo_sk is null - group by ss_store_sk))V1)V11 - where rnk < 11) asceding, - (select * - from (select item_sk,rank() over (order by rank_col desc) rnk - from (select ss_item_sk item_sk,avg(ss_net_profit) rank_col - from store_sales ss1 - where ss_store_sk = 4 - group by ss_item_sk - having avg(ss_net_profit) > 0.9*(select avg(ss_net_profit) rank_col - from store_sales - where ss_store_sk = 4 - and ss_hdemo_sk is null - group by ss_store_sk))V2)V21 - where rnk < 11) descending, -item i1, -item i2 -where asceding.rnk = descending.rnk - and i1.i_item_sk=asceding.item_sk - and i2.i_item_sk=descending.item_sk -order by asceding.rnk -limit 100""" - qt_ds_shape_44 ''' - explain shape plan - select asceding.rnk, i1.i_product_name best_performing, i2.i_product_name worst_performing -from(select * - from (select item_sk,rank() over (order by rank_col asc) rnk - from (select ss_item_sk item_sk,avg(ss_net_profit) rank_col - from store_sales ss1 - where ss_store_sk = 4 - group by ss_item_sk - having avg(ss_net_profit) > 0.9*(select avg(ss_net_profit) rank_col - from store_sales - where ss_store_sk = 4 - and ss_hdemo_sk is null - group by ss_store_sk))V1)V11 - where rnk < 11) asceding, - (select * - from (select item_sk,rank() over (order by rank_col desc) rnk - from (select ss_item_sk item_sk,avg(ss_net_profit) rank_col - from store_sales ss1 - where ss_store_sk = 4 - group by ss_item_sk - having avg(ss_net_profit) > 0.9*(select avg(ss_net_profit) rank_col - from store_sales - where ss_store_sk = 4 - and ss_hdemo_sk is null - group by ss_store_sk))V2)V21 - where rnk < 11) descending, -item i1, -item i2 -where asceding.rnk = descending.rnk - and i1.i_item_sk=asceding.item_sk - and i2.i_item_sk=descending.item_sk -order by asceding.rnk -limit 100 - ''' -} diff --git a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query45.groovy b/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query45.groovy deleted file mode 100644 index 277ab532128ea1a..000000000000000 --- a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query45.groovy +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -suite("query45") { - String db = context.config.getDbNameByFile(new File(context.file.parent)) - sql "use ${db}" - sql 'set enable_nereids_planner=true' - sql 'set enable_nereids_distribute_planner=true' - sql 'set enable_fallback_to_original_planner=false' - sql 'set exec_mem_limit=21G' - sql 'set be_number_for_test=3' - sql 'set parallel_fragment_exec_instance_num=8; ' - sql 'set parallel_pipeline_task_num=8; ' - sql 'set forbid_unknown_col_stats=true' - sql 'set enable_nereids_timeout = false' - sql 'set enable_runtime_filter_prune=false' - sql 'set runtime_filter_type=8' - sql 'set dump_nereids_memo=false' - sql 'set enable_bucket_shuffle_downgrade=true' - sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION" - def ds = """select ca_zip, ca_city, sum(ws_sales_price) - from web_sales, customer, customer_address, date_dim, item - where ws_bill_customer_sk = c_customer_sk - and c_current_addr_sk = ca_address_sk - and ws_item_sk = i_item_sk - and ( substr(ca_zip,1,5) in ('85669', '86197','88274','83405','86475', '85392', '85460', '80348', '81792') - or - i_item_id in (select i_item_id - from item - where i_item_sk in (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) - ) - ) - and ws_sold_date_sk = d_date_sk - and d_qoy = 1 and d_year = 2000 - group by ca_zip, ca_city - order by ca_zip, ca_city - limit 100""" - qt_ds_shape_45 ''' - explain shape plan - select ca_zip, ca_city, sum(ws_sales_price) - from web_sales, customer, customer_address, date_dim, item - where ws_bill_customer_sk = c_customer_sk - and c_current_addr_sk = ca_address_sk - and ws_item_sk = i_item_sk - and ( substr(ca_zip,1,5) in ('85669', '86197','88274','83405','86475', '85392', '85460', '80348', '81792') - or - i_item_id in (select i_item_id - from item - where i_item_sk in (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) - ) - ) - and ws_sold_date_sk = d_date_sk - and d_qoy = 1 and d_year = 2000 - group by ca_zip, ca_city - order by ca_zip, ca_city - limit 100 - ''' -} diff --git a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query54.groovy b/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query54.groovy deleted file mode 100644 index cd6ba1963267002..000000000000000 --- a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query54.groovy +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -suite("query54") { - String db = context.config.getDbNameByFile(new File(context.file.parent)) - sql "use ${db}" - sql 'set enable_nereids_planner=true' - sql 'set enable_nereids_distribute_planner=true' - sql 'set enable_fallback_to_original_planner=false' - sql 'set exec_mem_limit=21G' - sql 'set be_number_for_test=3' - sql 'set parallel_fragment_exec_instance_num=8; ' - sql 'set parallel_pipeline_task_num=8; ' - sql 'set forbid_unknown_col_stats=true' - sql 'set enable_nereids_timeout = false' - sql 'set enable_runtime_filter_prune=false' - sql 'set runtime_filter_type=8' - sql 'set dump_nereids_memo=false' - sql 'set enable_bucket_shuffle_downgrade=true' - sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION" - def ds = """with my_customers as ( - select distinct c_customer_sk - , c_current_addr_sk - from - ( select cs_sold_date_sk sold_date_sk, - cs_bill_customer_sk customer_sk, - cs_item_sk item_sk - from catalog_sales - union all - select ws_sold_date_sk sold_date_sk, - ws_bill_customer_sk customer_sk, - ws_item_sk item_sk - from web_sales - ) cs_or_ws_sales, - item, - date_dim, - customer - where sold_date_sk = d_date_sk - and item_sk = i_item_sk - and i_category = 'Music' - and i_class = 'country' - and c_customer_sk = cs_or_ws_sales.customer_sk - and d_moy = 1 - and d_year = 1999 - ) - , my_revenue as ( - select c_customer_sk, - sum(ss_ext_sales_price) as revenue - from my_customers, - store_sales, - customer_address, - store, - date_dim - where c_current_addr_sk = ca_address_sk - and ca_county = s_county - and ca_state = s_state - and ss_sold_date_sk = d_date_sk - and c_customer_sk = ss_customer_sk - and d_month_seq between (select distinct d_month_seq+1 - from date_dim where d_year = 1999 and d_moy = 1) - and (select distinct d_month_seq+3 - from date_dim where d_year = 1999 and d_moy = 1) - group by c_customer_sk - ) - , segments as - (select cast((revenue/50) as int) as segment - from my_revenue - ) - select segment, count(*) as num_customers, segment*50 as segment_base - from segments - group by segment - order by segment, num_customers - limit 100""" - qt_ds_shape_54 ''' - explain shape plan - with my_customers as ( - select distinct c_customer_sk - , c_current_addr_sk - from - ( select cs_sold_date_sk sold_date_sk, - cs_bill_customer_sk customer_sk, - cs_item_sk item_sk - from catalog_sales - union all - select ws_sold_date_sk sold_date_sk, - ws_bill_customer_sk customer_sk, - ws_item_sk item_sk - from web_sales - ) cs_or_ws_sales, - item, - date_dim, - customer - where sold_date_sk = d_date_sk - and item_sk = i_item_sk - and i_category = 'Music' - and i_class = 'country' - and c_customer_sk = cs_or_ws_sales.customer_sk - and d_moy = 1 - and d_year = 1999 - ) - , my_revenue as ( - select c_customer_sk, - sum(ss_ext_sales_price) as revenue - from my_customers, - store_sales, - customer_address, - store, - date_dim - where c_current_addr_sk = ca_address_sk - and ca_county = s_county - and ca_state = s_state - and ss_sold_date_sk = d_date_sk - and c_customer_sk = ss_customer_sk - and d_month_seq between (select distinct d_month_seq+1 - from date_dim where d_year = 1999 and d_moy = 1) - and (select distinct d_month_seq+3 - from date_dim where d_year = 1999 and d_moy = 1) - group by c_customer_sk - ) - , segments as - (select cast((revenue/50) as int) as segment - from my_revenue - ) - select segment, count(*) as num_customers, segment*50 as segment_base - from segments - group by segment - order by segment, num_customers - limit 100 - ''' -} diff --git a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query56.groovy b/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query56.groovy deleted file mode 100644 index 9d1207a8cb62331..000000000000000 --- a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query56.groovy +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -suite("query56") { - String db = context.config.getDbNameByFile(new File(context.file.parent)) - sql "use ${db}" - sql 'set enable_nereids_planner=true' - sql 'set enable_nereids_distribute_planner=true' - sql 'set enable_fallback_to_original_planner=false' - sql 'set exec_mem_limit=21G' - sql 'set be_number_for_test=3' - sql 'set parallel_fragment_exec_instance_num=8; ' - sql 'set parallel_pipeline_task_num=8; ' - sql 'set forbid_unknown_col_stats=true' - sql 'set enable_nereids_timeout = false' - sql 'set enable_runtime_filter_prune=false' - sql 'set runtime_filter_type=8' - sql 'set dump_nereids_memo=false' - sql 'set enable_bucket_shuffle_downgrade=true' - sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION" - def ds = """with ss as ( - select i_item_id,sum(ss_ext_sales_price) total_sales - from - store_sales, - date_dim, - customer_address, - item - where i_item_id in (select - i_item_id -from item -where i_color in ('powder','orchid','pink')) - and ss_item_sk = i_item_sk - and ss_sold_date_sk = d_date_sk - and d_year = 2000 - and d_moy = 3 - and ss_addr_sk = ca_address_sk - and ca_gmt_offset = -6 - group by i_item_id), - cs as ( - select i_item_id,sum(cs_ext_sales_price) total_sales - from - catalog_sales, - date_dim, - customer_address, - item - where - i_item_id in (select - i_item_id -from item -where i_color in ('powder','orchid','pink')) - and cs_item_sk = i_item_sk - and cs_sold_date_sk = d_date_sk - and d_year = 2000 - and d_moy = 3 - and cs_bill_addr_sk = ca_address_sk - and ca_gmt_offset = -6 - group by i_item_id), - ws as ( - select i_item_id,sum(ws_ext_sales_price) total_sales - from - web_sales, - date_dim, - customer_address, - item - where - i_item_id in (select - i_item_id -from item -where i_color in ('powder','orchid','pink')) - and ws_item_sk = i_item_sk - and ws_sold_date_sk = d_date_sk - and d_year = 2000 - and d_moy = 3 - and ws_bill_addr_sk = ca_address_sk - and ca_gmt_offset = -6 - group by i_item_id) - select i_item_id ,sum(total_sales) total_sales - from (select * from ss - union all - select * from cs - union all - select * from ws) tmp1 - group by i_item_id - order by total_sales, - i_item_id - limit 100""" - qt_ds_shape_56 ''' - explain shape plan - with ss as ( - select i_item_id,sum(ss_ext_sales_price) total_sales - from - store_sales, - date_dim, - customer_address, - item - where i_item_id in (select - i_item_id -from item -where i_color in ('powder','orchid','pink')) - and ss_item_sk = i_item_sk - and ss_sold_date_sk = d_date_sk - and d_year = 2000 - and d_moy = 3 - and ss_addr_sk = ca_address_sk - and ca_gmt_offset = -6 - group by i_item_id), - cs as ( - select i_item_id,sum(cs_ext_sales_price) total_sales - from - catalog_sales, - date_dim, - customer_address, - item - where - i_item_id in (select - i_item_id -from item -where i_color in ('powder','orchid','pink')) - and cs_item_sk = i_item_sk - and cs_sold_date_sk = d_date_sk - and d_year = 2000 - and d_moy = 3 - and cs_bill_addr_sk = ca_address_sk - and ca_gmt_offset = -6 - group by i_item_id), - ws as ( - select i_item_id,sum(ws_ext_sales_price) total_sales - from - web_sales, - date_dim, - customer_address, - item - where - i_item_id in (select - i_item_id -from item -where i_color in ('powder','orchid','pink')) - and ws_item_sk = i_item_sk - and ws_sold_date_sk = d_date_sk - and d_year = 2000 - and d_moy = 3 - and ws_bill_addr_sk = ca_address_sk - and ca_gmt_offset = -6 - group by i_item_id) - select i_item_id ,sum(total_sales) total_sales - from (select * from ss - union all - select * from cs - union all - select * from ws) tmp1 - group by i_item_id - order by total_sales, - i_item_id - limit 100 - ''' -} diff --git a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query6.groovy b/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query6.groovy deleted file mode 100644 index 61c956b5fa06d16..000000000000000 --- a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query6.groovy +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -suite("query6") { - String db = context.config.getDbNameByFile(new File(context.file.parent)) - sql "use ${db}" - sql 'set enable_nereids_planner=true' - sql 'set enable_nereids_distribute_planner=true' - sql 'set enable_fallback_to_original_planner=false' - sql 'set exec_mem_limit=21G' - sql 'set be_number_for_test=3' - sql 'set parallel_fragment_exec_instance_num=8; ' - sql 'set parallel_pipeline_task_num=8; ' - sql 'set forbid_unknown_col_stats=true' - sql 'set enable_nereids_timeout = false' - sql 'set enable_runtime_filter_prune=false' - sql 'set runtime_filter_type=8' - sql 'set dump_nereids_memo=false' - sql 'set enable_bucket_shuffle_downgrade=true' - sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION" - def ds = """select a.ca_state state, count(*) cnt - from customer_address a - ,customer c - ,store_sales s - ,date_dim d - ,item i - where a.ca_address_sk = c.c_current_addr_sk - and c.c_customer_sk = s.ss_customer_sk - and s.ss_sold_date_sk = d.d_date_sk - and s.ss_item_sk = i.i_item_sk - and d.d_month_seq = - (select distinct (d_month_seq) - from date_dim - where d_year = 2002 - and d_moy = 3 ) - and i.i_current_price > 1.2 * - (select avg(j.i_current_price) - from item j - where j.i_category = i.i_category) - group by a.ca_state - having count(*) >= 10 - order by cnt, a.ca_state - limit 100""" - qt_ds_shape_6 ''' - explain shape plan - select a.ca_state state, count(*) cnt - from customer_address a - ,customer c - ,store_sales s - ,date_dim d - ,item i - where a.ca_address_sk = c.c_current_addr_sk - and c.c_customer_sk = s.ss_customer_sk - and s.ss_sold_date_sk = d.d_date_sk - and s.ss_item_sk = i.i_item_sk - and d.d_month_seq = - (select distinct (d_month_seq) - from date_dim - where d_year = 2002 - and d_moy = 3 ) - and i.i_current_price > 1.2 * - (select avg(j.i_current_price) - from item j - where j.i_category = i.i_category) - group by a.ca_state - having count(*) >= 10 - order by cnt, a.ca_state - limit 100 - ''' -} diff --git a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query61.groovy b/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query61.groovy deleted file mode 100644 index 9ebf2589facbaaf..000000000000000 --- a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query61.groovy +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -suite("query61") { - String db = context.config.getDbNameByFile(new File(context.file.parent)) - sql "use ${db}" - sql 'set enable_nereids_planner=true' - sql 'set enable_nereids_distribute_planner=true' - sql 'set enable_fallback_to_original_planner=false' - sql 'set exec_mem_limit=21G' - sql 'set be_number_for_test=3' - sql 'set parallel_fragment_exec_instance_num=8; ' - sql 'set parallel_pipeline_task_num=8; ' - sql 'set forbid_unknown_col_stats=true' - sql 'set enable_nereids_timeout = false' - sql 'set enable_runtime_filter_prune=false' - sql 'set runtime_filter_type=8' - sql 'set dump_nereids_memo=false' - sql 'set enable_bucket_shuffle_downgrade=true' - sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION" - def ds = """select promotions,total,cast(promotions as decimal(15,4))/cast(total as decimal(15,4))*100 -from - (select sum(ss_ext_sales_price) promotions - from store_sales - ,store - ,promotion - ,date_dim - ,customer - ,customer_address - ,item - where ss_sold_date_sk = d_date_sk - and ss_store_sk = s_store_sk - and ss_promo_sk = p_promo_sk - and ss_customer_sk= c_customer_sk - and ca_address_sk = c_current_addr_sk - and ss_item_sk = i_item_sk - and ca_gmt_offset = -7 - and i_category = 'Home' - and (p_channel_dmail = 'Y' or p_channel_email = 'Y' or p_channel_tv = 'Y') - and s_gmt_offset = -7 - and d_year = 2000 - and d_moy = 12) promotional_sales, - (select sum(ss_ext_sales_price) total - from store_sales - ,store - ,date_dim - ,customer - ,customer_address - ,item - where ss_sold_date_sk = d_date_sk - and ss_store_sk = s_store_sk - and ss_customer_sk= c_customer_sk - and ca_address_sk = c_current_addr_sk - and ss_item_sk = i_item_sk - and ca_gmt_offset = -7 - and i_category = 'Home' - and s_gmt_offset = -7 - and d_year = 2000 - and d_moy = 12) all_sales -order by promotions, total -limit 100""" - qt_ds_shape_61 ''' - explain shape plan - select promotions,total,cast(promotions as decimal(15,4))/cast(total as decimal(15,4))*100 -from - (select sum(ss_ext_sales_price) promotions - from store_sales - ,store - ,promotion - ,date_dim - ,customer - ,customer_address - ,item - where ss_sold_date_sk = d_date_sk - and ss_store_sk = s_store_sk - and ss_promo_sk = p_promo_sk - and ss_customer_sk= c_customer_sk - and ca_address_sk = c_current_addr_sk - and ss_item_sk = i_item_sk - and ca_gmt_offset = -7 - and i_category = 'Home' - and (p_channel_dmail = 'Y' or p_channel_email = 'Y' or p_channel_tv = 'Y') - and s_gmt_offset = -7 - and d_year = 2000 - and d_moy = 12) promotional_sales, - (select sum(ss_ext_sales_price) total - from store_sales - ,store - ,date_dim - ,customer - ,customer_address - ,item - where ss_sold_date_sk = d_date_sk - and ss_store_sk = s_store_sk - and ss_customer_sk= c_customer_sk - and ca_address_sk = c_current_addr_sk - and ss_item_sk = i_item_sk - and ca_gmt_offset = -7 - and i_category = 'Home' - and s_gmt_offset = -7 - and d_year = 2000 - and d_moy = 12) all_sales -order by promotions, total -limit 100 - ''' -} diff --git a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query68.groovy b/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query68.groovy deleted file mode 100644 index 431393b9ae71580..000000000000000 --- a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query68.groovy +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -suite("query68") { - String db = context.config.getDbNameByFile(new File(context.file.parent)) - sql "use ${db}" - sql 'set enable_nereids_planner=true' - sql 'set enable_nereids_distribute_planner=true' - sql 'set enable_fallback_to_original_planner=false' - sql 'set exec_mem_limit=21G' - sql 'set be_number_for_test=3' - sql 'set parallel_fragment_exec_instance_num=8; ' - sql 'set parallel_pipeline_task_num=8; ' - sql 'set forbid_unknown_col_stats=true' - sql 'set enable_nereids_timeout = false' - sql 'set enable_runtime_filter_prune=false' - sql 'set runtime_filter_type=8' - sql 'set dump_nereids_memo=false' - sql 'set enable_bucket_shuffle_downgrade=true' - sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION" - def ds = """select c_last_name - ,c_first_name - ,ca_city - ,bought_city - ,ss_ticket_number - ,extended_price - ,extended_tax - ,list_price - from (select ss_ticket_number - ,ss_customer_sk - ,ca_city bought_city - ,sum(ss_ext_sales_price) extended_price - ,sum(ss_ext_list_price) list_price - ,sum(ss_ext_tax) extended_tax - from store_sales - ,date_dim - ,store - ,household_demographics - ,customer_address - where store_sales.ss_sold_date_sk = date_dim.d_date_sk - and store_sales.ss_store_sk = store.s_store_sk - and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk - and store_sales.ss_addr_sk = customer_address.ca_address_sk - and date_dim.d_dom between 1 and 2 - and (household_demographics.hd_dep_count = 3 or - household_demographics.hd_vehicle_count= 4) - and date_dim.d_year in (1998,1998+1,1998+2) - and store.s_city in ('Fairview','Midway') - group by ss_ticket_number - ,ss_customer_sk - ,ss_addr_sk,ca_city) dn - ,customer - ,customer_address current_addr - where ss_customer_sk = c_customer_sk - and customer.c_current_addr_sk = current_addr.ca_address_sk - and current_addr.ca_city <> bought_city - order by c_last_name - ,ss_ticket_number - limit 100""" - qt_ds_shape_68 ''' - explain shape plan - select c_last_name - ,c_first_name - ,ca_city - ,bought_city - ,ss_ticket_number - ,extended_price - ,extended_tax - ,list_price - from (select ss_ticket_number - ,ss_customer_sk - ,ca_city bought_city - ,sum(ss_ext_sales_price) extended_price - ,sum(ss_ext_list_price) list_price - ,sum(ss_ext_tax) extended_tax - from store_sales - ,date_dim - ,store - ,household_demographics - ,customer_address - where store_sales.ss_sold_date_sk = date_dim.d_date_sk - and store_sales.ss_store_sk = store.s_store_sk - and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk - and store_sales.ss_addr_sk = customer_address.ca_address_sk - and date_dim.d_dom between 1 and 2 - and (household_demographics.hd_dep_count = 3 or - household_demographics.hd_vehicle_count= 4) - and date_dim.d_year in (1998,1998+1,1998+2) - and store.s_city in ('Fairview','Midway') - group by ss_ticket_number - ,ss_customer_sk - ,ss_addr_sk,ca_city) dn - ,customer - ,customer_address current_addr - where ss_customer_sk = c_customer_sk - and customer.c_current_addr_sk = current_addr.ca_address_sk - and current_addr.ca_city <> bought_city - order by c_last_name - ,ss_ticket_number - limit 100 - ''' -} diff --git a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query8.groovy b/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query8.groovy deleted file mode 100644 index 99ce00dd6e05c44..000000000000000 --- a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query8.groovy +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -suite("query8") { - String db = context.config.getDbNameByFile(new File(context.file.parent)) - sql "use ${db}" - sql 'set enable_nereids_planner=true' - sql 'set enable_nereids_distribute_planner=true' - sql 'set enable_fallback_to_original_planner=false' - sql 'set exec_mem_limit=21G' - sql 'set be_number_for_test=3' - sql 'set parallel_fragment_exec_instance_num=8; ' - sql 'set parallel_pipeline_task_num=8; ' - sql 'set forbid_unknown_col_stats=true' - sql 'set enable_nereids_timeout = false' - sql 'set enable_runtime_filter_prune=false' - sql 'set runtime_filter_type=8' - sql 'set dump_nereids_memo=false' - sql 'set enable_bucket_shuffle_downgrade=true' - sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION" - def ds = """select s_store_name - ,sum(ss_net_profit) - from store_sales - ,date_dim - ,store, - (select ca_zip - from ( - SELECT substr(ca_zip,1,5) ca_zip - FROM customer_address - WHERE substr(ca_zip,1,5) IN ( - '47602','16704','35863','28577','83910','36201', - '58412','48162','28055','41419','80332', - '38607','77817','24891','16226','18410', - '21231','59345','13918','51089','20317', - '17167','54585','67881','78366','47770', - '18360','51717','73108','14440','21800', - '89338','45859','65501','34948','25973', - '73219','25333','17291','10374','18829', - '60736','82620','41351','52094','19326', - '25214','54207','40936','21814','79077', - '25178','75742','77454','30621','89193', - '27369','41232','48567','83041','71948', - '37119','68341','14073','16891','62878', - '49130','19833','24286','27700','40979', - '50412','81504','94835','84844','71954', - '39503','57649','18434','24987','12350', - '86379','27413','44529','98569','16515', - '27287','24255','21094','16005','56436', - '91110','68293','56455','54558','10298', - '83647','32754','27052','51766','19444', - '13869','45645','94791','57631','20712', - '37788','41807','46507','21727','71836', - '81070','50632','88086','63991','20244', - '31655','51782','29818','63792','68605', - '94898','36430','57025','20601','82080', - '33869','22728','35834','29086','92645', - '98584','98072','11652','78093','57553', - '43830','71144','53565','18700','90209', - '71256','38353','54364','28571','96560', - '57839','56355','50679','45266','84680', - '34306','34972','48530','30106','15371', - '92380','84247','92292','68852','13338', - '34594','82602','70073','98069','85066', - '47289','11686','98862','26217','47529', - '63294','51793','35926','24227','14196', - '24594','32489','99060','49472','43432', - '49211','14312','88137','47369','56877', - '20534','81755','15794','12318','21060', - '73134','41255','63073','81003','73873', - '66057','51184','51195','45676','92696', - '70450','90669','98338','25264','38919', - '59226','58581','60298','17895','19489', - '52301','80846','95464','68770','51634', - '19988','18367','18421','11618','67975', - '25494','41352','95430','15734','62585', - '97173','33773','10425','75675','53535', - '17879','41967','12197','67998','79658', - '59130','72592','14851','43933','68101', - '50636','25717','71286','24660','58058', - '72991','95042','15543','33122','69280', - '11912','59386','27642','65177','17672', - '33467','64592','36335','54010','18767', - '63193','42361','49254','33113','33159', - '36479','59080','11855','81963','31016', - '49140','29392','41836','32958','53163', - '13844','73146','23952','65148','93498', - '14530','46131','58454','13376','13378', - '83986','12320','17193','59852','46081', - '98533','52389','13086','68843','31013', - '13261','60560','13443','45533','83583', - '11489','58218','19753','22911','25115', - '86709','27156','32669','13123','51933', - '39214','41331','66943','14155','69998', - '49101','70070','35076','14242','73021', - '59494','15782','29752','37914','74686', - '83086','34473','15751','81084','49230', - '91894','60624','17819','28810','63180', - '56224','39459','55233','75752','43639', - '55349','86057','62361','50788','31830', - '58062','18218','85761','60083','45484', - '21204','90229','70041','41162','35390', - '16364','39500','68908','26689','52868', - '81335','40146','11340','61527','61794', - '71997','30415','59004','29450','58117', - '69952','33562','83833','27385','61860', - '96435','48333','23065','32961','84919', - '61997','99132','22815','56600','68730', - '48017','95694','32919','88217','27116', - '28239','58032','18884','16791','21343', - '97462','18569','75660','15475') - intersect - select ca_zip - from (SELECT substr(ca_zip,1,5) ca_zip,count(*) cnt - FROM customer_address, customer - WHERE ca_address_sk = c_current_addr_sk and - c_preferred_cust_flag='Y' - group by ca_zip - having count(*) > 10)A1)A2) V1 - where ss_store_sk = s_store_sk - and ss_sold_date_sk = d_date_sk - and d_qoy = 2 and d_year = 1998 - and (substr(s_zip,1,2) = substr(V1.ca_zip,1,2)) - group by s_store_name - order by s_store_name - limit 100""" - qt_ds_shape_8 ''' - explain shape plan - select s_store_name - ,sum(ss_net_profit) - from store_sales - ,date_dim - ,store, - (select ca_zip - from ( - SELECT substr(ca_zip,1,5) ca_zip - FROM customer_address - WHERE substr(ca_zip,1,5) IN ( - '47602','16704','35863','28577','83910','36201', - '58412','48162','28055','41419','80332', - '38607','77817','24891','16226','18410', - '21231','59345','13918','51089','20317', - '17167','54585','67881','78366','47770', - '18360','51717','73108','14440','21800', - '89338','45859','65501','34948','25973', - '73219','25333','17291','10374','18829', - '60736','82620','41351','52094','19326', - '25214','54207','40936','21814','79077', - '25178','75742','77454','30621','89193', - '27369','41232','48567','83041','71948', - '37119','68341','14073','16891','62878', - '49130','19833','24286','27700','40979', - '50412','81504','94835','84844','71954', - '39503','57649','18434','24987','12350', - '86379','27413','44529','98569','16515', - '27287','24255','21094','16005','56436', - '91110','68293','56455','54558','10298', - '83647','32754','27052','51766','19444', - '13869','45645','94791','57631','20712', - '37788','41807','46507','21727','71836', - '81070','50632','88086','63991','20244', - '31655','51782','29818','63792','68605', - '94898','36430','57025','20601','82080', - '33869','22728','35834','29086','92645', - '98584','98072','11652','78093','57553', - '43830','71144','53565','18700','90209', - '71256','38353','54364','28571','96560', - '57839','56355','50679','45266','84680', - '34306','34972','48530','30106','15371', - '92380','84247','92292','68852','13338', - '34594','82602','70073','98069','85066', - '47289','11686','98862','26217','47529', - '63294','51793','35926','24227','14196', - '24594','32489','99060','49472','43432', - '49211','14312','88137','47369','56877', - '20534','81755','15794','12318','21060', - '73134','41255','63073','81003','73873', - '66057','51184','51195','45676','92696', - '70450','90669','98338','25264','38919', - '59226','58581','60298','17895','19489', - '52301','80846','95464','68770','51634', - '19988','18367','18421','11618','67975', - '25494','41352','95430','15734','62585', - '97173','33773','10425','75675','53535', - '17879','41967','12197','67998','79658', - '59130','72592','14851','43933','68101', - '50636','25717','71286','24660','58058', - '72991','95042','15543','33122','69280', - '11912','59386','27642','65177','17672', - '33467','64592','36335','54010','18767', - '63193','42361','49254','33113','33159', - '36479','59080','11855','81963','31016', - '49140','29392','41836','32958','53163', - '13844','73146','23952','65148','93498', - '14530','46131','58454','13376','13378', - '83986','12320','17193','59852','46081', - '98533','52389','13086','68843','31013', - '13261','60560','13443','45533','83583', - '11489','58218','19753','22911','25115', - '86709','27156','32669','13123','51933', - '39214','41331','66943','14155','69998', - '49101','70070','35076','14242','73021', - '59494','15782','29752','37914','74686', - '83086','34473','15751','81084','49230', - '91894','60624','17819','28810','63180', - '56224','39459','55233','75752','43639', - '55349','86057','62361','50788','31830', - '58062','18218','85761','60083','45484', - '21204','90229','70041','41162','35390', - '16364','39500','68908','26689','52868', - '81335','40146','11340','61527','61794', - '71997','30415','59004','29450','58117', - '69952','33562','83833','27385','61860', - '96435','48333','23065','32961','84919', - '61997','99132','22815','56600','68730', - '48017','95694','32919','88217','27116', - '28239','58032','18884','16791','21343', - '97462','18569','75660','15475') - intersect - select ca_zip - from (SELECT substr(ca_zip,1,5) ca_zip,count(*) cnt - FROM customer_address, customer - WHERE ca_address_sk = c_current_addr_sk and - c_preferred_cust_flag='Y' - group by ca_zip - having count(*) > 10)A1)A2) V1 - where ss_store_sk = s_store_sk - and ss_sold_date_sk = d_date_sk - and d_qoy = 2 and d_year = 1998 - and (substr(s_zip,1,2) = substr(V1.ca_zip,1,2)) - group by s_store_name - order by s_store_name - limit 100 - ''' -} diff --git a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query91.groovy b/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query91.groovy deleted file mode 100644 index b384ac1a96eb313..000000000000000 --- a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query91.groovy +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -suite("query91") { - String db = context.config.getDbNameByFile(new File(context.file.parent)) - sql "use ${db}" - sql 'set enable_nereids_planner=true' - sql 'set enable_nereids_distribute_planner=true' - sql 'set enable_fallback_to_original_planner=false' - sql 'set exec_mem_limit=21G' - sql 'set be_number_for_test=3' - sql 'set parallel_fragment_exec_instance_num=8; ' - sql 'set parallel_pipeline_task_num=8; ' - sql 'set forbid_unknown_col_stats=true' - sql 'set enable_nereids_timeout = false' - sql 'set enable_runtime_filter_prune=false' - sql 'set runtime_filter_type=8' - sql 'set dump_nereids_memo=false' - sql 'set enable_bucket_shuffle_downgrade=true' - sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION" - def ds = """select - cc_call_center_id Call_Center, - cc_name Call_Center_Name, - cc_manager Manager, - sum(cr_net_loss) Returns_Loss -from - call_center, - catalog_returns, - date_dim, - customer, - customer_address, - customer_demographics, - household_demographics -where - cr_call_center_sk = cc_call_center_sk -and cr_returned_date_sk = d_date_sk -and cr_returning_customer_sk= c_customer_sk -and cd_demo_sk = c_current_cdemo_sk -and hd_demo_sk = c_current_hdemo_sk -and ca_address_sk = c_current_addr_sk -and d_year = 2000 -and d_moy = 12 -and ( (cd_marital_status = 'M' and cd_education_status = 'Unknown') - or(cd_marital_status = 'W' and cd_education_status = 'Advanced Degree')) -and hd_buy_potential like 'Unknown%' -and ca_gmt_offset = -7 -group by cc_call_center_id,cc_name,cc_manager,cd_marital_status,cd_education_status -order by sum(cr_net_loss) desc""" - qt_ds_shape_91 ''' - explain shape plan - select - cc_call_center_id Call_Center, - cc_name Call_Center_Name, - cc_manager Manager, - sum(cr_net_loss) Returns_Loss -from - call_center, - catalog_returns, - date_dim, - customer, - customer_address, - customer_demographics, - household_demographics -where - cr_call_center_sk = cc_call_center_sk -and cr_returned_date_sk = d_date_sk -and cr_returning_customer_sk= c_customer_sk -and cd_demo_sk = c_current_cdemo_sk -and hd_demo_sk = c_current_hdemo_sk -and ca_address_sk = c_current_addr_sk -and d_year = 2000 -and d_moy = 12 -and ( (cd_marital_status = 'M' and cd_education_status = 'Unknown') - or(cd_marital_status = 'W' and cd_education_status = 'Advanced Degree')) -and hd_buy_potential like 'Unknown%' -and ca_gmt_offset = -7 -group by cc_call_center_id,cc_name,cc_manager,cd_marital_status,cd_education_status -order by sum(cr_net_loss) desc - ''' -} diff --git a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query95.groovy b/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query95.groovy deleted file mode 100644 index f96aa47c844be44..000000000000000 --- a/regression-test/suites/new_shapes_p0/tpcds_sf1000/bs_downgrade_shape/query95.groovy +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -suite("query95") { - String db = context.config.getDbNameByFile(new File(context.file.parent)) - sql "use ${db}" - sql 'set enable_nereids_planner=true' - sql 'set enable_nereids_distribute_planner=true' - sql 'set enable_fallback_to_original_planner=false' - sql 'set exec_mem_limit=21G' - sql 'set be_number_for_test=3' - sql 'set parallel_fragment_exec_instance_num=8; ' - sql 'set parallel_pipeline_task_num=8; ' - sql 'set forbid_unknown_col_stats=true' - sql 'set enable_nereids_timeout = false' - sql 'set enable_runtime_filter_prune=false' - sql 'set runtime_filter_type=8' - sql 'set dump_nereids_memo=false' - sql 'set enable_bucket_shuffle_downgrade=true' - sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION" - def ds = """with ws_wh as -(select ws1.ws_order_number,ws1.ws_warehouse_sk wh1,ws2.ws_warehouse_sk wh2 - from web_sales ws1,web_sales ws2 - where ws1.ws_order_number = ws2.ws_order_number - and ws1.ws_warehouse_sk <> ws2.ws_warehouse_sk) - select - count(distinct ws_order_number) as "order count" - ,sum(ws_ext_ship_cost) as "total shipping cost" - ,sum(ws_net_profit) as "total net profit" -from - web_sales ws1 - ,date_dim - ,customer_address - ,web_site -where - d_date between '2001-4-01' and - (cast('2001-4-01' as date) + interval 60 day) -and ws1.ws_ship_date_sk = d_date_sk -and ws1.ws_ship_addr_sk = ca_address_sk -and ca_state = 'VA' -and ws1.ws_web_site_sk = web_site_sk -and web_company_name = 'pri' -and ws1.ws_order_number in (select ws_order_number - from ws_wh) -and ws1.ws_order_number in (select wr_order_number - from web_returns,ws_wh - where wr_order_number = ws_wh.ws_order_number) -order by count(distinct ws_order_number) -limit 100""" - qt_ds_shape_95 ''' - explain shape plan - with ws_wh as -(select ws1.ws_order_number,ws1.ws_warehouse_sk wh1,ws2.ws_warehouse_sk wh2 - from web_sales ws1,web_sales ws2 - where ws1.ws_order_number = ws2.ws_order_number - and ws1.ws_warehouse_sk <> ws2.ws_warehouse_sk) - select - count(distinct ws_order_number) as "order count" - ,sum(ws_ext_ship_cost) as "total shipping cost" - ,sum(ws_net_profit) as "total net profit" -from - web_sales ws1 - ,date_dim - ,customer_address - ,web_site -where - d_date between '2001-4-01' and - (cast('2001-4-01' as date) + interval 60 day) -and ws1.ws_ship_date_sk = d_date_sk -and ws1.ws_ship_addr_sk = ca_address_sk -and ca_state = 'VA' -and ws1.ws_web_site_sk = web_site_sk -and web_company_name = 'pri' -and ws1.ws_order_number in (select ws_order_number - from ws_wh) -and ws1.ws_order_number in (select wr_order_number - from web_returns,ws_wh - where wr_order_number = ws_wh.ws_order_number) -order by count(distinct ws_order_number) -limit 100 - ''' -}