Added test with prewhere and missing column. [#CLICKHOUSE-3975]

This commit is contained in:
Nikolai Kochetov 2018-09-10 18:52:50 +03:00
parent 2ea009bddc
commit d7116dabfe
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,5 @@
1 Hello, world!
1 Hello, world! 0
2 Goodbye. 3
Goodbye.
Goodbye. 3

View File

@ -0,0 +1,14 @@
DROP TABLE IF EXISTS test.mergetree;
CREATE TABLE test.mergetree (x UInt8, s String) ENGINE = MergeTree ORDER BY tuple();
INSERT INTO test.mergetree VALUES (1, 'Hello, world!');
SELECT * FROM test.mergetree;
ALTER TABLE test.mergetree ADD COLUMN y UInt8 DEFAULT 0;
INSERT INTO test.mergetree VALUES (2, 'Goodbye.', 3);
SELECT * FROM test.mergetree ORDER BY x;
SELECT s FROM test.mergetree PREWHERE x AND y ORDER BY s;
SELECT s, y FROM test.mergetree PREWHERE x AND y ORDER BY s;
DROP TABLE test.mergetree;