mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 02:21:59 +00:00
feat: add tests
This commit is contained in:
parent
0a4882d781
commit
f52c4d0a83
@ -0,0 +1,8 @@
|
||||
Expression ((Projection + Before ORDER BY))
|
||||
MergingAggregated
|
||||
ReadFromPreparedSource (Optimized trivial count)
|
||||
2
|
||||
Expression ((Projection + Before ORDER BY))
|
||||
Aggregating
|
||||
Expression (Before GROUP BY)
|
||||
ReadFromMerge
|
27
tests/queries/0_stateless/02918_explain_merge_tables.sql
Normal file
27
tests/queries/0_stateless/02918_explain_merge_tables.sql
Normal file
@ -0,0 +1,27 @@
|
||||
DROP TABLE IF EXISTS mt1;
|
||||
DROP TABLE IF EXISTS mt2;
|
||||
DROP TABLE IF EXISTS merge;
|
||||
|
||||
CREATE TABLE mt1 (id UInt64) ENGINE = MergeTree ORDER BY id;
|
||||
|
||||
CREATE TABLE mt2 (id UInt64) ENGINE = MergeTree ORDER BY id;
|
||||
|
||||
CREATE TABLE merge (id UInt64) ENGINE = Merge(currentDatabase(), '^mt[0-9]+$');
|
||||
|
||||
INSERT INTO mt1 VALUES (1);
|
||||
INSERT INTO mt2 VALUES (1);
|
||||
|
||||
EXPLAIN SELECT count() FROM merge;
|
||||
|
||||
SELECT count() FROM merge;
|
||||
|
||||
CREATE TABLE mt3 (id UInt64) ENGINE = TinyLog;
|
||||
|
||||
INSERT INTO mt2 VALUES (2);
|
||||
|
||||
EXPLAIN SELECT count() FROM merge;
|
||||
|
||||
DROP TABLE IF EXISTS mt1;
|
||||
DROP TABLE IF EXISTS mt2;
|
||||
DROP TABLE IF EXISTS mt3;
|
||||
DROP TABLE IF EXISTS merge;
|
Loading…
Reference in New Issue
Block a user