diff --git a/tests/queries/0_stateless/01134_max_rows_to_group_by.reference b/tests/queries/0_stateless/01134_max_rows_to_group_by.reference new file mode 100644 index 00000000000..caaf3394975 --- /dev/null +++ b/tests/queries/0_stateless/01134_max_rows_to_group_by.reference @@ -0,0 +1,33 @@ +test2 0 +test2 1 +test2 2 +test2 3 +test2 4 +test2 5 +test2 6 +test2 7 +test2 8 +test2 9 +test2 10 +test3 0 +test3 1 +test3 2 +test3 3 +test3 4 +test3 5 +test3 6 +test3 7 +test3 8 +test3 9 +test3 10 +test5 0 +test5 1 +test5 2 +test5 3 +test5 4 +test5 5 +test5 6 +test5 7 +test5 8 +test5 9 +test5 10 diff --git a/tests/queries/0_stateless/01134_max_rows_to_group_by.sql b/tests/queries/0_stateless/01134_max_rows_to_group_by.sql new file mode 100644 index 00000000000..bfbc499e1c3 --- /dev/null +++ b/tests/queries/0_stateless/01134_max_rows_to_group_by.sql @@ -0,0 +1,17 @@ +SET max_block_size = 1; +SET max_rows_to_group_by = 10; +SET group_by_overflow_mode = 'throw'; + +SELECT 'test1', number FROM system.numbers GROUP BY number; -- { serverError 158 } + +SET group_by_overflow_mode = 'break'; +SELECT 'test2', number FROM system.numbers GROUP BY number ORDER BY number; + +SET max_rows_to_read = 500; +SELECT 'test3', number FROM system.numbers GROUP BY number ORDER BY number; + +SET group_by_overflow_mode = 'any'; +SELECT 'test4', number FROM numbers(1000) GROUP BY number ORDER BY number; -- { serverError 158 } + +SET max_rows_to_read = 1000; +SELECT 'test5', number FROM numbers(1000) GROUP BY number ORDER BY number;