You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2026/10/22 03:20:48 UTC
(doris) branch branch-4.1 updated: branch-4.1 [fix](hbo) delete hbo related regression cases (#69397)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new 12f8785ec69 branch-4.1 [fix](hbo) delete hbo related regression cases (#69397)
12f8785ec69 is described below
commit 12f8785ec6915c7b7f6631498a0de8a41286d9b0
Author: minghong <zh...@selectdb.com>
AuthorDate: Thu Oct 22 11:20:40 2026 +0800
branch-4.1 [fix](hbo) delete hbo related regression cases (#69397)
### What problem does this PR solve?
Delete hbo cases
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
---
.../nereids_p0/hbo/hbo_agg_stage_opt_test.groovy | 74 ----
.../nereids_p0/hbo/hbo_cache_usability_test.groovy | 420 ---------------------
.../nereids_p0/hbo/hbo_data_maintain_test.groovy | 150 --------
.../nereids_p0/hbo/hbo_join_side_opt_test.groovy | 91 -----
.../hbo/hbo_parameterization_test.groovy | 282 --------------
.../suites/nereids_p0/hbo/hbo_rf_safe_test.groovy | 94 -----
.../hbo/hbo_skew_shuffle_to_bc_test.groovy | 95 -----
.../nereids_p0/hbo/hbo_slow_query_test.groovy | 74 ----
8 files changed, 1280 deletions(-)
diff --git a/regression-test/suites/nereids_p0/hbo/hbo_agg_stage_opt_test.groovy b/regression-test/suites/nereids_p0/hbo/hbo_agg_stage_opt_test.groovy
deleted file mode 100644
index 18449b85a01..00000000000
--- a/regression-test/suites/nereids_p0/hbo/hbo_agg_stage_opt_test.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("hbo_agg_stage_opt_test", "nonConcurrent") {
- sql "create database if not exists hbo_test;"
- sql "use hbo_test;"
-
- sql """drop table if exists hbo_agg_stage_opt_test;"""
- sql """create table hbo_agg_stage_opt_test(a int, b int, c int, d int) distributed by hash(a) buckets 32 properties("replication_num"="1");"""
- sql """insert into hbo_agg_stage_opt_test select 1,1,1,1 from numbers("number" = "10000000");"""
- sql """analyze table hbo_agg_stage_opt_test with full with sync;"""
- sql """alter table hbo_agg_stage_opt_test modify column a set stats('row_count'='10000000', 'ndv'='10000000', 'num_nulls'='0', 'min_value'='1', 'max_value'='10000000', 'data_size'='2.3043232E7');"""
- sql """alter table hbo_agg_stage_opt_test modify column b set stats('row_count'='10000000', 'ndv'='10000000', 'num_nulls'='0', 'min_value'='1', 'max_value'='10000000', 'data_size'='2.3043232E7');"""
- sql """alter table hbo_agg_stage_opt_test modify column c set stats('row_count'='10000000', 'ndv'='10000000', 'num_nulls'='0', 'min_value'='1', 'max_value'='10000000', 'data_size'='2.3043232E7');"""
- sql """alter table hbo_agg_stage_opt_test modify column d set stats('row_count'='10000000', 'ndv'='10000000', 'num_nulls'='0', 'min_value'='1', 'max_value'='10000000', 'data_size'='2.3043232E7');"""
- sql "set hbo_rfsafe_threshold=1.0;"
- sql "set enable_hbo_optimization=false;";
- sql "set global enable_hbo_info_collection=true;";
- sql """ ADMIN SET ALL FRONTENDS CONFIG ("hbo_slow_query_threshold_ms" = "10"); """
- /**
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 5.633333343543334E8 |
- | PhysicalResultSink[165] ( outputExprs=[b#1, c#2, __count_2#4] ) |
- | +--PhysicalDistribute[160]@2 ( stats=100,000,000, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[155]@2 ( stats=100,000,000, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[b#1, c#2], outputExpr=[b#1, c#2, count(partial_count(*)#5) AS `count(*)`#4], partitionExpr=Optional[[b#1, c#2]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[150]@4 ( stats=100,000,000, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[1, 2], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[1], [2]], exprIdToEquivalenceSet={1=0, 2=1} ) ) |
- | +--PhysicalHashAggregate[145]@4 ( stats=100,000,000, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[b#1, c#2], outputExpr=[b#1, c#2, partial_count(*) AS `partial_count(*)`#5], partitionExpr=Optional[[b#1, c#2]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[140]@1 ( stats=100,000,000, projects=[b#1, c#2] ) |
- | +--PhysicalOlapScan[hbo_agg_stage_opt_test]@0 ( stats=100,000,000 )
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select b, c, count(1) from hbo_agg_stage_opt_test group by b, c;"
- contains("stats=10,000,000, aggPhase=GLOBAL")
- }
-
- sql "select b, c, count(1) from hbo_agg_stage_opt_test group by b, c;"
- sleep(3000)
- sql "set enable_hbo_optimization=true;";
- /**
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 3.0000000365433335E8 |
- | PhysicalResultSink[165] ( outputExprs=[b#1, c#2, __count_2#4] ) |
- | +--PhysicalDistribute[160]@2 ( stats=(hbo)1, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[155]@2 ( stats=(hbo)1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[b#1, c#2], outputExpr=[b#1, c#2, count(partial_count(*)#5) AS `count(*)`#4], partitionExpr=Optional[[b#1, c#2]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[150]@4 ( stats=(hbo)1, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[1, 2], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[1], [2]], exprIdToEquivalenceSet={1=0, 2=1} ) ) |
- | +--PhysicalHashAggregate[145]@4 ( stats=(hbo)1, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[b#1, c#2], outputExpr=[b#1, c#2, partial_count(*) AS `partial_count(*)`#5], partitionExpr=Optional[[b#1, c#2]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[140]@1 ( stats=100,000,000, projects=[b#1, c#2] ) |
- | +--PhysicalOlapScan[hbo_agg_stage_opt_test]@0 ( stats=100,000,000 )
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+*/
- explain {
- sql "physical plan select b, c, count(1) from hbo_agg_stage_opt_test group by b, c;"
- contains("stats=(hbo)1, aggPhase=GLOBAL")
- }
-
-}
diff --git a/regression-test/suites/nereids_p0/hbo/hbo_cache_usability_test.groovy b/regression-test/suites/nereids_p0/hbo/hbo_cache_usability_test.groovy
deleted file mode 100644
index e6198fb3a72..00000000000
--- a/regression-test/suites/nereids_p0/hbo/hbo_cache_usability_test.groovy
+++ /dev/null
@@ -1,420 +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("hbo_cache_usability_test", "nonConcurrent") {
- sql "create database if not exists hbo_test;"
- sql "use hbo_test;"
-
- sql "drop table if exists cache_usability_store_sales_p;"
- sql """CREATE TABLE `cache_usability_store_sales_p` (
- `ss_item_sk` bigint NOT NULL,
- `ss_ticket_number` bigint NOT NULL,
- `ss_sold_date_sk` bigint NULL,
- `ss_customer_sk` bigint NULL,
- `ss_store_sk` bigint NULL,
- `ss_wholesale_cost` decimal(7,2) NULL,
- `ss_list_price` decimal(7,2) NULL
- ) ENGINE=OLAP
- DUPLICATE KEY(`ss_item_sk`, `ss_ticket_number`)
- PARTITION BY RANGE(`ss_sold_date_sk`)
- (
- PARTITION `p1` VALUES LESS THAN ("2450846"),
- PARTITION `p2` VALUES LESS THAN ("2450874"),
- PARTITION `p3` VALUES LESS THAN ("2450905"),
- PARTITION `p4` VALUES LESS THAN ("2450935"),
- PARTITION `p5` VALUES LESS THAN ("2450966"),
- PARTITION `p6` VALUES LESS THAN ("2450996"),
- PARTITION `p7` VALUES LESS THAN ("2451027"),
- PARTITION `p8` VALUES LESS THAN ("2451058"),
- PARTITION `p9` VALUES LESS THAN ("2451088"),
- PARTITION `p10` VALUES LESS THAN ("2451119"),
- PARTITION `p11` VALUES LESS THAN ("2451149"),
- PARTITION `p12` VALUES LESS THAN ("2451180"),
- PARTITION `p13` VALUES LESS THAN ("2451211"),
- PARTITION `p14` VALUES LESS THAN ("2451239"),
- PARTITION `p15` VALUES LESS THAN ("2451270"),
- PARTITION `p16` VALUES LESS THAN ("2451300"),
- PARTITION `p17` VALUES LESS THAN ("2451331"),
- PARTITION `p18` VALUES LESS THAN ("2451361"),
- PARTITION `p19` VALUES LESS THAN ("2451392"),
- PARTITION `p20` VALUES LESS THAN ("2451423"),
- PARTITION `p21` VALUES LESS THAN ("2451453"),
- PARTITION `p22` VALUES LESS THAN ("2451484"),
- PARTITION `p23` VALUES LESS THAN ("2451514"),
- PARTITION `p24` VALUES LESS THAN ("2451545"),
- PARTITION `p25` VALUES LESS THAN ("2451576"),
- PARTITION `p26` VALUES LESS THAN ("2451605"),
- PARTITION `p27` VALUES LESS THAN ("2451635"),
- PARTITION `p28` VALUES LESS THAN ("2451666"),
- PARTITION `p29` VALUES LESS THAN ("2451696"),
- PARTITION `p30` VALUES LESS THAN ("2451726"),
- PARTITION `p31` VALUES LESS THAN ("2451756"),
- PARTITION `p32` VALUES LESS THAN ("2451787"),
- PARTITION `p33` VALUES LESS THAN ("2451817"),
- PARTITION `p34` VALUES LESS THAN ("2451848"),
- PARTITION `p35` VALUES LESS THAN ("2451877"),
- PARTITION `p36` VALUES LESS THAN ("2451906"),
- PARTITION `p37` VALUES LESS THAN ("2451937"),
- PARTITION `p38` VALUES LESS THAN ("2451968"),
- PARTITION `p39` VALUES LESS THAN ("2451999"),
- PARTITION `p40` VALUES LESS THAN ("2452031"),
- PARTITION `p41` VALUES LESS THAN ("2452062"),
- PARTITION `p42` VALUES LESS THAN ("2452092"),
- PARTITION `p43` VALUES LESS THAN ("2452123"),
- PARTITION `p44` VALUES LESS THAN ("2452154"),
- PARTITION `p45` VALUES LESS THAN ("2452184"),
- PARTITION `p46` VALUES LESS THAN ("2452215"),
- PARTITION `p47` VALUES LESS THAN ("2452245"),
- PARTITION `p48` VALUES LESS THAN ("2452276"),
- PARTITION `p49` VALUES LESS THAN ("2452307"),
- PARTITION `p50` VALUES LESS THAN ("2452335"),
- PARTITION `p51` VALUES LESS THAN ("2452366"),
- PARTITION `p52` VALUES LESS THAN ("2452396"),
- PARTITION `p53` VALUES LESS THAN ("2452427"),
- PARTITION `p54` VALUES LESS THAN ("2452457"),
- PARTITION `p55` VALUES LESS THAN ("2452488"),
- PARTITION `p56` VALUES LESS THAN ("2452519"),
- PARTITION `p57` VALUES LESS THAN ("2452549"),
- PARTITION `p58` VALUES LESS THAN ("2452580"),
- PARTITION `p59` VALUES LESS THAN ("2452610"),
- PARTITION `p60` VALUES LESS THAN ("2452641"),
- PARTITION `p61` VALUES LESS THAN ("2452672"),
- PARTITION `p62` VALUES LESS THAN ("2452700"),
- PARTITION `p63` VALUES LESS THAN ("2452731"),
- PARTITION `p64` VALUES LESS THAN ("2452761"),
- PARTITION `p65` VALUES LESS THAN ("2452792"),
- PARTITION `p66` VALUES LESS THAN ("2452822"),
- PARTITION `p67` VALUES LESS THAN ("2452853"),
- PARTITION `p68` VALUES LESS THAN ("2452884"),
- PARTITION `p69` VALUES LESS THAN ("2452914"),
- PARTITION `p70` VALUES LESS THAN ("2452945"),
- PARTITION `p71` VALUES LESS THAN ("2452975"),
- PARTITION `p72` VALUES LESS THAN (MAXVALUE)
- )
- DISTRIBUTED BY HASH(ss_item_sk, ss_ticket_number) BUCKETS 1
- PROPERTIES (
- "replication_num" = "1"
- );"""
-
- sql "drop table if exists cache_usability_date_dim;"
- sql """CREATE TABLE `cache_usability_date_dim` (
- `d_date_sk` bigint NOT NULL,
- `d_date_id` char(16) NOT NULL,
- `d_date` date NULL,
- `d_year` int NULL,
- `d_dow` int NULL,
- `d_moy` int NULL,
- ) ENGINE=OLAP
- DUPLICATE KEY(`d_date_sk`)
- DISTRIBUTED BY HASH(`d_date_sk`) BUCKETS 12
- PROPERTIES (
- "replication_num" = "1"
- );"""
-
- sql "drop table if exists cache_usability_item;"
- sql """CREATE TABLE `cache_usability_item` (
- `i_item_sk` bigint NOT NULL,
- `i_item_id` char(16) NOT NULL,
- `i_brand_id` int NULL,
- `i_brand` char(50) NULL
- ) ENGINE=OLAP
- DUPLICATE KEY(`i_item_sk`)
- DISTRIBUTED BY HASH(`i_item_sk`) BUCKETS 12
- PROPERTIES (
- "replication_num" = "1"
- );"""
-
- sql "set disable_nereids_rules='PRUNE_EMPTY_PARTITION,OPERATIVE_COLUMN_DERIVE';"
- sql "set hbo_rfsafe_threshold=1.0;"
- sql """ ADMIN SET ALL FRONTENDS CONFIG ("hbo_slow_query_threshold_ms" = "10"); """
- sql "set enable_hbo_optimization=false;"
- sql "set global enable_hbo_info_collection=true;"
- /**
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 9.635753333333332 |
- | PhysicalResultSink[513] ( outputExprs=[ss_store_sk#4, __count_1#13] ) |
- | +--PhysicalDistribute[508]@8 ( stats=1, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[503]@8 ( stats=1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, count(partial_count(*)#14) AS `count(*)`#13], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[498]@10 ( stats=1, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[4], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[4]], exprIdToEquivalenceSet={4=0} ) ) |
- | +--PhysicalHashAggregate[493]@10 ( stats=1, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, partial_count(*) AS `partial_count(*)`#14], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[488]@7 ( stats=1, projects=[ss_store_sk#4] ) |
- | +--PhysicalHashJoin[483]@6 ( stats=1, type=INNER_JOIN, hashCondition=[(ss_sold_date_sk#2 = d_date_sk#7)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[ss_sold_date_sk#2->[d_date_sk#7](ndv/size = 1/1) , RF1[ss_sold_date_sk#2->[d_date_sk#7](ndv/size = 1/1) ] ) |
- | |--PhysicalProject[462]@5 ( stats=0.25, projects=[d_date_sk#7] ) |
- | | +--PhysicalFilter[457]@4 ( stats=0.25, predicates=AND[(d_date_sk#7 >= 2451100),(d_date_sk#7 <= 2451200)] ) |
- | | +--PhysicalOlapScan[cache_usability_date_dim]@3 ( stats=1, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[478]@2 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[2], shuffleType=STORAGE_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[2]], exprIdToEquivalenceSet={2=0} ) ) |
- | +--PhysicalProject[473]@2 ( stats=0, projects=[ss_sold_date_sk#2, ss_store_sk#4] ) |
- | +--PhysicalFilter[468]@1 ( stats=0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)] ) |
- | +--PhysicalOlapScan[cache_usability_store_sales_p partitions(4/72)]@0 ( stats=0 )
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select ss_store_sk, count(1) from cache_usability_store_sales_p, cache_usability_date_dim where ss_sold_date_sk = d_date_sk and ss_sold_date_sk between 2451100 and 2451200 group by ss_store_sk;"
- contains("stats=1, type=INNER_JOIN")
- contains("stats=1, aggPhase=GLOBAL")
- }
-
- sql "set enable_hbo_optimization=true;"
- sql "select ss_store_sk, count(1) from cache_usability_store_sales_p, cache_usability_date_dim where ss_sold_date_sk = d_date_sk and ss_sold_date_sk between 2451100 and 2451200 group by ss_store_sk;"
- sleep(3000)
- /**
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 4.02142 |
- | PhysicalResultSink[512] ( outputExprs=[ss_store_sk#4, __count_1#13] ) |
- | +--PhysicalDistribute[507]@8 ( stats=(hbo)0, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[502]@8 ( stats=(hbo)0, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, count(partial_count(*)#14) AS `count(*)`#13], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[497]@10 ( stats=(hbo)0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[4], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[4]], exprIdToEquivalenceSet={4=0} ) ) |
- | +--PhysicalHashAggregate[492]@10 ( stats=(hbo)0, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, partial_count(*) AS `partial_count(*)`#14], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[487]@7 ( stats=0, projects=[ss_store_sk#4] ) |
- | +--PhysicalHashJoin[482]@6 ( stats=(hbo)0, type=INNER_JOIN, hashCondition=[(ss_sold_date_sk#2 = d_date_sk#7)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[d_date_sk#7->[ss_sold_date_sk#2](ndv/size = 1/1) , RF1[d_date_sk#7->[ss_sold_date_sk#2](ndv/size = 1/1) ] ) |
- | |--PhysicalDistribute[461]@2 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[2], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[2]], exprIdToEquivalenceSet={2=0} ) ) |
- | | +--PhysicalProject[456]@2 ( stats=0, projects=[ss_sold_date_sk#2, ss_store_sk#4] ) |
- | | +--PhysicalFilter[451]@1 ( stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)] ) |
- | | +--PhysicalOlapScan[cache_usability_store_sales_p partitions(4/72)]@0 ( stats=0, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[477]@5 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[7], shuffleType=EXECUTION_BUCKETED, tableId=1743665221969, selectedIndexId=1743665221970, partitionIds=[1743665221968], equivalenceExprIds=[[7]], exprIdToEquivalenceSet={7=0} ) ) |
- | +--PhysicalProject[472]@5 ( stats=0, projects=[d_date_sk#7] ) |
- | +--PhysicalFilter[467]@4 ( stats=(hbo)0, predicates=AND[(d_date_sk#7 >= 2451100),(d_date_sk#7 <= 2451200)] ) |
- | +--PhysicalOlapScan[cache_usability_date_dim]@3 ( stats=1 )
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select ss_store_sk, count(1) from cache_usability_store_sales_p, cache_usability_date_dim where ss_sold_date_sk = d_date_sk and ss_sold_date_sk between 2451100 and 2451200 group by ss_store_sk;"
- contains("stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)]")
- contains("stats=(hbo)0, predicates=AND[(d_date_sk#7 >= 2451100),(d_date_sk#7 <= 2451200)]")
- contains("stats=(hbo)0, type=INNER_JOIN")
- contains("stats=(hbo)0, aggPhase=GLOBAL")
- }
-
- /**
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 10.384593333333333 |
- | PhysicalResultSink[466] ( outputExprs=[ss_store_sk#4, __count_1#11] ) |
- | +--PhysicalDistribute[461]@7 ( stats=1, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[456]@7 ( stats=1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, count(partial_count(*)#12) AS `count(*)`#11], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[451]@9 ( stats=1, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[4], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[4]], exprIdToEquivalenceSet={4=0} ) ) |
- | +--PhysicalHashAggregate[446]@9 ( stats=1, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, partial_count(*) AS `partial_count(*)`#12], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[441]@6 ( stats=1, projects=[ss_store_sk#4] ) |
- | +--PhysicalHashJoin[436]@5 ( stats=1, type=INNER_JOIN, hashCondition=[(ss_item_sk#0 = i_item_sk#7)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[ss_item_sk#0->[i_item_sk#7](ndv/size = 1/1) , RF1[ss_item_sk#0->[i_item_sk#7](ndv/size = 1/1) ] ) |
- | |--PhysicalProject[415]@4 ( stats=1, projects=[i_item_sk#7] ) |
- | | +--PhysicalOlapScan[cache_usability_item]@3 ( stats=1, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[431]@2 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[0], shuffleType=STORAGE_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0]], exprIdToEquivalenceSet={0=0} ) ) |
- | +--PhysicalProject[426]@2 ( stats=0, projects=[ss_item_sk#0, ss_store_sk#4] ) |
- | +--PhysicalFilter[421]@1 ( stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)] ) |
- | +--PhysicalOlapScan[cache_usability_store_sales_p partitions(4/72)]@0 ( stats=0 )
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select ss_store_sk, count(1) from cache_usability_store_sales_p, cache_usability_item where ss_item_sk = i_item_sk and ss_sold_date_sk between 2451100 and 2451200 group by ss_store_sk;"
- contains("stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)]")
- }
-
- sql "select ss_store_sk, count(1) from cache_usability_store_sales_p, cache_usability_item where ss_item_sk = i_item_sk and ss_sold_date_sk between 2451100 and 2451200 group by ss_store_sk;"
- sleep(3000)
- /**
- +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 5.02126 |
- | PhysicalResultSink[463] ( outputExprs=[ss_store_sk#4, __count_1#11] ) |
- | +--PhysicalDistribute[458]@7 ( stats=(hbo)0, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[453]@7 ( stats=(hbo)0, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, count(partial_count(*)#12) AS `count(*)`#11], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[448]@9 ( stats=(hbo)0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[4], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[4]], exprIdToEquivalenceSet={4=0} ) ) |
- | +--PhysicalHashAggregate[443]@9 ( stats=(hbo)0, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, partial_count(*) AS `partial_count(*)`#12], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[438]@6 ( stats=0, projects=[ss_store_sk#4] ) |
- | +--PhysicalHashJoin[433]@5 ( stats=(hbo)0, type=INNER_JOIN, hashCondition=[(ss_item_sk#0 = i_item_sk#7)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[ss_item_sk#0->[i_item_sk#7](ndv/size = 1/1) , RF1[ss_item_sk#0->[i_item_sk#7](ndv/size = 1/1) ] ) |
- | |--PhysicalProject[412]@4 ( stats=1, projects=[i_item_sk#7] ) |
- | | +--PhysicalOlapScan[cache_usability_item]@3 ( stats=1, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[428]@2 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[0], shuffleType=STORAGE_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0]], exprIdToEquivalenceSet={0=0} ) ) |
- | +--PhysicalProject[423]@2 ( stats=0, projects=[ss_item_sk#0, ss_store_sk#4] ) |
- | +--PhysicalFilter[418]@1 ( stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)] ) |
- | +--PhysicalOlapScan[cache_usability_store_sales_p partitions(4/72)]@0 ( stats=0 )
- +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select ss_store_sk, count(1) from cache_usability_store_sales_p, cache_usability_item where ss_item_sk = i_item_sk and ss_sold_date_sk between 2451100 and 2451200 group by ss_store_sk;"
- contains("stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)]")
- contains("stats=(hbo)0, type=INNER_JOIN")
- contains("stats=(hbo)0, aggPhase=GLOBAL")
- }
-
- /**
- +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 5.02126 |
- | PhysicalResultSink[463] ( outputExprs=[ss_store_sk#4, __count_1#11] ) |
- | +--PhysicalDistribute[458]@7 ( stats=(hbo)0, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[453]@7 ( stats=(hbo)0, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, count(partial_count(*)#12) AS `count(*)`#11], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[448]@9 ( stats=(hbo)0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[4], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[4]], exprIdToEquivalenceSet={4=0} ) ) |
- | +--PhysicalHashAggregate[443]@9 ( stats=(hbo)0, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, partial_count(*) AS `partial_count(*)`#12], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[438]@6 ( stats=0, projects=[ss_store_sk#4] ) |
- | +--PhysicalHashJoin[433]@5 ( stats=(hbo)0, type=INNER_JOIN, hashCondition=[(ss_item_sk#0 = i_item_sk#7)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[ss_item_sk#0->[i_item_sk#7](ndv/size = 1/1) , RF1[ss_item_sk#0->[i_item_sk#7](ndv/size = 1/1) ] ) |
- | |--PhysicalProject[412]@4 ( stats=1, projects=[i_item_sk#7] ) |
- | | +--PhysicalOlapScan[cache_usability_item]@3 ( stats=1, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[428]@2 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[0], shuffleType=STORAGE_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0]], exprIdToEquivalenceSet={0=0} ) ) |
- | +--PhysicalProject[423]@2 ( stats=0, projects=[ss_item_sk#0, ss_store_sk#4] ) |
- | +--PhysicalFilter[418]@1 ( stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451101),(ss_sold_date_sk#2 <= 2451201)] ) |
- | +--PhysicalOlapScan[cache_usability_store_sales_p partitions(4/72)]@0 ( stats=0 )
- +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select ss_store_sk, count(1) from cache_usability_store_sales_p, cache_usability_item where ss_item_sk = i_item_sk and ss_sold_date_sk between 2451101 and 2451201 group by ss_store_sk;"
- contains("stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451101),(ss_sold_date_sk#2 <= 2451201)]")
- contains("stats=(hbo)0, type=INNER_JOIN")
- contains("stats=(hbo)0, aggPhase=LOCAL")
- contains("stats=(hbo)0, aggPhase=GLOBAL")
- }
-
- /**
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 9.448513333333333 |
- | PhysicalResultSink[526] ( outputExprs=[ss_store_sk#4, __count_1#13] ) |
- | +--PhysicalDistribute[521]@8 ( stats=1, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[516]@8 ( stats=1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, count(partial_count(*)#14) AS `count(*)`#13], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[511]@10 ( stats=1, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[4], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[4]], exprIdToEquivalenceSet={4=0} ) ) |
- | +--PhysicalHashAggregate[506]@10 ( stats=1, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, partial_count(*) AS `partial_count(*)`#14], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[501]@7 ( stats=1, projects=[ss_store_sk#4] ) |
- | +--PhysicalHashJoin[496]@6 ( stats=1, type=INNER_JOIN, hashCondition=[(ss_sold_date_sk#2 = d_date_sk#7)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[ss_sold_date_sk#2->[d_date_sk#7](ndv/size = 1/1) , RF1[ss_sold_date_sk#2->[d_date_sk#7](ndv/size = 1/1) ] ) |
- | |--PhysicalProject[475]@5 ( stats=0, projects=[d_date_sk#7] ) |
- | | +--PhysicalFilter[470]@4 ( stats=(hbo)0, predicates=AND[(d_date_sk#7 >= 2451100),(d_date_sk#7 <= 2451200),(d_moy#12 >= 2),(d_moy#12 <= 12)] ) |
- | | +--PhysicalOlapScan[cache_usability_date_dim]@3 ( stats=1, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[491]@2 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[2], shuffleType=STORAGE_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[2]], exprIdToEquivalenceSet={2=0} ) ) |
- | +--PhysicalProject[486]@2 ( stats=0, projects=[ss_sold_date_sk#2, ss_store_sk#4] ) |
- | +--PhysicalFilter[481]@1 ( stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)] ) |
- | +--PhysicalOlapScan[cache_usability_store_sales_p partitions(4/72)]@0 ( stats=0 )
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select ss_store_sk, count(1) from cache_usability_store_sales_p, cache_usability_date_dim where ss_sold_date_sk = d_date_sk and ss_sold_date_sk between 2451100 and 2451200 and d_moy between 2 and 12 group by ss_store_sk;"
- contains("stats=(hbo)0, predicates=AND[(d_date_sk#7 >= 2451100),(d_date_sk#7 <= 2451200),(d_moy#12 >= 2),(d_moy#12 <= 12)]")
- contains("stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)]")
- }
-
- sql "select ss_store_sk, count(1) from cache_usability_store_sales_p, cache_usability_date_dim where ss_sold_date_sk = d_date_sk and ss_sold_date_sk between 2451100 and 2451200 and d_moy between 2 and 12 group by ss_store_sk;"
- sleep(3000)
- /**
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 4.02168 |
- | PhysicalResultSink[525] ( outputExprs=[ss_store_sk#4, __count_1#13] ) |
- | +--PhysicalDistribute[520]@8 ( stats=(hbo)0, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[515]@8 ( stats=(hbo)0, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, count(partial_count(*)#14) AS `count(*)`#13], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[510]@10 ( stats=(hbo)0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[4], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[4]], exprIdToEquivalenceSet={4=0} ) ) |
- | +--PhysicalHashAggregate[505]@10 ( stats=(hbo)0, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, partial_count(*) AS `partial_count(*)`#14], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[500]@7 ( stats=0, projects=[ss_store_sk#4] ) |
- | +--PhysicalHashJoin[495]@6 ( stats=(hbo)0, type=INNER_JOIN, hashCondition=[(ss_sold_date_sk#2 = d_date_sk#7)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[d_date_sk#7->[ss_sold_date_sk#2](ndv/size = 1/1) , RF1[d_date_sk#7->[ss_sold_date_sk#2](ndv/size = 1/1) ] ) |
- | |--PhysicalDistribute[474]@2 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[2], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[2]], exprIdToEquivalenceSet={2=0} ) ) |
- | | +--PhysicalProject[469]@2 ( stats=0, projects=[ss_sold_date_sk#2, ss_store_sk#4] ) |
- | | +--PhysicalFilter[464]@1 ( stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)] ) |
- | | +--PhysicalOlapScan[cache_usability_store_sales_p partitions(4/72)]@0 ( stats=0, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[490]@5 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[7], shuffleType=EXECUTION_BUCKETED, tableId=1743665221969, selectedIndexId=1743665221970, partitionIds=[1743665221968], equivalenceExprIds=[[7]], exprIdToEquivalenceSet={7=0} ) ) |
- | +--PhysicalProject[485]@5 ( stats=0, projects=[d_date_sk#7] ) |
- | +--PhysicalFilter[480]@4 ( stats=(hbo)0, predicates=AND[(d_date_sk#7 >= 2451100),(d_date_sk#7 <= 2451200),(d_moy#12 >= 2),(d_moy#12 <= 12)] ) |
- | +--PhysicalOlapScan[cache_usability_date_dim]@3 ( stats=1 )
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select ss_store_sk, count(1) from cache_usability_store_sales_p, cache_usability_date_dim where ss_sold_date_sk = d_date_sk and ss_sold_date_sk between 2451100 and 2451200 and d_moy between 2 and 12 group by ss_store_sk;"
- contains("stats=(hbo)0, predicates=AND[(d_date_sk#7 >= 2451100),(d_date_sk#7 <= 2451200),(d_moy#12 >= 2),(d_moy#12 <= 12)]")
- contains("stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)]")
- contains("stats=(hbo)0, type=INNER_JOIN")
- contains("stats=(hbo)0, aggPhase=GLOBAL")
- }
-
- /**
- +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 15.885833333333332 |
- | PhysicalResultSink[753] ( outputExprs=[ss_store_sk#4, __count_1#15] ) |
- | +--PhysicalDistribute[748]@13 ( stats=1, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[743]@13 ( stats=1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, count(partial_count(*)#16) AS `count(*)`#15], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[738]@15 ( stats=1, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[4], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[4]], exprIdToEquivalenceSet={4=0} ) ) |
- | +--PhysicalHashAggregate[733]@15 ( stats=1, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, partial_count(*) AS `partial_count(*)`#16], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[728]@12 ( stats=1, projects=[ss_store_sk#4] ) |
- | +--PhysicalHashJoin[723]@11 ( stats=1, type=INNER_JOIN, hashCondition=[(ss_item_sk#0 = i_item_sk#11)], otherCondition=[], markCondition=[], runtimeFilters=[RF2[i_item_sk#11->[ss_item_sk#0, i_item_sk#7](ndv/size = 1/1) , RF3[i_item_sk#11->[ss_item_sk#0, i_item_sk#7](ndv/size = 1/1) ] ) |
- | |--PhysicalProject[707]@7 ( stats=1, projects=[ss_item_sk#0, ss_store_sk#4] ) |
- | | +--PhysicalHashJoin[702]@6 ( stats=1, type=INNER_JOIN, hashCondition=[(ss_item_sk#0 = i_item_sk#7)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[ss_item_sk#0->[i_item_sk#7](ndv/size = 1/1) , RF1[ss_item_sk#0->[i_item_sk#7](ndv/size = 1/1) ] ) |
- | | |--PhysicalProject[681]@5 ( stats=0.5, projects=[i_item_sk#7] ) |
- | | | +--PhysicalFilter[676]@4 ( stats=0.5, predicates=(i_brand_id#9 > 1003001) ) |
- | | | +--PhysicalOlapScan[cache_usability_item]@3 ( stats=1, RFs= RF0 RF1 RF2 RF3 ) |
- | | +--PhysicalDistribute[697]@2 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[0], shuffleType=STORAGE_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0]], exprIdToEquivalenceSet={0=0} ) ) |
- | | +--PhysicalProject[692]@2 ( stats=0, projects=[ss_item_sk#0, ss_store_sk#4] ) |
- | | +--PhysicalFilter[687]@1 ( stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)] ) |
- | | +--PhysicalOlapScan[cache_usability_store_sales_p partitions(4/72)]@0 ( stats=0, RFs= RF2 RF3 ) |
- | +--PhysicalProject[718]@10 ( stats=0.5, projects=[i_item_sk#11] ) |
- | +--PhysicalFilter[713]@9 ( stats=0.5, predicates=(i_brand_id#13 < 10014017) ) |
- | +--PhysicalOlapScan[cache_usability_item]@8 ( stats=1 )
- +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select ss_store_sk, count(1) from cache_usability_store_sales_p, cache_usability_item i1, cache_usability_item i2 where ss_item_sk = i1.i_item_sk and ss_item_sk = i2.i_item_sk and ss_sold_date_sk between 2451100 and 2451200 and i1.i_brand_id > 1003001 and i2.i_brand_id < 10014017 group by ss_store_sk;"
- //contains("stats=0.5, predicates=(i_brand_id#9 > 1003001)")
- contains("stats=0.5, predicates=(i_brand_id#13 < 10014017)")
- contains("stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)]")
- contains("stats=1, type=INNER_JOIN")
- contains("stats=1, aggPhase=GLOBAL")
- }
-
- sql "select ss_store_sk, count(1) from cache_usability_store_sales_p, cache_usability_item i1, cache_usability_item i2 where ss_item_sk = i1.i_item_sk and ss_item_sk = i2.i_item_sk and ss_sold_date_sk between 2451100 and 2451200 and i1.i_brand_id > 1003001 and i2.i_brand_id < 10014017 group by ss_store_sk;"
- sleep(3000)
- /**
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 7.022499999999999 |
- | PhysicalResultSink[796] ( outputExprs=[ss_store_sk#4, __count_1#15] ) |
- | +--PhysicalDistribute[791]@13 ( stats=(hbo)0, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[786]@13 ( stats=(hbo)0, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, count(partial_count(*)#16) AS `count(*)`#15], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[781]@15 ( stats=(hbo)0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[4], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[4]], exprIdToEquivalenceSet={4=0} ) ) |
- | +--PhysicalHashAggregate[776]@15 ( stats=(hbo)0, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, partial_count(*) AS `partial_count(*)`#16], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[771]@12 ( stats=0, projects=[ss_store_sk#4] ) |
- | +--PhysicalHashJoin[766]@11 ( stats=(hbo)0, type=INNER_JOIN, hashCondition=[(ss_item_sk#0 = i_item_sk#11)], otherCondition=[], markCondition=[], runtimeFilters=[RF2[ss_item_sk#0->[i_item_sk#11](ndv/size = 1/1) , RF3[ss_item_sk#0->[i_item_sk#11](ndv/size = 1/1) ] ) |
- | |--PhysicalProject[724]@10 ( stats=0, projects=[i_item_sk#11] ) |
- | | +--PhysicalFilter[719]@9 ( stats=(hbo)0, predicates=(i_brand_id#13 < 10014017) ) |
- | | +--PhysicalOlapScan[cache_usability_item]@8 ( stats=1, RFs= RF2 RF3 ) |
- | +--PhysicalProject[761]@7 ( stats=0, projects=[ss_item_sk#0, ss_store_sk#4] ) |
- | +--PhysicalHashJoin[756]@6 ( stats=(hbo)0, type=INNER_JOIN, hashCondition=[(ss_item_sk#0 = i_item_sk#7)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[ss_item_sk#0->[i_item_sk#7](ndv/size = 1/1) , RF1[ss_item_sk#0->[i_item_sk#7](ndv/size = 1/1) ] ) |
- | |--PhysicalProject[735]@5 ( stats=0, projects=[i_item_sk#7] ) |
- | | +--PhysicalFilter[730]@4 ( stats=(hbo)0, predicates=(i_brand_id#9 > 1003001) ) |
- | | +--PhysicalOlapScan[cache_usability_item]@3 ( stats=1, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[751]@2 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[0], shuffleType=STORAGE_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0]], exprIdToEquivalenceSet={0=0} ) ) |
- | +--PhysicalProject[746]@2 ( stats=0, projects=[ss_item_sk#0, ss_store_sk#4] ) |
- | +--PhysicalFilter[741]@1 ( stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)] ) |
- | +--PhysicalOlapScan[cache_usability_store_sales_p partitions(4/72)]@0 ( stats=0 )
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select ss_store_sk, count(1) from cache_usability_store_sales_p, cache_usability_item i1, cache_usability_item i2 where ss_item_sk = i1.i_item_sk and ss_item_sk = i2.i_item_sk and ss_sold_date_sk between 2451100 and 2451200 and i1.i_brand_id > 1003001 and i2.i_brand_id < 10014017 group by ss_store_sk;"
- contains("stats=(hbo)0, aggPhase=GLOBAL")
- contains("stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)]")
- contains("stats=(hbo)0, predicates=(i_brand_id#9 > 1003001)")
- contains("stats=(hbo)0, predicates=(i_brand_id#13 < 10014017)")
- contains("stats=(hbo)0, type=INNER_JOIN")
- contains("stats=(hbo)0, aggPhase=GLOBAL")
- }
-
-}
diff --git a/regression-test/suites/nereids_p0/hbo/hbo_data_maintain_test.groovy b/regression-test/suites/nereids_p0/hbo/hbo_data_maintain_test.groovy
deleted file mode 100644
index 8114d49ac6d..00000000000
--- a/regression-test/suites/nereids_p0/hbo/hbo_data_maintain_test.groovy
+++ /dev/null
@@ -1,150 +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("hbo_data_maintain_test", "nonConcurrent") {
- sql "create database if not exists hbo_test;"
- sql "use hbo_test;"
-
- sql "drop table if exists hbo_data_maintain_test1;"
- sql """create table hbo_data_maintain_test1(a int, b int) distributed by hash(a) buckets 32 properties("replication_num"="1");"""
- sql """insert into hbo_data_maintain_test1 select number, number from numbers("number" = "10000");"""
- sql """insert into hbo_data_maintain_test1 select 1,1 from numbers("number" = "10000000");"""
- sql """analyze table hbo_data_maintain_test1 with full with sync;"""
-
- sql "drop table if exists hbo_data_maintain_test2;"
- sql """create table hbo_data_maintain_test2(a int, b int) distributed by hash(a) buckets 32 properties("replication_num"="1");"""
- sql """insert into hbo_data_maintain_test2 select number, number from numbers("number" = "10000");"""
- sql """analyze table hbo_data_maintain_test2 with full with sync;"""
- sql "set hbo_rfsafe_threshold=1.0;"
- sql "set enable_hbo_optimization=false;"
- sql "set global enable_hbo_info_collection=true;"
- sql """ ADMIN SET ALL FRONTENDS CONFIG ("hbo_slow_query_threshold_ms" = "10"); """
- sleep(3000)
- /**
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 300011.25252717733 |
- | PhysicalResultSink[391] ( outputExprs=[__count_0#4] ) |
- | +--PhysicalHashAggregate[386]@7 ( stats=1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[], outputExpr=[count(partial_count(*)#9) AS `count(*)`#4], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[381]@9 ( stats=1, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[376]@9 ( stats=1, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=false, groupByExpr=[], outputExpr=[partial_count(*) AS `partial_count(*)`#9], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[371]@6 ( stats=1, projects=[1 AS `1`#8] ) |
- | +--PhysicalHashJoin[366]@5 ( stats=1, type=INNER_JOIN, hashCondition=[(b#1 = b#3)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[b#1->[b#3](ndv/size = 1/1) , RF1[b#1->[b#3](ndv/size = 1/1) ] ) |
- | |--PhysicalProject[345]@4 ( stats=100,000, projects=[b#3] ) |
- | | +--PhysicalOlapScan[hbo_data_maintain_test2]@3 ( stats=100,000, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[361]@2 ( stats=1, distributionSpec=DistributionSpecReplicated ) |
- | +--PhysicalProject[356]@2 ( stats=1, projects=[b#1] ) |
- | +--PhysicalFilter[351]@1 ( stats=1, predicates=(a#0 = 1) ) |
- | +--PhysicalOlapScan[hbo_data_maintain_test1]@0 ( stats=100,000 )
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select count(1) from hbo_data_maintain_test1 s1, hbo_data_maintain_test2 s2 where s1.b = s2.b and s1.a = 1;"
- contains("stats=1, aggPhase=GLOBAL")
- }
-
- sql "select count(1) from hbo_data_maintain_test1 s1, hbo_data_maintain_test2 s2 where s1.b = s2.b and s1.a = 1;"
- sleep(3000)
-
- sql "set enable_hbo_optimization=true;"
- /**
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 5.0043000903602E8 |
- | PhysicalResultSink[388] ( outputExprs=[__count_0#4] ) |
- | +--PhysicalHashAggregate[383]@7 ( stats=(hbo)1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[], outputExpr=[count(partial_count(*)#9) AS `count(*)`#4], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[378]@9 ( stats=(hbo)1, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[373]@9 ( stats=(hbo)1, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=false, groupByExpr=[], outputExpr=[partial_count(*) AS `partial_count(*)`#9], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[368]@6 ( stats=100,000,001, projects=[1 AS `1`#8] ) |
- | +--PhysicalHashJoin[363]@5 ( stats=(hbo)100,000,001, type=INNER_JOIN, hashCondition=[(b#1 = b#3)], otherCondition=[], markCondition=[] ) |
- | |--PhysicalProject[347]@2 ( stats=100,000,001, projects=[b#1] ) |
- | | +--PhysicalFilter[342]@1 ( stats=(hbo)100,000,001, predicates=(a#0 = 1) ) |
- | | +--PhysicalOlapScan[hbo_data_maintain_test1]@0 ( stats=100,100,000 ) |
- | +--PhysicalDistribute[358]@4 ( stats=100,000, distributionSpec=DistributionSpecReplicated ) |
- | +--PhysicalProject[353]@4 ( stats=100,000, projects=[b#3] ) |
- | +--PhysicalOlapScan[hbo_data_maintain_test2]@3 ( stats=100,000 )
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select count(1) from hbo_data_maintain_test1 s1, hbo_data_maintain_test2 s2 where s1.b = s2.b and s1.a = 1;"
- contains("stats=(hbo)10,000,001, predicates=(a#0 = 1)")
- contains("stats=(hbo)10,000,001, type=INNER_JOIN")
- contains("stats=(hbo)1, aggPhase=GLOBAL")
- }
-
- // data maintain
- sql "delete from hbo_data_maintain_test1 where a = 1;"
- sleep(3000)
- /**
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 1.0030532524420181E8 |
- | PhysicalResultSink[391] ( outputExprs=[__count_0#4] ) |
- | +--PhysicalHashAggregate[386]@7 ( stats=1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[], outputExpr=[count(partial_count(*)#9) AS `count(*)`#4], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[381]@9 ( stats=1, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[376]@9 ( stats=1, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=false, groupByExpr=[], outputExpr=[partial_count(*) AS `partial_count(*)`#9], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[371]@6 ( stats=1,004.59, projects=[1 AS `1`#8] ) |
- | +--PhysicalHashJoin[366]@5 ( stats=1,004.59, type=INNER_JOIN, hashCondition=[(b#1 = b#3)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[b#1->[b#3](ndv/size = 1002/1024) , RF1[b#1->[b#3](ndv/size = 1002/1024) ] ) |
- | |--PhysicalProject[345]@4 ( stats=100,000, projects=[b#3] ) |
- | | +--PhysicalOlapScan[hbo_data_maintain_test2]@3 ( stats=100,000, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[361]@2 ( stats=1,002.8, distributionSpec=DistributionSpecReplicated ) |
- | +--PhysicalProject[356]@2 ( stats=1,002.8, projects=[b#1] ) |
- | +--PhysicalFilter[351]@1 ( stats=1,002.8, predicates=(a#0 = 1) ) |
- | +--PhysicalOlapScan[hbo_data_maintain_test1]@0 ( stats=100,100,000 )
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select count(1) from hbo_data_maintain_test1 s1, hbo_data_maintain_test2 s2 where s1.b = s2.b and s1.a = 1;"
- // data of table has been changed and can't hit hbo cache
- contains("stats=1, aggPhase=GLOBAL")
- }
-
- sql "select count(1) from hbo_data_maintain_test1 s1, hbo_data_maintain_test2 s2 where s1.b = s2.b and s1.a = 1;"
- sleep(3000)
- /**
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 1.0030000302102E8 |
- | PhysicalResultSink[391] ( outputExprs=[__count_0#4] ) |
- | +--PhysicalHashAggregate[386]@7 ( stats=(hbo)1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[], outputExpr=[count(partial_count(*)#9) AS `count(*)`#4], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[381]@9 ( stats=(hbo)0, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[376]@9 ( stats=(hbo)0, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=false, groupByExpr=[], outputExpr=[partial_count(*) AS `partial_count(*)`#9], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[371]@6 ( stats=0, projects=[1 AS `1`#8] ) |
- | +--PhysicalHashJoin[366]@5 ( stats=(hbo)0, type=INNER_JOIN, hashCondition=[(b#1 = b#3)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[b#1->[b#3](ndv/size = 1/1) , RF1[b#1->[b#3](ndv/size = 1/1) ] ) |
- | |--PhysicalProject[345]@4 ( stats=100,000, projects=[b#3] ) |
- | | +--PhysicalOlapScan[hbo_data_maintain_test2]@3 ( stats=100,000, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[361]@2 ( stats=0, distributionSpec=DistributionSpecReplicated ) |
- | +--PhysicalProject[356]@2 ( stats=0, projects=[b#1] ) |
- | +--PhysicalFilter[351]@1 ( stats=(hbo)0, predicates=(a#0 = 1) ) |
- | +--PhysicalOlapScan[hbo_data_maintain_test1]@0 ( stats=100,100,000 )
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select count(1) from hbo_data_maintain_test1 s1, hbo_data_maintain_test2 s2 where s1.b = s2.b and s1.a = 1;"
- // hit hbo cache again
- contains("stats=(hbo)0, predicates=(a#0 = 1)")
- contains("stats=(hbo)0, type=INNER_JOIN")
- contains("stats=(hbo)1, aggPhase=GLOBAL")
- }
-}
-
-
-
diff --git a/regression-test/suites/nereids_p0/hbo/hbo_join_side_opt_test.groovy b/regression-test/suites/nereids_p0/hbo/hbo_join_side_opt_test.groovy
deleted file mode 100644
index 4f28c17d6b4..00000000000
--- a/regression-test/suites/nereids_p0/hbo/hbo_join_side_opt_test.groovy
+++ /dev/null
@@ -1,91 +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("hbo_join_side_opt_test", "nonConcurrent") {
- sql "create database if not exists hbo_test;"
- sql "use hbo_test;"
-
- sql "drop table if exists hbo_join_side_opt_test1;"
- sql """create table hbo_join_side_opt_test1(a int, b int) distributed by hash(a) buckets 32 properties("replication_num"="1");"""
- sql """insert into hbo_join_side_opt_test1 select number, number from numbers("number" = "10000");"""
- sql """insert into hbo_join_side_opt_test1 select 1,1 from numbers("number" = "10000000");"""
- sql """analyze table hbo_join_side_opt_test1 with full with sync;"""
-
- sql "drop table if exists hbo_join_side_opt_test2;"
- sql """create table hbo_join_side_opt_test2(a int, b int) distributed by hash(a) buckets 32 properties("replication_num"="1");"""
- sql """insert into hbo_join_side_opt_test2 select number, number from numbers("number" = "10000");"""
- sql """analyze table hbo_join_side_opt_test2 with full with sync;"""
- sql "set hbo_rfsafe_threshold=1.0;"
- sql """ ADMIN SET ALL FRONTENDS CONFIG ("hbo_slow_query_threshold_ms" = "10"); """
- sleep(3000)
-
- sql "set enable_hbo_optimization=false;"
- sql "set global enable_hbo_info_collection=true;"
- /**
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 1.0030532524420181E8 |
- | PhysicalResultSink[391] ( outputExprs=[__count_0#4] ) |
- | +--PhysicalHashAggregate[386]@7 ( stats=1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[], outputExpr=[count(partial_count(*)#9) AS `count(*)`#4], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[381]@9 ( stats=1, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[376]@9 ( stats=1, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=false, groupByExpr=[], outputExpr=[partial_count(*) AS `partial_count(*)`#9], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[371]@6 ( stats=1,004.59, projects=[1 AS `1`#8] ) |
- | +--PhysicalHashJoin[366]@5 ( stats=1,004.59, type=INNER_JOIN, hashCondition=[(b#1 = b#3)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[b#1->[b#3](ndv/size = 1002/1024) , RF1[b#1->[b#3](ndv/size = 1002/1024) ] ) |
- | |--PhysicalProject[345]@4 ( stats=100,000, projects=[b#3] ) |
- | | +--PhysicalOlapScan[hbo_join_side_opt_test2]@3 ( stats=100,000, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[361]@2 ( stats=1,002.8, distributionSpec=DistributionSpecReplicated ) |
- | +--PhysicalProject[356]@2 ( stats=1,002.8, projects=[b#1] ) |
- | +--PhysicalFilter[351]@1 ( stats=1,002.8, predicates=(a#0 = 1) ) |
- | +--PhysicalOlapScan[hbo_join_side_opt_test1]@0 ( stats=100,100,000 ) |
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+*/
- explain {
- sql "physical plan select count(1) from hbo_join_side_opt_test1 s1, hbo_join_side_opt_test2 s2 where s1.b = s2.b and s1.a = 1;"
- contains("stats=1, aggPhase=GLOBAL")
- }
-
- sql "select count(1) from hbo_join_side_opt_test1 s1, hbo_join_side_opt_test2 s2 where s1.b = s2.b and s1.a = 1;"
- sleep(3000)
- sql "set enable_hbo_optimization=true;"
- /**
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 5.0043000903602E8 |
- | PhysicalResultSink[388] ( outputExprs=[__count_0#4] ) |
- | +--PhysicalHashAggregate[383]@7 ( stats=(hbo)1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[], outputExpr=[count(partial_count(*)#9) AS `count(*)`#4], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[378]@9 ( stats=(hbo)1, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[373]@9 ( stats=(hbo)1, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=false, groupByExpr=[], outputExpr=[partial_count(*) AS `partial_count(*)`#9], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[368]@6 ( stats=100,000,001, projects=[1 AS `1`#8] ) |
- | +--PhysicalHashJoin[363]@5 ( stats=(hbo)100,000,001, type=INNER_JOIN, hashCondition=[(b#1 = b#3)], otherCondition=[], markCondition=[] ) |
- | |--PhysicalProject[347]@2 ( stats=100,000,001, projects=[b#1] ) |
- | | +--PhysicalFilter[342]@1 ( stats=(hbo)100,000,001, predicates=(a#0 = 1) ) |
- | | +--PhysicalOlapScan[hbo_join_side_opt_test1]@0 ( stats=100,100,000 ) |
- | +--PhysicalDistribute[358]@4 ( stats=100,000, distributionSpec=DistributionSpecReplicated ) |
- | +--PhysicalProject[353]@4 ( stats=100,000, projects=[b#3] ) |
- | +--PhysicalOlapScan[hbo_join_side_opt_test2]@3 ( stats=100,000 )
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select count(1) from hbo_join_side_opt_test1 s1, hbo_join_side_opt_test2 s2 where s1.b = s2.b and s1.a = 1;"
- contains("stats=(hbo)10,000,001, predicates=(a#0 = 1)")
- contains("stats=10,000, distributionSpec=DistributionSpecReplicated")
- contains("stats=(hbo)10,000,001, type=INNER_JOIN")
- contains("stats=(hbo)1, aggPhase=GLOBAL")
- }
-
-}
diff --git a/regression-test/suites/nereids_p0/hbo/hbo_parameterization_test.groovy b/regression-test/suites/nereids_p0/hbo/hbo_parameterization_test.groovy
deleted file mode 100644
index 86f28ed2d75..00000000000
--- a/regression-test/suites/nereids_p0/hbo/hbo_parameterization_test.groovy
+++ /dev/null
@@ -1,282 +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("hbo_parameterization_test", "nonConcurrent") {
- sql "create database if not exists hbo_test;"
- sql "use hbo_test;"
-
- sql "drop table if exists store_sales_p;"
- sql """CREATE TABLE `store_sales_p` (
- `ss_item_sk` bigint NOT NULL,
- `ss_ticket_number` bigint NOT NULL,
- `ss_sold_date_sk` bigint NULL,
- `ss_customer_sk` bigint NULL,
- `ss_store_sk` bigint NULL,
- `ss_wholesale_cost` decimal(7,2) NULL,
- `ss_list_price` decimal(7,2) NULL
- ) ENGINE=OLAP
- DUPLICATE KEY(`ss_item_sk`, `ss_ticket_number`)
- PARTITION BY RANGE(`ss_sold_date_sk`)
- (
- PARTITION `p1` VALUES LESS THAN ("2450846"),
- PARTITION `p2` VALUES LESS THAN ("2450874"),
- PARTITION `p3` VALUES LESS THAN ("2450905"),
- PARTITION `p4` VALUES LESS THAN ("2450935"),
- PARTITION `p5` VALUES LESS THAN ("2450966"),
- PARTITION `p6` VALUES LESS THAN ("2450996"),
- PARTITION `p7` VALUES LESS THAN ("2451027"),
- PARTITION `p8` VALUES LESS THAN ("2451058"),
- PARTITION `p9` VALUES LESS THAN ("2451088"),
- PARTITION `p10` VALUES LESS THAN ("2451119"),
- PARTITION `p11` VALUES LESS THAN ("2451149"),
- PARTITION `p12` VALUES LESS THAN ("2451180"),
- PARTITION `p13` VALUES LESS THAN ("2451211"),
- PARTITION `p14` VALUES LESS THAN ("2451239"),
- PARTITION `p15` VALUES LESS THAN ("2451270"),
- PARTITION `p16` VALUES LESS THAN ("2451300"),
- PARTITION `p17` VALUES LESS THAN ("2451331"),
- PARTITION `p18` VALUES LESS THAN ("2451361"),
- PARTITION `p19` VALUES LESS THAN ("2451392"),
- PARTITION `p20` VALUES LESS THAN ("2451423"),
- PARTITION `p21` VALUES LESS THAN ("2451453"),
- PARTITION `p22` VALUES LESS THAN ("2451484"),
- PARTITION `p23` VALUES LESS THAN ("2451514"),
- PARTITION `p24` VALUES LESS THAN ("2451545"),
- PARTITION `p25` VALUES LESS THAN ("2451576"),
- PARTITION `p26` VALUES LESS THAN ("2451605"),
- PARTITION `p27` VALUES LESS THAN ("2451635"),
- PARTITION `p28` VALUES LESS THAN ("2451666"),
- PARTITION `p29` VALUES LESS THAN ("2451696"),
- PARTITION `p30` VALUES LESS THAN ("2451726"),
- PARTITION `p31` VALUES LESS THAN ("2451756"),
- PARTITION `p32` VALUES LESS THAN ("2451787"),
- PARTITION `p33` VALUES LESS THAN ("2451817"),
- PARTITION `p34` VALUES LESS THAN ("2451848"),
- PARTITION `p35` VALUES LESS THAN ("2451877"),
- PARTITION `p36` VALUES LESS THAN ("2451906"),
- PARTITION `p37` VALUES LESS THAN ("2451937"),
- PARTITION `p38` VALUES LESS THAN ("2451968"),
- PARTITION `p39` VALUES LESS THAN ("2451999"),
- PARTITION `p40` VALUES LESS THAN ("2452031"),
- PARTITION `p41` VALUES LESS THAN ("2452062"),
- PARTITION `p42` VALUES LESS THAN ("2452092"),
- PARTITION `p43` VALUES LESS THAN ("2452123"),
- PARTITION `p44` VALUES LESS THAN ("2452154"),
- PARTITION `p45` VALUES LESS THAN ("2452184"),
- PARTITION `p46` VALUES LESS THAN ("2452215"),
- PARTITION `p47` VALUES LESS THAN ("2452245"),
- PARTITION `p48` VALUES LESS THAN ("2452276"),
- PARTITION `p49` VALUES LESS THAN ("2452307"),
- PARTITION `p50` VALUES LESS THAN ("2452335"),
- PARTITION `p51` VALUES LESS THAN ("2452366"),
- PARTITION `p52` VALUES LESS THAN ("2452396"),
- PARTITION `p53` VALUES LESS THAN ("2452427"),
- PARTITION `p54` VALUES LESS THAN ("2452457"),
- PARTITION `p55` VALUES LESS THAN ("2452488"),
- PARTITION `p56` VALUES LESS THAN ("2452519"),
- PARTITION `p57` VALUES LESS THAN ("2452549"),
- PARTITION `p58` VALUES LESS THAN ("2452580"),
- PARTITION `p59` VALUES LESS THAN ("2452610"),
- PARTITION `p60` VALUES LESS THAN ("2452641"),
- PARTITION `p61` VALUES LESS THAN ("2452672"),
- PARTITION `p62` VALUES LESS THAN ("2452700"),
- PARTITION `p63` VALUES LESS THAN ("2452731"),
- PARTITION `p64` VALUES LESS THAN ("2452761"),
- PARTITION `p65` VALUES LESS THAN ("2452792"),
- PARTITION `p66` VALUES LESS THAN ("2452822"),
- PARTITION `p67` VALUES LESS THAN ("2452853"),
- PARTITION `p68` VALUES LESS THAN ("2452884"),
- PARTITION `p69` VALUES LESS THAN ("2452914"),
- PARTITION `p70` VALUES LESS THAN ("2452945"),
- PARTITION `p71` VALUES LESS THAN ("2452975"),
- PARTITION `p72` VALUES LESS THAN (MAXVALUE)
- )
- DISTRIBUTED BY HASH(ss_item_sk, ss_ticket_number) BUCKETS 1
- PROPERTIES (
- "replication_num" = "1"
- );"""
-
- sql "drop table if exists store;"
- sql """
- CREATE TABLE IF NOT EXISTS store (
- s_store_sk bigint not null,
- s_store_id char(16) not null,
- s_zip char(10)
- )
- DUPLICATE KEY(s_store_sk)
- DISTRIBUTED BY HASH(s_store_sk) BUCKETS 1
- PROPERTIES (
- "replication_num" = "1"
- );
- """
-
- sql "set disable_nereids_rules='PRUNE_EMPTY_PARTITION';"
- sql "set hbo_rfsafe_threshold=1.0;"
- sql "set global enable_hbo_info_collection=true;"
- sql """ ADMIN SET ALL FRONTENDS CONFIG ("hbo_slow_query_threshold_ms" = "10"); """
- // group by 1 order by 1 will not impact the hbo cache matching since hbo is processed during cbo stage
- // and these kinds of info have been processed during rewriting, including real column replacement and
- // constant folding
- sql "select s_zip, count(1) from store_sales_p, store where ss_store_sk = s_store_sk and ss_sold_date_sk between 2451100 and 2451200 group by 1;"
- sleep(3000)
-
- /**
- +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 9.02126 |
- | PhysicalResultSink[463] ( outputExprs=[s_zip#9, __count_1#10] ) |
- | +--PhysicalDistribute[458]@7 ( stats=(hbo)0, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[453]@7 ( stats=(hbo)0, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[s_zip#9], outputExpr=[s_zip#9, count(partial_count(*)#11) AS `count(*)`#10], partitionExpr=Optional[[s_zip#9]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[448]@9 ( stats=(hbo)0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[9], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[9]], exprIdToEquivalenceSet={9=0} ) ) |
- | +--PhysicalHashAggregate[443]@9 ( stats=(hbo)0, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[s_zip#9], outputExpr=[s_zip#9, partial_count(*) AS `partial_count(*)`#11], partitionExpr=Optional[[s_zip#9]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[438]@6 ( stats=0, projects=[s_zip#9] ) |
- | +--PhysicalHashJoin[433]@5 ( stats=(hbo)0, type=INNER_JOIN, hashCondition=[(ss_store_sk#4 = s_store_sk#7)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[ss_store_sk#4->[s_store_sk#7](ndv/size = 1/1) , RF1[ss_store_sk#4->[s_store_sk#7](ndv/size = 1/1) ] ) |
- | |--PhysicalProject[412]@4 ( stats=1, projects=[s_store_sk#7, s_zip#9] ) |
- | | +--PhysicalOlapScan[store]@3 ( stats=1, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[428]@2 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[4], shuffleType=STORAGE_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[4]], exprIdToEquivalenceSet={4=0} ) ) |
- | +--PhysicalProject[423]@2 ( stats=0, projects=[ss_store_sk#4] ) |
- | +--PhysicalFilter[418]@1 ( stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)] ) |
- | +--PhysicalOlapScan[store_sales_p partitions(4/72)]@0 ( stats=4 )
- +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select s_zip, count(1) from store_sales_p, store where ss_store_sk = s_store_sk and ss_sold_date_sk between 2451100 and 2451200 group by 1;"
- contains("stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)]")
- contains("stats=(hbo)0, type=INNER_JOIN")
- contains("stats=(hbo)0, aggPhase=GLOBAL")
- }
-
- /**
- +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 5.00126 |
- | PhysicalResultSink[432] ( outputExprs=[ss_store_sk#4, __count_1#10] ) |
- | +--PhysicalDistribute[427]@7 ( stats=0, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[422]@7 ( stats=0, aggPhase=LOCAL, aggMode=INPUT_TO_RESULT, maybeUseStreaming=false, groupByExpr=[ss_store_sk#4], outputExpr=[ss_store_sk#4, count(*) AS `count(*)`#10], partitionExpr=Optional[[ss_store_sk#4]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[417]@6 ( stats=0, projects=[ss_store_sk#4] ) |
- | +--PhysicalHashJoin[412]@5 ( stats=(hbo)0, type=INNER_JOIN, hashCondition=[(ss_store_sk#4 = s_store_sk#7)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[ss_store_sk#4->[s_store_sk#7](ndv/size = 1/1) , RF1[ss_store_sk#4->[s_store_sk#7](ndv/size = 1/1) ] ) |
- | |--PhysicalProject[391]@4 ( stats=1, projects=[s_store_sk#7] ) |
- | | +--PhysicalOlapScan[store]@3 ( stats=1, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[407]@2 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[4], shuffleType=STORAGE_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[4]], exprIdToEquivalenceSet={4=0} ) ) |
- | +--PhysicalProject[402]@2 ( stats=0, projects=[ss_store_sk#4] ) |
- | +--PhysicalFilter[397]@1 ( stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)] ) |
- | +--PhysicalOlapScan[store_sales_p partitions(4/72)]@0 ( stats=0 )
- +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select ss_store_sk, count(1) from store_sales_p, store where ss_store_sk = s_store_sk and ss_sold_date_sk between 2451100 and 2451200 group by 1;"
- contains("stats=(hbo)0, type=INNER_JOIN")
- contains("stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)]")
- }
-
- /**
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 5.02126 |
- | PhysicalResultSink[520] ( outputExprs=[s_zip#9, __count_1#10] ) |
- | +--PhysicalQuickSort[515]@8 ( stats=(hbo)0, orderKeys=[s_zip#9 asc null first], phase=GATHER_SORT ) |
- | +--PhysicalDistribute[510]@7 ( stats=(hbo)0, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[505]@7 ( stats=(hbo)0, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[s_zip#9], outputExpr=[s_zip#9, count(partial_count(*)#11) AS `count(*)`#10], partitionExpr=Optional[[s_zip#9]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[500]@11 ( stats=(hbo)0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[9], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[9]], exprIdToEquivalenceSet={9=0} ) ) |
- | +--PhysicalHashAggregate[495]@11 ( stats=(hbo)0, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[s_zip#9], outputExpr=[s_zip#9, partial_count(*) AS `partial_count(*)`#11], partitionExpr=Optional[[s_zip#9]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[490]@6 ( stats=0, projects=[s_zip#9] ) |
- | +--PhysicalHashJoin[485]@5 ( stats=(hbo)0, type=INNER_JOIN, hashCondition=[(ss_store_sk#4 = s_store_sk#7)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[ss_store_sk#4->[s_store_sk#7](ndv/size = 1/1) , RF1[ss_store_sk#4->[s_store_sk#7](ndv/size = 1/1) ] ) |
- | |--PhysicalProject[464]@4 ( stats=1, projects=[s_store_sk#7, s_zip#9] ) |
- | | +--PhysicalOlapScan[store]@3 ( stats=1, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[480]@2 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[4], shuffleType=STORAGE_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[4]], exprIdToEquivalenceSet={4=0} ) ) |
- | +--PhysicalProject[475]@2 ( stats=0, projects=[ss_store_sk#4] ) |
- | +--PhysicalFilter[470]@1 ( stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)] ) |
- | +--PhysicalOlapScan[store_sales_p partitions(4/72)]@0 ( stats=0 )
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select s_zip, count(1) from store_sales_p, store where ss_store_sk = s_store_sk and ss_sold_date_sk between 2451100 and 2451200 group by 1 order by 1;"
- contains("stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)]")
- contains("stats=(hbo)0, type=INNER_JOIN")
- contains("stats=(hbo)0, aggPhase=GLOBAL")
- }
-
- // 20 in varchar(20) will not be parameterized since it is a function but not literal
- // substring("3190400", 1, 5) has been constant folded in rewriting stage, so will not be seen in parameterization also
- sql """select s_zip, count(1) from store_sales_p, store where ss_store_sk = s_store_sk and ss_sold_date_sk between 2451100 and 2451200 and cast(s_zip as varchar(20)) = substring("3190400", 1, 5) group by s_zip;"""
- sleep(3000)
- /**
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 4.02218 |
- | PhysicalResultSink[524] ( outputExprs=[s_zip#9, __count_1#10] ) |
- | +--PhysicalDistribute[519]@8 ( stats=(hbo)0, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[514]@8 ( stats=(hbo)0, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[s_zip#9], outputExpr=[s_zip#9, count(partial_count(*)#11) AS `count(*)`#10], partitionExpr=Optional[[s_zip#9]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[509]@10 ( stats=(hbo)0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[9], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[9]], exprIdToEquivalenceSet={9=0} ) ) |
- | +--PhysicalHashAggregate[504]@10 ( stats=(hbo)0, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[s_zip#9], outputExpr=[s_zip#9, partial_count(*) AS `partial_count(*)`#11], partitionExpr=Optional[[s_zip#9]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[499]@7 ( stats=0, projects=[s_zip#9] ) |
- | +--PhysicalHashJoin[494]@6 ( stats=(hbo)0, type=INNER_JOIN, hashCondition=[(ss_store_sk#4 = s_store_sk#7)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[ss_store_sk#4->[s_store_sk#7](ndv/size = 1/1) , RF1[ss_store_sk#4->[s_store_sk#7](ndv/size = 1/1) ] ) |
- | |--PhysicalProject[473]@5 ( stats=0, projects=[s_store_sk#7, s_zip#9] ) |
- | | +--PhysicalFilter[468]@4 ( stats=(hbo)0, predicates=(substring(cast(s_zip#9 as VARCHAR(20)), 1, 20) = '31904') ) |
- | | +--PhysicalOlapScan[store]@3 ( stats=1, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[489]@2 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[4], shuffleType=STORAGE_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[4]], exprIdToEquivalenceSet={4=0} ) ) |
- | +--PhysicalProject[484]@2 ( stats=0, projects=[ss_store_sk#4] ) |
- | +--PhysicalFilter[479]@1 ( stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)] ) |
- | +--PhysicalOlapScan[store_sales_p partitions(4/72)]@0 ( stats=0 )
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql """physical plan select s_zip, count(1) from store_sales_p, store where ss_store_sk = s_store_sk and ss_sold_date_sk between 2451100 and 2451200 and cast(s_zip as varchar(20)) = substring("3190400", 1, 5) group by s_zip;"""
- contains("stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)]")
- contains("stats=(hbo)0, predicates=(substring(cast(s_zip#9 as VARCHAR(20)), 1, 20) = '31904')")
- contains("stats=(hbo)0, type=INNER_JOIN")
- contains("stats=(hbo)0, aggPhase=GLOBAL")
- }
-
- // format string like 'date_format('2024-01-01', '%y')' will not be seen in parameterization since it has been folded during rewriting
- sql """select s_zip, count(1) from store_sales_p, store where ss_store_sk = s_store_sk and ss_sold_date_sk between 2451100 and 2451200 and cast(s_zip as varchar(20)) = date_format('2024-01-01', '%y') group by s_zip;"""
- sleep(3000)
- /**
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 4.02218 |
- | PhysicalResultSink[534] ( outputExprs=[s_zip#9, __count_1#10] ) |
- | +--PhysicalDistribute[529]@8 ( stats=(hbo)0, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[524]@8 ( stats=(hbo)0, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[s_zip#9], outputExpr=[s_zip#9, count(partial_count(*)#11) AS `count(*)`#10], partitionExpr=Optional[[s_zip#9]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[519]@10 ( stats=(hbo)0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[9], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[9]], exprIdToEquivalenceSet={9=0} ) ) |
- | +--PhysicalHashAggregate[514]@10 ( stats=(hbo)0, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[s_zip#9], outputExpr=[s_zip#9, partial_count(*) AS `partial_count(*)`#11], partitionExpr=Optional[[s_zip#9]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[509]@7 ( stats=0, projects=[s_zip#9] ) |
- | +--PhysicalHashJoin[504]@6 ( stats=(hbo)0, type=INNER_JOIN, hashCondition=[(ss_store_sk#4 = s_store_sk#7)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[ss_store_sk#4->[s_store_sk#7](ndv/size = 1/1) , RF1[ss_store_sk#4->[s_store_sk#7](ndv/size = 1/1) ] ) |
- | |--PhysicalDistribute[483]@5 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[7], shuffleType=EXECUTION_BUCKETED, tableId=1744890042536, selectedIndexId=1744890042537, partitionIds=[1744890042535], equivalenceExprIds=[[7]], exprIdToEquivalenceSet={7=0} ) ) |
- | | +--PhysicalProject[478]@5 ( stats=0, projects=[s_store_sk#7, s_zip#9] ) |
- | | +--PhysicalFilter[473]@4 ( stats=(hbo)0, predicates=(substring(cast(s_zip#9 as VARCHAR(20)), 1, 20) = '24') ) |
- | | +--PhysicalOlapScan[store operativeSlots([s_store_sk#7, s_zip#9])]@3 ( stats=1, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[499]@2 ( stats=0, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[4], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[4]], exprIdToEquivalenceSet={4=0} ) ) |
- | +--PhysicalProject[494]@2 ( stats=0, projects=[ss_store_sk#4] ) |
- | +--PhysicalFilter[489]@1 ( stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)] ) |
- | +--PhysicalOlapScan[store_sales_p partitions(4/72) operativeSlots([ss_sold_date_sk#2, ss_store_sk#4])]@0 ( stats=0 )
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql """physical plan select s_zip, count(1) from store_sales_p, store where ss_store_sk = s_store_sk and ss_sold_date_sk between 2451100 and 2451200 and cast(s_zip as varchar(20)) = date_format('2024-01-01', '%y') group by s_zip;"""
- contains("stats=(hbo)0, predicates=AND[(ss_sold_date_sk#2 >= 2451100),(ss_sold_date_sk#2 <= 2451200)]")
- contains("stats=(hbo)0, predicates=(substring(cast(s_zip#9 as VARCHAR(20)), 1, 20) = '24')")
- contains("stats=(hbo)0, type=INNER_JOIN")
- contains("stats=(hbo)0, aggPhase=GLOBAL")
- }
-
-}
diff --git a/regression-test/suites/nereids_p0/hbo/hbo_rf_safe_test.groovy b/regression-test/suites/nereids_p0/hbo/hbo_rf_safe_test.groovy
deleted file mode 100644
index 6e09bb26e58..00000000000
--- a/regression-test/suites/nereids_p0/hbo/hbo_rf_safe_test.groovy
+++ /dev/null
@@ -1,94 +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("hbo_rf_safe_test", "nonConcurrent") {
- sql "create database if not exists hbo_test;"
- sql "use hbo_test;"
-
- sql "drop table if exists hbo_rf_safe_test1;"
- sql """create table hbo_rf_safe_test1(a int, b int) duplicate key (a) distributed by hash(b) buckets 32 properties("replication_num"="1");"""
- sql """insert into hbo_rf_safe_test1 select number, number from numbers("number" = "10000000");"""
- sql """analyze table hbo_rf_safe_test1 with full with sync;"""
-
- sql "drop table if exists hbo_rf_safe_test2;"
- sql """create table hbo_rf_safe_test2(a int, b int) duplicate key (a) distributed by hash(b) buckets 32 properties("replication_num"="1");"""
- sql """insert into hbo_rf_safe_test2 select number, number from numbers("number" = "10000000");"""
- sql """analyze table hbo_rf_safe_test2 with full with sync;"""
-
- // exclude min/max rf to ensure the bloom filter can be generated
- sql "set runtime_filter_type=IN_OR_BLOOM_FILTER;"
- sql "set hbo_rfsafe_threshold=1.0;"
- sql "set global enable_hbo_info_collection=true;"
- sql """ ADMIN SET ALL FRONTENDS CONFIG ("hbo_slow_query_threshold_ms" = "10"); """
- sql "select count(1) from hbo_rf_safe_test1 t1, hbo_rf_safe_test2 t2 where t1.b = t2.b and t2.a < 20000;"
- sleep(3000)
- /**
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 3.0106000503602E8 |
- | PhysicalResultSink[375] ( outputExprs=[__count_0#4] ) |
- | +--PhysicalHashAggregate[370]@7 ( stats=(hbo)1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[], outputExpr=[count(partial_count(*)#9) AS `count(*)`#4], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[365]@9 ( stats=(hbo)1, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[360]@9 ( stats=(hbo)1, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=false, groupByExpr=[], outputExpr=[partial_count(*) AS `partial_count(*)`#9], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[355]@6 ( stats=200,000, projects=[1 AS `1`#8] ) |
- | +--PhysicalHashJoin[350]@5 ( stats=200,000, type=INNER_JOIN, hashCondition=[(b#1 = b#3)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[b#3->[b#1](ndv/size = 200000/262144) ] ) |
- | |--PhysicalProject[329]@1 ( stats=100,000,000, projects=[b#1] ) |
- | | +--PhysicalOlapScan[hbo_rf_safe_test1]@0 ( stats=100,000,000, RFs= RF0 ) |
- | +--PhysicalDistribute[345]@4 ( stats=200,000, distributionSpec=DistributionSpecReplicated ) |
- | +--PhysicalProject[340]@4 ( stats=200,000, projects=[b#3] ) |
- | +--PhysicalFilter[335]@3 ( stats=200,000, predicates=(a#2 < 200000) ) |
- | +--PhysicalOlapScan[hbo_rf_safe_test2]@2 ( stats=100,000,000 ) |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- // if rfSafeRatio == 1.0, rf safe, hit hbo cache
- sql "physical plan select count(1) from hbo_rf_safe_test1 t1, hbo_rf_safe_test2 t2 where t1.b = t2.b and t2.a < 20000;"
- contains("stats=(hbo)1, aggPhase=GLOBAL")
- }
-
- sql "set hbo_rfsafe_threshold=0.5;"
-
- /**
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 3.0106000503602E8 |
- | PhysicalResultSink[375] ( outputExprs=[__count_0#4] ) |
- | +--PhysicalHashAggregate[370]@7 ( stats=1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[], outputExpr=[count(partial_count(*)#9) AS `count(*)`#4], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[365]@9 ( stats=1, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[360]@9 ( stats=1, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=false, groupByExpr=[], outputExpr=[partial_count(*) AS `partial_count(*)`#9], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[355]@6 ( stats=200,000, projects=[1 AS `1`#8] ) |
- | +--PhysicalHashJoin[350]@5 ( stats=200,000, type=INNER_JOIN, hashCondition=[(b#1 = b#3)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[b#3->[b#1](ndv/size = 200000/262144) ] ) |
- | |--PhysicalProject[329]@1 ( stats=100,000,000, projects=[b#1] ) |
- | | +--PhysicalOlapScan[hbo_rf_safe_test1]@0 ( stats=100,000,000, RFs= RF0 ) |
- | +--PhysicalDistribute[345]@4 ( stats=200,000, distributionSpec=DistributionSpecReplicated ) |
- | +--PhysicalProject[340]@4 ( stats=200,000, projects=[b#3] ) |
- | +--PhysicalFilter[335]@3 ( stats=200,000, predicates=(a#2 < 200000) ) |
- | +--PhysicalOlapScan[hbo_rf_safe_test2]@2 ( stats=100,000,000 ) |
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- // if rfSafeRatio == 0.5, rf unsafe, not hit hbo cache
- sql "physical plan select count(1) from hbo_rf_safe_test1 t1, hbo_rf_safe_test2 t2 where t1.b = t2.b and t2.a < 20000;"
- contains("stats=1, aggPhase=GLOBAL")
- }
-
-}
-
-
-
diff --git a/regression-test/suites/nereids_p0/hbo/hbo_skew_shuffle_to_bc_test.groovy b/regression-test/suites/nereids_p0/hbo/hbo_skew_shuffle_to_bc_test.groovy
deleted file mode 100644
index e1fc891a81d..00000000000
--- a/regression-test/suites/nereids_p0/hbo/hbo_skew_shuffle_to_bc_test.groovy
+++ /dev/null
@@ -1,95 +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("hbo_skew_shuffle_to_bc_test", "nonConcurrent") {
- sql "create database if not exists hbo_test;"
- sql "use hbo_test;"
-
- sql """drop table if exists hbo_skew_shuffle_to_bc_test1;"""
- sql """create table hbo_skew_shuffle_to_bc_test1(a int, b int) distributed by hash(a, b) buckets 32 properties("replication_num"="1");"""
- sql """insert into hbo_skew_shuffle_to_bc_test1 select number, 1 from numbers("number" = "100");"""
- sql """insert into hbo_skew_shuffle_to_bc_test1 select number, number from numbers("number" = "1000000");"""
- sql """analyze table hbo_skew_shuffle_to_bc_test1 with full with sync;"""
-
- sql """drop table if exists hbo_skew_shuffle_to_bc_test2;"""
- sql """create table hbo_skew_shuffle_to_bc_test2(a int, b int) distributed by hash(a, b) buckets 32 properties("replication_num"="1");"""
- sql """insert into hbo_skew_shuffle_to_bc_test2 select number, number from numbers("number" = "200000");"""
- sql """insert into hbo_skew_shuffle_to_bc_test2 select 1, 1 from numbers("number" = "200000");"""
- sql """insert into hbo_skew_shuffle_to_bc_test2 select number, number from numbers("number" = "600000");"""
- sql """analyze table hbo_skew_shuffle_to_bc_test2 with full with sync;"""
-
- // increase the parallel to make enough skew between different instances
- sql "set parallel_pipeline_task_num=100;"
- sql "set hbo_rfsafe_threshold=1.0;"
- sql """ ADMIN SET ALL FRONTENDS CONFIG ("hbo_slow_query_threshold_ms" = "10"); """
- sql "set enable_hbo_optimization=false;"
- sql "set global enable_hbo_info_collection=true;"
- /**
- +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 8.8669105036E7 |
- | PhysicalResultSink[348] ( outputExprs=[__count_0#4] ) |
- | +--PhysicalHashAggregate[343]@6 ( stats=1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[], outputExpr=[count(partial_count(*)#9) AS `count(*)`#4], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[338]@8 ( stats=1, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[333]@8 ( stats=1, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=false, groupByExpr=[], outputExpr=[partial_count(*) AS `partial_count(*)`#9], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[328]@5 ( stats=10,000,000, projects=[1 AS `1`#8] ) |
- | +--PhysicalHashJoin[323]@4 ( stats=10,000,000, type=INNER_JOIN, hashCondition=[(b#1 = b#3)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[b#3->[b#1](ndv/size = 6028862/8388608) , RF1[b#3->[b#1](ndv/size = 6028862/8388608) ] ) |
- | |--PhysicalDistribute[307]@1 ( stats=10,001,000, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[1], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[1]], exprIdToEquivalenceSet={1=0} ) ) |
- | | +--PhysicalProject[302]@1 ( stats=10,001,000, projects=[b#1] ) |
- | | +--PhysicalOlapScan[hbo_skew_shuffle_to_bc_test1]@0 ( stats=10,001,000, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[318]@3 ( stats=10,000,000, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[3], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[3]], exprIdToEquivalenceSet={3=0} ) ) |
- | +--PhysicalProject[313]@3 ( stats=10,000,000, projects=[b#3] ) |
- | +--PhysicalOlapScan[hbo_skew_shuffle_to_bc_test2]@2 ( stats=10,000,000 )
- +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select count(1) from hbo_skew_shuffle_to_bc_test1 t1, hbo_skew_shuffle_to_bc_test2 t2 where t1.b = t2.b;"
- contains("stats=1,000,100, distributionSpec=DistributionSpecHash")
- contains("stats=1,000,000, distributionSpec=DistributionSpecHash")
- }
-
- sql "select count(1) from hbo_skew_shuffle_to_bc_test1 t1, hbo_skew_shuffle_to_bc_test2 t2 where t1.b = t2.b;"
- sleep(3000);
- sql "set enable_hbo_optimization=true;"
- /**
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 6.081327812596689E9 |
- | PhysicalResultSink[340] ( outputExprs=[__count_0#4] ) |
- | +--PhysicalHashAggregate[335]@6 ( stats=(hbo)1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[], outputExpr=[count(partial_count(*)#9) AS `count(*)`#4], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[330]@8 ( stats=(hbo)100, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[325]@8 ( stats=(hbo)100, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=false, groupByExpr=[], outputExpr=[partial_count(*) AS `partial_count(*)`#9], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[320]@5 ( stats=2,010,002,000, projects=[1 AS `1`#8] ) |
- | +--PhysicalHashJoin[315]@4 ( stats=(hbo)2,010,002,000, type=INNER_JOIN, hashCondition=[(b#1 = b#3)], otherCondition=[], markCondition=[], runtimeFilters=[RF0[b#3->[b#1](ndv/size = 6028862/8388608) , RF1[b#3->[b#1](ndv/size = 6028862/8388608) ] ) |
- | |--PhysicalProject[299]@1 ( stats=10,001,000, projects=[b#1] ) |
- | | +--PhysicalOlapScan[hbo_skew_shuffle_to_bc_test1]@0 ( stats=10,001,000, RFs= RF0 RF1 ) |
- | +--PhysicalDistribute[310]@3 ( stats=10,000,000, distributionSpec=DistributionSpecReplicated ) |
- | +--PhysicalProject[305]@3 ( stats=10,000,000, projects=[b#3] ) |
- | +--PhysicalOlapScan[hbo_skew_shuffle_to_bc_test2]@2 ( stats=10,000,000 ) |
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select count(1) from hbo_skew_shuffle_to_bc_test1 t1, hbo_skew_shuffle_to_bc_test2 t2 where t1.b = t2.b;"
- contains("stats=1,000,100, projects=[b#1]")
- contains("stats=1,000,000, distributionSpec=DistributionSpecReplicated")
- contains("stats=(hbo)21,000,200, type=INNER_JOIN")
- contains("stats=(hbo)1, aggPhase=GLOBAL")
- }
-
-}
diff --git a/regression-test/suites/nereids_p0/hbo/hbo_slow_query_test.groovy b/regression-test/suites/nereids_p0/hbo/hbo_slow_query_test.groovy
deleted file mode 100644
index 5c2bf716a2e..00000000000
--- a/regression-test/suites/nereids_p0/hbo/hbo_slow_query_test.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("hbo_slow_query_test", "nonConcurrent") {
- sql "create database if not exists hbo_test;"
- sql "use hbo_test;"
-
- sql "drop table if exists hbo_slow_query_test;"
- sql """create table hbo_slow_query_test(a int, b int) distributed by hash(a) buckets 32 properties("replication_num"="1");"""
- sql """insert into hbo_slow_query_test select number, number from numbers("number" = "10000000");"""
- sql """analyze table hbo_slow_query_test with full with sync;"""
-
- sql "set hbo_rfsafe_threshold=1.0;"
- sql "set global enable_hbo_info_collection=true;"
- sql "set enable_hbo_optimization=true;"
- sql """ ADMIN SET ALL FRONTENDS CONFIG ("hbo_slow_query_threshold_ms" = "10000"); """
- sql "select count(1) from hbo_slow_query_test where a > 0;"
- sleep(3000)
- /**
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 3.0000000303602004E8 |
- | PhysicalResultSink[233] ( outputExprs=[__count_0#2] ) |
- | +--PhysicalHashAggregate[228]@3 ( stats=1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[], outputExpr=[count(partial_count(*)#7) AS `count(*)`#2], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[223]@5 ( stats=1, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[218]@5 ( stats=1, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=false, groupByExpr=[], outputExpr=[partial_count(*) AS `partial_count(*)`#7], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[213]@2 ( stats=100,000,000, projects=[1 AS `1`#6] ) |
- | +--PhysicalFilter[208]@1 ( stats=100,000,000, predicates=(a#0 > 0) ) |
- | +--PhysicalOlapScan[hbo_slow_query_test]@0 ( stats=100,000,000 ) |
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select count(1) from hbo_slow_query_test where a > 0;"
- contains("stats=1, aggPhase=GLOBAL")
- }
-
- sql """ ADMIN SET ALL FRONTENDS CONFIG ("hbo_slow_query_threshold_ms" = "10"); """
- sql "select count(1) from hbo_slow_query_test where a > 0;"
- sleep(3000)
- /**
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner) |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | cost = 3.0000000103602004E8 |
- | PhysicalResultSink[233] ( outputExprs=[__count_0#2] ) |
- | +--PhysicalHashAggregate[228]@3 ( stats=(hbo)1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[], outputExpr=[count(partial_count(*)#7) AS `count(*)`#2], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalDistribute[223]@5 ( stats=(hbo)1, distributionSpec=DistributionSpecGather ) |
- | +--PhysicalHashAggregate[218]@5 ( stats=(hbo)1, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=false, groupByExpr=[], outputExpr=[partial_count(*) AS `partial_count(*)`#7], partitionExpr=Optional[[]], topnFilter=false, topnPushDown=false ) |
- | +--PhysicalProject[213]@2 ( stats=99,999,999, projects=[1 AS `1`#6] ) |
- | +--PhysicalFilter[208]@1 ( stats=99,999,999, predicates=(a#0 > 0) ) |
- | +--PhysicalOlapScan[hbo_slow_query_test]@0 ( stats=100,000,000 ) |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- */
- explain {
- sql "physical plan select count(1) from hbo_slow_query_test where a > 0;"
- contains("stats=(hbo)1, aggPhase=GLOBAL")
- }
-
-}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org