forked from apache/doris
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
199 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query23_2.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
-- This file is automatically generated. You should know what you did if you want to edit this | ||
-- !ds_shape_23_2 -- | ||
PhysicalCteAnchor ( cteId=CTEId#0 ) | ||
--PhysicalCteProducer ( cteId=CTEId#0 ) | ||
----PhysicalProject | ||
------filter((cnt > 4)) | ||
--------hashAgg[GLOBAL] | ||
----------PhysicalDistribute[DistributionSpecHash] | ||
------------hashAgg[LOCAL] | ||
--------------PhysicalProject | ||
----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] | ||
------------------PhysicalProject | ||
--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] | ||
----------------------PhysicalProject | ||
------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 | ||
----------------------PhysicalProject | ||
------------------------filter(d_year IN (2000, 2001, 2002, 2003)) | ||
--------------------------PhysicalOlapScan[date_dim] | ||
------------------PhysicalProject | ||
--------------------PhysicalOlapScan[item] | ||
--PhysicalCteAnchor ( cteId=CTEId#2 ) | ||
----PhysicalCteProducer ( cteId=CTEId#2 ) | ||
------PhysicalProject | ||
--------NestedLoopJoin[INNER_JOIN](cast(ssales as DOUBLE) > cast((0.9500 * tpcds_cmax) as DOUBLE)) | ||
----------PhysicalProject | ||
------------hashAgg[GLOBAL] | ||
--------------PhysicalDistribute[DistributionSpecHash] | ||
----------------hashAgg[LOCAL] | ||
------------------PhysicalProject | ||
--------------------filter(( not ss_customer_sk IS NULL)) | ||
----------------------PhysicalOlapScan[store_sales] | ||
----------PhysicalProject | ||
------------hashAgg[GLOBAL] | ||
--------------PhysicalDistribute[DistributionSpecGather] | ||
----------------hashAgg[LOCAL] | ||
------------------PhysicalProject | ||
--------------------hashAgg[GLOBAL] | ||
----------------------PhysicalDistribute[DistributionSpecHash] | ||
------------------------hashAgg[LOCAL] | ||
--------------------------PhysicalProject | ||
----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] | ||
------------------------------PhysicalProject | ||
--------------------------------filter(( not ss_customer_sk IS NULL)) | ||
----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 | ||
------------------------------PhysicalProject | ||
--------------------------------filter(d_year IN (2000, 2001, 2002, 2003)) | ||
----------------------------------PhysicalOlapScan[date_dim] | ||
----PhysicalResultSink | ||
------PhysicalTopN[MERGE_SORT] | ||
--------PhysicalDistribute[DistributionSpecGather] | ||
----------PhysicalTopN[LOCAL_SORT] | ||
------------PhysicalProject | ||
--------------hashJoin[INNER_JOIN shuffle] hashCondition=((cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 cs_bill_customer_sk->[c_customer_sk] | ||
----------------PhysicalProject | ||
------------------PhysicalOlapScan[customer] apply RFs: RF5 | ||
----------------PhysicalProject | ||
------------------PhysicalUnion | ||
--------------------hashAgg[GLOBAL] | ||
----------------------PhysicalDistribute[DistributionSpecHash] | ||
------------------------hashAgg[LOCAL] | ||
--------------------------PhysicalProject | ||
----------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() | ||
------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() | ||
--------------------------------PhysicalProject | ||
----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] | ||
------------------------------------PhysicalProject | ||
--------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 | ||
------------------------------------PhysicalProject | ||
--------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) | ||
----------------------------------------PhysicalOlapScan[date_dim] | ||
--------------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) | ||
------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) | ||
--------------------hashAgg[GLOBAL] | ||
----------------------PhysicalDistribute[DistributionSpecHash] | ||
------------------------hashAgg[LOCAL] | ||
--------------------------PhysicalProject | ||
----------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() | ||
------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() | ||
--------------------------------PhysicalProject | ||
----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] | ||
------------------------------------PhysicalProject | ||
--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 | ||
------------------------------------PhysicalProject | ||
--------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) | ||
----------------------------------------PhysicalOlapScan[date_dim] | ||
--------------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) | ||
------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) | ||
|
102 changes: 102 additions & 0 deletions
102
regression-test/suites/nereids_tpcds_shape_sf100_p0/shape/query23_2.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
/* | ||
* 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("query23_2") { | ||
String db = context.config.getDbNameByFile(new File(context.file.parent)) | ||
multi_sql """ | ||
use ${db}; | ||
set enable_nereids_planner=true; | ||
set enable_nereids_distribute_planner=false; | ||
set enable_fallback_to_original_planner=false; | ||
set exec_mem_limit=21G; | ||
set be_number_for_test=3; | ||
set enable_runtime_filter_prune=false; | ||
set parallel_pipeline_task_num=8; | ||
set forbid_unknown_col_stats=false; | ||
set enable_stats=true; | ||
set runtime_filter_type=8; | ||
set broadcast_row_count_limit = 30000000; | ||
set enable_nereids_timeout = false; | ||
set enable_pipeline_engine = true; | ||
set disable_nereids_rules='PRUNE_EMPTY_PARTITION'; | ||
set push_topn_to_agg = true; | ||
set topn_opt_limit_threshold=1024; | ||
""" | ||
|
||
def ds = """ | ||
with frequent_ss_items as | ||
(select substr(i_item_desc,1,30) itemdesc,i_item_sk item_sk,d_date solddate,count(*) cnt | ||
from store_sales | ||
,date_dim | ||
,item | ||
where ss_sold_date_sk = d_date_sk | ||
and ss_item_sk = i_item_sk | ||
and d_year in (2000,2000 + 1,2000 + 2,2000 + 3) | ||
group by substr(i_item_desc,1,30),i_item_sk,d_date | ||
having count(*) >4), | ||
max_store_sales as | ||
(select max(csales) tpcds_cmax | ||
from (select c_customer_sk,sum(ss_quantity*ss_sales_price) csales | ||
from store_sales | ||
,customer | ||
,date_dim | ||
where ss_customer_sk = c_customer_sk | ||
and ss_sold_date_sk = d_date_sk | ||
and d_year in (2000,2000+1,2000+2,2000+3) | ||
group by c_customer_sk) t), | ||
best_ss_customer as | ||
(select c_customer_sk,sum(ss_quantity*ss_sales_price) ssales | ||
from store_sales | ||
,customer | ||
where ss_customer_sk = c_customer_sk | ||
group by c_customer_sk | ||
having sum(ss_quantity*ss_sales_price) > (95/100.0) * (select | ||
* | ||
from max_store_sales)) | ||
select c_last_name,c_first_name,sales | ||
from (select c_last_name,c_first_name,sum(cs_quantity*cs_list_price) sales | ||
from catalog_sales | ||
,customer | ||
,date_dim | ||
where d_year = 2000 | ||
and d_moy = 5 | ||
and cs_sold_date_sk = d_date_sk | ||
and cs_item_sk in (select item_sk from frequent_ss_items) | ||
and cs_bill_customer_sk in (select c_customer_sk from best_ss_customer) | ||
and cs_bill_customer_sk = c_customer_sk | ||
group by c_last_name,c_first_name | ||
union all | ||
select c_last_name,c_first_name,sum(ws_quantity*ws_list_price) sales | ||
from web_sales | ||
,customer | ||
,date_dim | ||
where d_year = 2000 | ||
and d_moy = 5 | ||
and ws_sold_date_sk = d_date_sk | ||
and ws_item_sk in (select item_sk from frequent_ss_items) | ||
and ws_bill_customer_sk in (select c_customer_sk from best_ss_customer) | ||
and ws_bill_customer_sk = c_customer_sk | ||
group by c_last_name,c_first_name) t2 | ||
order by c_last_name,c_first_name,sales | ||
limit 100;""" | ||
qt_ds_shape_23_2 """ | ||
explain shape plan | ||
${ds} | ||
""" | ||
} |