mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 02:21:59 +00:00
Add a test for distributed_group_by_no_merge=2
This commit is contained in:
parent
fffeeeba06
commit
5e71fe3f39
@ -1,6 +1,41 @@
|
||||
distributed_group_by_no_merge=1
|
||||
1 1
|
||||
1 1
|
||||
1 1
|
||||
1 1
|
||||
1 1
|
||||
1 1
|
||||
1 1
|
||||
1 1
|
||||
distributed_group_by_no_merge=2
|
||||
LIMIT
|
||||
1 1 1
|
||||
OFFSET
|
||||
2 1 1
|
||||
ALIAS
|
||||
0
|
||||
0
|
||||
ORDER BY
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
ORDER BY LIMIT
|
||||
1
|
||||
LIMIT BY
|
||||
0
|
||||
1
|
||||
LIMIT BY LIMIT
|
||||
0
|
||||
GROUP BY ORDER BY
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
GROUP BY w/ ALIAS
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
ORDER BY w/ ALIAS
|
||||
0
|
||||
|
@ -1,2 +1,40 @@
|
||||
SELECT count(), uniq(dummy) FROM remote('127.0.0.{2,3}', system.one) SETTINGS distributed_group_by_no_merge = 1;
|
||||
SELECT count(), uniq(dummy) FROM remote('127.0.0.{2,3,4,5}', system.one) SETTINGS distributed_group_by_no_merge = 1;
|
||||
SELECT 'distributed_group_by_no_merge=1';
|
||||
SELECT count(), uniq(dummy) FROM remote('127.0.0.{2,3}', system.one) SETTINGS distributed_group_by_no_merge=1;
|
||||
SELECT count(), uniq(dummy) FROM remote('127.0.0.{2,3,4,5}', system.one) SETTINGS distributed_group_by_no_merge=1;
|
||||
SELECT count(), uniq(dummy) FROM remote('127.0.0.{2,3}', system.one) LIMIT 1 SETTINGS distributed_group_by_no_merge=1;
|
||||
|
||||
SELECT 'distributed_group_by_no_merge=2';
|
||||
SET max_distributed_connections=1;
|
||||
SET max_threads=1;
|
||||
-- breaks any(_shard_num)
|
||||
SET optimize_move_functions_out_of_any=0;
|
||||
|
||||
SELECT 'LIMIT';
|
||||
SELECT any(_shard_num) shard_num, count(), uniq(dummy) FROM remote('127.0.0.{2,3}', system.one) LIMIT 1 SETTINGS distributed_group_by_no_merge=2;
|
||||
SELECT 'OFFSET';
|
||||
SELECT any(_shard_num) shard_num, count(), uniq(dummy) FROM remote('127.0.0.{2,3}', system.one) LIMIT 1, 1 SETTINGS distributed_group_by_no_merge=2;
|
||||
|
||||
SELECT 'ALIAS';
|
||||
SELECT dummy AS d FROM remote('127.0.0.{2,3}', system.one) ORDER BY d SETTINGS distributed_group_by_no_merge=2;
|
||||
|
||||
DROP TABLE IF EXISTS data_00184;
|
||||
CREATE TABLE data_00184 Engine=Memory() AS SELECT * FROM numbers(2);
|
||||
SELECT 'ORDER BY';
|
||||
SELECT number FROM remote('127.0.0.{2,3}', currentDatabase(), data_00184) ORDER BY number DESC SETTINGS distributed_group_by_no_merge=2;
|
||||
SELECT 'ORDER BY LIMIT';
|
||||
SELECT number FROM remote('127.0.0.{2,3}', currentDatabase(), data_00184) ORDER BY number DESC LIMIT 1 SETTINGS distributed_group_by_no_merge=2;
|
||||
|
||||
SELECT 'LIMIT BY';
|
||||
SELECT number FROM remote('127.0.0.{2,3}', currentDatabase(), data_00184) LIMIT 1 BY number SETTINGS distributed_group_by_no_merge=2;
|
||||
SELECT 'LIMIT BY LIMIT';
|
||||
SELECT number FROM remote('127.0.0.{2,3}', currentDatabase(), data_00184) LIMIT 1 BY number LIMIT 1 SETTINGS distributed_group_by_no_merge=2;
|
||||
|
||||
SELECT 'GROUP BY ORDER BY';
|
||||
SELECT uniq(number) u FROM remote('127.0.0.{2,3}', currentDatabase(), data_00184) GROUP BY number ORDER BY u DESC SETTINGS distributed_group_by_no_merge=2;
|
||||
|
||||
-- cover possible tricky issues
|
||||
SELECT 'GROUP BY w/ ALIAS';
|
||||
SELECT n FROM remote('127.0.0.{2,3}', currentDatabase(), data_00184) GROUP BY number AS n SETTINGS distributed_group_by_no_merge=2;
|
||||
|
||||
SELECT 'ORDER BY w/ ALIAS';
|
||||
SELECT n FROM remote('127.0.0.{2,3}', currentDatabase(), data_00184) ORDER BY number AS n LIMIT 1 SETTINGS distributed_group_by_no_merge=2;
|
||||
|
@ -1,6 +1,7 @@
|
||||
# Add testcase here to skip it in Arcadia CI (Yandex synchronization check)
|
||||
# It is useful for tests with not supported features in Arcadia build
|
||||
00105_shard_collations
|
||||
00184_shard_distributed_group_by_no_merge
|
||||
00436_convert_charset
|
||||
00490_special_line_separators_and_characters_outside_of_bmp
|
||||
00506_union_distributed
|
||||
|
Loading…
Reference in New Issue
Block a user