This commit is contained in:
Alexey Milovidov 2018-03-01 10:18:15 +03:00
parent c42d3ac17f
commit 4c87ae427d
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,5 @@
1 hello
1 hello
1 hello
1 hello
1 hello

View File

@ -0,0 +1,15 @@
DROP TABLE IF EXISTS test.mergetree;
DROP TABLE IF EXISTS test.distributed;
CREATE TABLE test.mergetree (x UInt64, s String) ENGINE = MergeTree ORDER BY x;
INSERT INTO test.mergetree VALUES (1, 'hello'), (2, 'world');
SELECT * FROM test.mergetree PREWHERE x = 1 WHERE s LIKE '%l%' ORDER BY x, s;
SELECT * FROM remote('127.0.0.{1,2,3}', test.mergetree) PREWHERE x = 1 WHERE s LIKE '%l%' ORDER BY x, s;
CREATE TABLE test.distributed AS test.mergetree ENGINE = Distributed(test_shard_localhost, test, mergetree);
SELECT * FROM test.distributed PREWHERE x = 1 WHERE s LIKE '%l%' ORDER BY x, s;
DROP TABLE test.mergetree;
DROP TABLE test.distributed;