add different result between compact and wide part

This commit is contained in:
MaxWk 2022-04-06 01:27:23 +08:00
parent 032df9dc5d
commit 49414a590a
2 changed files with 53 additions and 7 deletions

View File

@ -34,3 +34,39 @@
"rows_before_limit_at_least": 20000
}
{
"meta":
[
{
"name": "0",
"type": "UInt8"
}
],
"data":
[
[0]
],
"rows": 1,
"rows_before_limit_at_least": 1
}
{
"meta":
[
{
"name": "0",
"type": "UInt8"
}
],
"data":
[
[0]
],
"rows": 1,
"rows_before_limit_at_least": 20000
}

View File

@ -1,7 +1,17 @@
drop table if exists test_rows;
create table test_rows(f1 int,f2 int) engine=MergeTree partition by f1 order by f2;
insert into test_rows select 0,arrayJoin(range(10000));
insert into test_rows select 1,arrayJoin(range(10000));
select 0 from test_rows limit 1 FORMAT JSONCompact settings exact_rows_before_limit = 0,output_format_write_statistics = 0;
select 0 from test_rows limit 1 FORMAT JSONCompact settings exact_rows_before_limit = 1, output_format_write_statistics = 0;
drop table if exists test_rows;
-- Tags: no-parallel
drop table if exists test_rows_compact_part;
create table test_rows_compact_part(f1 int,f2 int) engine=MergeTree partition by f1 order by f2 settings min_bytes_for_wide_part=10485760;
insert into test_rows_compact_part select 0,arrayJoin(range(10000)) ;
insert into test_rows_compact_part select 1,arrayJoin(range(10000));
select 0 from test_rows_compact_part limit 1 FORMAT JSONCompact settings exact_rows_before_limit = 0,output_format_write_statistics = 0;
select 0 from test_rows_compact_part limit 1 FORMAT JSONCompact settings exact_rows_before_limit = 1, output_format_write_statistics = 0;
drop table if exists test_rows_compact_part;
drop table if exists test_rows_wide_part;
create table test_rows_wide_part(f1 int,f2 int) engine=MergeTree partition by f1 order by f2 settings min_bytes_for_wide_part=0;
insert into test_rows_wide_part select 0,arrayJoin(range(10000)) ;
insert into test_rows_wide_part select 1,arrayJoin(range(10000));
select 0 from test_rows_wide_part limit 1 FORMAT JSONCompact settings exact_rows_before_limit = 0,output_format_write_statistics = 0;
select 0 from test_rows_wide_part limit 1 FORMAT JSONCompact settings exact_rows_before_limit = 1, output_format_write_statistics = 0;
drop table if exists test_rows_compact_part;