ClickHouse/tests/queries/0_stateless/01942_create_table_with_sample.sql

15 lines
321 B
MySQL
Raw Normal View History

2021-07-14 03:53:09 +00:00
CREATE TABLE IF NOT EXISTS sample_incorrect
2021-07-12 16:46:22 +00:00
(`x` UUID)
ENGINE = MergeTree
ORDER BY tuple(x)
SAMPLE BY x; -- { serverError 59 }
2021-07-14 03:53:09 +00:00
DROP TABLE IF EXISTS sample_correct;
CREATE TABLE IF NOT EXISTS sample_correct
2021-07-12 16:46:22 +00:00
(`x` String)
ENGINE = MergeTree
ORDER BY tuple(sipHash64(x))
SAMPLE BY sipHash64(x);
2021-07-14 03:53:09 +00:00
DROP TABLE sample_correct;