From 8a4806e8c041b7761827dbee22a78512f2e28fee Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Thu, 15 Sep 2022 10:53:42 +0000 Subject: [PATCH] Fix test - remove perfomance queries which can be unstable --- tests/performance/distinct_in_order.xml | 10 ---------- .../02317_distinct_in_order_optimization_explain.sh | 11 ++++++----- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/tests/performance/distinct_in_order.xml b/tests/performance/distinct_in_order.xml index ee1094ed395..78856b507e7 100644 --- a/tests/performance/distinct_in_order.xml +++ b/tests/performance/distinct_in_order.xml @@ -4,15 +4,10 @@ INSERT INTO distinct_cardinality_high SELECT number % 1e6, number % 1e4, number % 1e2 FROM numbers_mt(1e8) SELECT DISTINCT high FROM distinct_cardinality_high FORMAT Null - SELECT DISTINCT high, low FROM distinct_cardinality_high FORMAT Null SELECT DISTINCT high, medium FROM distinct_cardinality_high FORMAT Null - SELECT DISTINCT high, medium, low FROM distinct_cardinality_high FORMAT Null SELECT DISTINCT high, medium FROM distinct_cardinality_high ORDER BY high, medium FORMAT Null SELECT DISTINCT high, medium FROM distinct_cardinality_high ORDER BY high FORMAT Null - SELECT DISTINCT high, medium FROM distinct_cardinality_high ORDER BY medium FORMAT Null - SELECT DISTINCT high, low FROM distinct_cardinality_high ORDER BY low FORMAT Null - SELECT DISTINCT high, medium, low FROM distinct_cardinality_high ORDER BY low FORMAT Null DROP TABLE IF EXISTS distinct_cardinality_high @@ -22,14 +17,9 @@ SELECT DISTINCT low FROM distinct_cardinality_low FORMAT Null SELECT DISTINCT low, medium FROM distinct_cardinality_low FORMAT Null - SELECT DISTINCT low, high FROM distinct_cardinality_low FORMAT Null - SELECT DISTINCT low, medium, high FROM distinct_cardinality_low FORMAT Null SELECT DISTINCT low, medium FROM distinct_cardinality_low ORDER BY low, medium FORMAT Null SELECT DISTINCT low, medium FROM distinct_cardinality_low ORDER BY low FORMAT Null - SELECT DISTINCT low, medium FROM distinct_cardinality_low ORDER BY medium FORMAT Null - SELECT DISTINCT low, high FROM distinct_cardinality_low ORDER BY high FORMAT Null - SELECT DISTINCT low, medium, high FROM distinct_cardinality_low ORDER BY high FORMAT Null DROP TABLE IF EXISTS distinct_cardinality_low diff --git a/tests/queries/0_stateless/02317_distinct_in_order_optimization_explain.sh b/tests/queries/0_stateless/02317_distinct_in_order_optimization_explain.sh index 6ce6b9f63b9..db1ea703e61 100755 --- a/tests/queries/0_stateless/02317_distinct_in_order_optimization_explain.sh +++ b/tests/queries/0_stateless/02317_distinct_in_order_optimization_explain.sh @@ -60,17 +60,18 @@ echo "-- Check reading in order for distinct" echo "-- disabled, distinct columns match sorting key" $CLICKHOUSE_CLIENT -nq "$DISABLE_OPTIMIZATION;explain pipeline select distinct a, b from distinct_in_order_explain" | eval $FIND_READING_DEFAULT echo "-- enabled, distinct columns match sorting key" -$CLICKHOUSE_CLIENT -nq "$ENABLE_OPTIMIZATION;explain pipeline select distinct a, b from distinct_in_order_explain" | eval $FIND_READING_IN_ORDER +# read_in_order_two_level_merge_threshold is set here to avoid repeating MergeTreeInOrder in output +$CLICKHOUSE_CLIENT --read_in_order_two_level_merge_threshold=2 -nq "$ENABLE_OPTIMIZATION;explain pipeline select distinct a, b from distinct_in_order_explain" | eval $FIND_READING_IN_ORDER echo "-- enabled, distinct columns form prefix of sorting key" -$CLICKHOUSE_CLIENT -nq "$ENABLE_OPTIMIZATION;explain pipeline select distinct a, b from distinct_in_order_explain" | eval $FIND_READING_IN_ORDER +$CLICKHOUSE_CLIENT --read_in_order_two_level_merge_threshold=2 -nq "$ENABLE_OPTIMIZATION;explain pipeline select distinct a, b from distinct_in_order_explain" | eval $FIND_READING_IN_ORDER echo "-- enabled, distinct columns DON't form prefix of sorting key" $CLICKHOUSE_CLIENT -nq "$ENABLE_OPTIMIZATION;explain pipeline select distinct b from distinct_in_order_explain" | eval $FIND_READING_DEFAULT echo "-- enabled, distinct columns contains constant columns, non-const columns form prefix of sorting key" -$CLICKHOUSE_CLIENT -nq "$ENABLE_OPTIMIZATION;explain pipeline select distinct 1, a from distinct_in_order_explain" | eval $FIND_READING_IN_ORDER +$CLICKHOUSE_CLIENT --read_in_order_two_level_merge_threshold=2 -nq "$ENABLE_OPTIMIZATION;explain pipeline select distinct 1, a from distinct_in_order_explain" | eval $FIND_READING_IN_ORDER echo "-- enabled, distinct columns contains constant columns, non-const columns match prefix of sorting key" -$CLICKHOUSE_CLIENT -nq "$ENABLE_OPTIMIZATION;explain pipeline select distinct 1, b, a from distinct_in_order_explain" | eval $FIND_READING_IN_ORDER +$CLICKHOUSE_CLIENT --read_in_order_two_level_merge_threshold=2 -nq "$ENABLE_OPTIMIZATION;explain pipeline select distinct 1, b, a from distinct_in_order_explain" | eval $FIND_READING_IN_ORDER echo "-- check that sorting properties are propagated from ReadFromMergeTree till preliminary distinct" $CLICKHOUSE_CLIENT -nq "$ENABLE_OPTIMIZATION;explain plan sorting=1 select distinct b, a from distinct_in_order_explain where a > 0" | eval $FIND_SORTING_PROPERTIES -$CLICKHOUSE_CLIENT -q "drop table if exists distinct_in_order_explain sync" +# $CLICKHOUSE_CLIENT -q "drop table if exists distinct_in_order_explain sync"