Add a test for adjusting last granula with max_read_buffer_size=0

This commit is contained in:
Azat Khuzhin 2021-10-14 21:11:54 +03:00
parent 3c8e963420
commit 4e3910e564
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,8 @@
1
1
10
10
100
100
10000
10000

View File

@ -0,0 +1,19 @@
-- Tags: long
{% for rows_in_table in [1, 10, 100, 10000] %}
{% for wide in [0, 100000000] %}
drop table if exists data_02052_{{ rows_in_table }}_wide{{ wide }};
create table data_02052_{{ rows_in_table }}_wide{{ wide }} (key Int, value String)
engine=MergeTree()
order by key
settings
min_bytes_for_wide_part={{ wide }}
as select number, repeat(toString(number), 5) from numbers({{ rows_in_table }});
-- avoid any optimizations with ignore(*)
select count(ignore(*)) from data_02052_{{ rows_in_table }}_wide{{ wide }} settings max_read_buffer_size=1, max_threads=1;
select count(ignore(*)) from data_02052_{{ rows_in_table }}_wide{{ wide }} settings max_read_buffer_size=0, max_threads=1; -- { serverError CANNOT_READ_ALL_DATA }
drop table data_02052_{{ rows_in_table }}_wide{{ wide }};
{% endfor %}
{% endfor %}