mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
add a test
This commit is contained in:
parent
a8a31ed137
commit
3ff97813f4
2
tests/queries/0_stateless/03227_test_sample_n.reference
Normal file
2
tests/queries/0_stateless/03227_test_sample_n.reference
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
50000
|
||||||
|
1
|
20
tests/queries/0_stateless/03227_test_sample_n.sql
Normal file
20
tests/queries/0_stateless/03227_test_sample_n.sql
Normal 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;
|
Loading…
Reference in New Issue
Block a user