Updated test with prewhere sampling. [#CLICKHOUSE-3972]

This commit is contained in:
Nikolai Kochetov 2018-09-10 13:14:09 +03:00
parent 1d62c9309c
commit 0f7b2ae748
2 changed files with 5 additions and 0 deletions

View File

@ -4,3 +4,7 @@ insert into test.tab values (1, 2), (1, 4);
select a from test.tab sample 1 / 2 prewhere b = 2;
drop table if exists test.tab;
DROP TABLE IF EXISTS test.sample_prewhere;
CREATE TABLE test.sample_prewhere (CounterID UInt32, UserID UInt64) ENGINE = MergeTree ORDER BY UserID SAMPLE BY UserID;
SELECT count() FROM test.sample_prewhere SAMPLE 1/2 PREWHERE CounterID = 1;
DROP TABLE test.sample_prewhere;