Skip to content

CollapsingMergeTree and split_intersecting_parts_ranges #73640

@den-crane

Description

@den-crane
create table test (
  key Int8,
  sign Int8
) engine = CollapsingMergeTree(sign) order by key;

insert into test values (5,-1);
 
optimize table test  final; -- to move part to a level 1, to enable optimizations

select count() from test final 
format Pretty;

   +---------+
   | count() |
   +---------+
1. |       1 | -- expected 0 (FROM FINAL should not expose sign = -1)
   +---------+

select count() from test final 
settings split_intersecting_parts_ranges_into_layers_final=0,   
split_parts_ranges_into_intersecting_and_non_intersecting_final=0
format Pretty;

   +---------+
   | count() |
   +---------+
1. |       0 |
   +---------+

https://fiddle.clickhouse.com/fa56ffdd-1a68-4e2f-8d0d-dd79b50bd557


split_intersecting_parts_ranges_into_layers_final = 0
split_parts_ranges_into_intersecting_and_non_intersecting_final = 1

https://fiddle.clickhouse.com/63361a4a-ac7d-4543-87a2-f349fa8e14a6

select count() from test final 
settings split_intersecting_parts_ranges_into_layers_final=0,   
split_parts_ranges_into_intersecting_and_non_intersecting_final=1
format Pretty;

DB::Exception: Not found column sign in block. There are only columns: . (NOT_FOUND_COLUMN_IN_BLOCK)

Metadata

Metadata

Assignees

Labels

unexpected behaviourResult is unexpected, but not entirely wrong at the same time.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions