add a test

This commit is contained in:
Han Fei 2024-08-19 17:28:29 +00:00
parent a8a31ed137
commit 3ff97813f4
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,2 @@
50000
1

View File

@ -0,0 +1,20 @@
CREATE TABLE IF NOT EXISTS table_name
(
id UInt64
)
ENGINE = MergeTree()
ORDER BY cityHash64(id)
SAMPLE BY cityHash64(id);
INSERT INTO table_name SELECT rand() from system.numbers limit 10000;
INSERT INTO table_name SELECT rand() from system.numbers limit 10000;
INSERT INTO table_name SELECT rand() from system.numbers limit 10000;
INSERT INTO table_name SELECT rand() from system.numbers limit 10000;
INSERT INTO table_name SELECT rand() from system.numbers limit 10000;
select count() from table_name;
SELECT count() < 50 * 5 FROM (
SELECT * FROM table_name SAMPLE 50
);
DROP TABLE table_name;