mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
add test [#CLICKHOUSE-3133]
This commit is contained in:
parent
18672204e5
commit
cdd211eae0
@ -1,3 +1,5 @@
|
||||
*** In-memory aggregation.
|
||||
**** totals_mode = after_having_auto
|
||||
0 2 1
|
||||
1 2 3
|
||||
2 2 5
|
||||
@ -10,6 +12,7 @@
|
||||
9 2 19
|
||||
|
||||
0 500000 499999
|
||||
**** totals_mode = after_having_inclusive
|
||||
0 2 1
|
||||
1 2 3
|
||||
2 2 5
|
||||
@ -22,6 +25,7 @@
|
||||
9 2 19
|
||||
|
||||
0 500000 499999
|
||||
**** totals_mode = after_having_exclusive
|
||||
0 2 1
|
||||
1 2 3
|
||||
2 2 5
|
||||
@ -34,6 +38,60 @@
|
||||
9 2 19
|
||||
|
||||
0 200002 200001
|
||||
**** totals_mode = before_having
|
||||
0 2 1
|
||||
1 2 3
|
||||
2 2 5
|
||||
3 2 7
|
||||
4 2 9
|
||||
5 2 11
|
||||
6 2 13
|
||||
7 2 15
|
||||
8 2 17
|
||||
9 2 19
|
||||
|
||||
0 500000 499999
|
||||
*** External aggregation.
|
||||
**** totals_mode = after_having_auto
|
||||
0 2 1
|
||||
1 2 3
|
||||
2 2 5
|
||||
3 2 7
|
||||
4 2 9
|
||||
5 2 11
|
||||
6 2 13
|
||||
7 2 15
|
||||
8 2 17
|
||||
9 2 19
|
||||
|
||||
0 500000 499999
|
||||
**** totals_mode = after_having_inclusive
|
||||
0 2 1
|
||||
1 2 3
|
||||
2 2 5
|
||||
3 2 7
|
||||
4 2 9
|
||||
5 2 11
|
||||
6 2 13
|
||||
7 2 15
|
||||
8 2 17
|
||||
9 2 19
|
||||
|
||||
0 500000 499999
|
||||
**** totals_mode = after_having_exclusive
|
||||
0 2 1
|
||||
1 2 3
|
||||
2 2 5
|
||||
3 2 7
|
||||
4 2 9
|
||||
5 2 11
|
||||
6 2 13
|
||||
7 2 15
|
||||
8 2 17
|
||||
9 2 19
|
||||
|
||||
0 200002 200001
|
||||
**** totals_mode = before_having
|
||||
0 2 1
|
||||
1 2 3
|
||||
2 2 5
|
||||
|
@ -1,15 +1,43 @@
|
||||
SELECT '*** In-memory aggregation.';
|
||||
|
||||
SET max_rows_to_group_by = 100000;
|
||||
SET max_block_size = 100001;
|
||||
SET group_by_overflow_mode = 'any';
|
||||
|
||||
SELECT '**** totals_mode = after_having_auto';
|
||||
SET totals_mode = 'after_having_auto';
|
||||
SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM (SELECT number FROM system.numbers LIMIT 500000) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10;
|
||||
|
||||
SELECT '**** totals_mode = after_having_inclusive';
|
||||
SET totals_mode = 'after_having_inclusive';
|
||||
SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM (SELECT number FROM system.numbers LIMIT 500000) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10;
|
||||
|
||||
SELECT '**** totals_mode = after_having_exclusive';
|
||||
SET totals_mode = 'after_having_exclusive';
|
||||
SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM (SELECT number FROM system.numbers LIMIT 500000) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10;
|
||||
|
||||
SELECT '**** totals_mode = before_having';
|
||||
SET totals_mode = 'before_having';
|
||||
SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM (SELECT number FROM system.numbers LIMIT 500000) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10;
|
||||
|
||||
|
||||
SELECT '*** External aggregation.';
|
||||
|
||||
SET max_bytes_before_external_group_by=1000000;
|
||||
SET group_by_two_level_threshold = 100000;
|
||||
|
||||
SELECT '**** totals_mode = after_having_auto';
|
||||
SET totals_mode = 'after_having_auto';
|
||||
SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM (SELECT number FROM system.numbers LIMIT 500000) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10;
|
||||
|
||||
SELECT '**** totals_mode = after_having_inclusive';
|
||||
SET totals_mode = 'after_having_inclusive';
|
||||
SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM (SELECT number FROM system.numbers LIMIT 500000) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10;
|
||||
|
||||
SELECT '**** totals_mode = after_having_exclusive';
|
||||
SET totals_mode = 'after_having_exclusive';
|
||||
SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM (SELECT number FROM system.numbers LIMIT 500000) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10;
|
||||
|
||||
SELECT '**** totals_mode = before_having';
|
||||
SET totals_mode = 'before_having';
|
||||
SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM (SELECT number FROM system.numbers LIMIT 500000) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10;
|
||||
|
Loading…
Reference in New Issue
Block a user