From 1f0990ff1d2eb095fadfe634d86690abb1a3bf48 Mon Sep 17 00:00:00 2001 From: hexiaoting Date: Fri, 14 May 2021 16:18:27 +0800 Subject: [PATCH] Add test case --- .../01861_explain_pipeline.reference | 31 +++++++++++++++++++ .../0_stateless/01861_explain_pipeline.sql | 10 ++++++ 2 files changed, 41 insertions(+) create mode 100644 tests/queries/0_stateless/01861_explain_pipeline.reference create mode 100644 tests/queries/0_stateless/01861_explain_pipeline.sql diff --git a/tests/queries/0_stateless/01861_explain_pipeline.reference b/tests/queries/0_stateless/01861_explain_pipeline.reference new file mode 100644 index 00000000000..8d755f807c0 --- /dev/null +++ b/tests/queries/0_stateless/01861_explain_pipeline.reference @@ -0,0 +1,31 @@ +(Expression) +ExpressionTransform + (SettingQuotaAndLimits) + (Expression) + ExpressionTransform + (MergingFinal) + ReplacingSorted 2 → 1 + (Expression) + ExpressionTransform × 2 + (ReadFromMergeTree) + MergeTree × 2 0 → 1 +0 0 +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +(Expression) +ExpressionTransform × 2 + (SettingQuotaAndLimits) + (Expression) + ExpressionTransform × 2 + (MergingFinal) + ReplacingSorted × 2 2 → 1 + Copy × 2 1 → 2 + AddingSelector × 2 + (Expression) + ExpressionTransform × 2 + (ReadFromMergeTree) + MergeTree × 2 0 → 1 diff --git a/tests/queries/0_stateless/01861_explain_pipeline.sql b/tests/queries/0_stateless/01861_explain_pipeline.sql new file mode 100644 index 00000000000..aafecf57af1 --- /dev/null +++ b/tests/queries/0_stateless/01861_explain_pipeline.sql @@ -0,0 +1,10 @@ +DROP TABLE IF EXISTS test; +CREATE TABLE test(a Int, b Int) Engine=ReplacingMergeTree order by a; +INSERT INTO test select number, number from numbers(5); +INSERT INTO test select number, number from numbers(5,2); +set max_threads =1; +explain pipeline select * from test final; +select * from test final; +set max_threads =2; +explain pipeline select * from test final; +DROP TABLE test;