mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Fix verbatim partition pruner
This commit is contained in:
parent
4eb684603a
commit
9961182e86
@ -714,6 +714,13 @@ bool KeyCondition::canConstantBeWrappedByFunctions(
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if we have enough columns to fulfill the action.
|
||||
for (const auto & name : action.getNeededColumns())
|
||||
{
|
||||
if (!transform.has(name))
|
||||
return false;
|
||||
}
|
||||
action.execute(transform, true);
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
2 3
|
||||
9 5
|
||||
8 4
|
||||
1 2 3
|
||||
|
@ -21,3 +21,10 @@ select * from xy where intHash64(x) % 2 = intHash64(2) % 2;
|
||||
select * from xy where x = 8;
|
||||
|
||||
drop table if exists xy;
|
||||
|
||||
-- Test if we provide enough columns to generate a partition value
|
||||
drop table if exists xyz;
|
||||
create table xyz(x int, y int, z int) engine MergeTree partition by if(toUInt8(x), y, z) order by x settings index_granularity = 1;
|
||||
insert into xyz values (1, 2, 3);
|
||||
select * from xyz where y = 2;
|
||||
drop table if exists xyz;
|
||||
|
Loading…
Reference in New Issue
Block a user