Polishing

+ try to stabilize distinct in order perf test
This commit is contained in:
Igor Nikonov 2023-02-05 13:38:20 +00:00
parent 2a48f3c88b
commit 089a0009ad
2 changed files with 7 additions and 1 deletions

View File

@ -99,7 +99,11 @@ void updateStepsDataStreams(StepStack & steps_to_update)
while (!steps_to_update.empty())
{
dynamic_cast<ITransformingStep *>(steps_to_update.back())->updateInputStream(*input_stream);
auto * transforming_step = dynamic_cast<ITransformingStep *>(steps_to_update.back());
if (!transforming_step)
break;
transforming_step->updateInputStream(*input_stream);
input_stream = &steps_to_update.back()->getOutputStream();
steps_to_update.pop_back();
}

View File

@ -2,6 +2,7 @@
<!-- high cardinality -->
<create_query>CREATE TABLE distinct_cardinality_high (high UInt64, medium UInt64, low UInt64) ENGINE MergeTree() ORDER BY (high, medium)</create_query>
<fill_query>INSERT INTO distinct_cardinality_high SELECT number % 1e6, number % 1e4, number % 1e2 FROM numbers_mt(1e8)</fill_query>
<fill_query>OPTIMIZE TABLE distinct_cardinality_high FINAL</fill_query>
<query>SELECT DISTINCT high FROM distinct_cardinality_high FORMAT Null</query>
<query>SELECT DISTINCT high, medium FROM distinct_cardinality_high FORMAT Null</query>
@ -14,6 +15,7 @@
<!-- low cardinality -->
<create_query>CREATE TABLE distinct_cardinality_low (low UInt64, medium UInt64, high UInt64) ENGINE MergeTree() ORDER BY (low, medium)</create_query>
<fill_query>INSERT INTO distinct_cardinality_low SELECT number % 1e2, number % 1e4, number % 1e6 FROM numbers_mt(1e8)</fill_query>
<fill_query>OPTIMIZE TABLE distinct_cardinality_low FINAL</fill_query>
<query>SELECT DISTINCT low FROM distinct_cardinality_low FORMAT Null</query>
<query>SELECT DISTINCT low, medium FROM distinct_cardinality_low FORMAT Null</query>