dbms: Server: Added functional test. [#METR-16435]

This commit is contained in:
Alexey Arno 2015-07-13 16:25:56 +03:00
parent 231588919f
commit a3cd654331
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,3 @@
1000000
1
1

View File

@ -0,0 +1,13 @@
DROP TABLE IF EXISTS test.parallel_replicas;
CREATE TABLE test.parallel_replicas (d Date DEFAULT today(), x UInt32, u UInt64, s String) ENGINE = MergeTree(d, cityHash64(u, s), (x, d, cityHash64(u, s)), 8192);
INSERT INTO test.parallel_replicas (x, u, s) SELECT toUInt32(number / 1000) AS x, toUInt64(number % 1000) AS u, toString(rand64()) AS s FROM system.numbers LIMIT 1000000;
SELECT count() FROM test.parallel_replicas;
SELECT count() > 0 FROM test.parallel_replicas SAMPLE 0.5;
SET parallel_replicas_count = 2;
SELECT count() > 0 FROM test.parallel_replicas;
SET parallel_replica_offset = 1;
SELECT count() FROM test.parallel_replicas;