ClickHouse/tests/queries/0_stateless/01132_max_rows_to_read.sql

30 lines
868 B
MySQL
Raw Normal View History

2020-04-14 23:46:29 +00:00
SET max_block_size = 10;
SET max_rows_to_read = 20;
SET read_overflow_mode = 'throw';
SELECT count() FROM numbers(30); -- { serverError 158 }
SELECT count() FROM numbers(19);
SELECT count() FROM numbers(20);
SELECT count() FROM numbers(21); -- { serverError 158 }
2020-05-17 07:17:54 +00:00
-- check early exception if the estimated number of rows is high
SELECT * FROM numbers(30); -- { serverError 158 }
2020-04-14 23:46:29 +00:00
SET read_overflow_mode = 'break';
SELECT count() FROM numbers(19);
SELECT count() FROM numbers(20);
SELECT count() FROM numbers(21);
2020-05-17 07:17:54 +00:00
SELECT count() FROM numbers(29);
2020-04-14 23:46:29 +00:00
SELECT count() FROM numbers(30);
2020-05-11 09:07:11 +00:00
SELECT count() FROM numbers(31);
2020-05-17 07:17:54 +00:00
-- check that partial result is returned even if the estimated number of rows is high
SELECT * FROM numbers(30);
-- the same for uneven block sizes
SET max_block_size = 11;
SELECT * FROM numbers(30);
SET max_block_size = 9;
SELECT * FROM numbers(30);