mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Fix trivial mistake in filtering by virtual columns
This commit is contained in:
parent
b571656fd7
commit
22720dd7a4
@ -486,9 +486,13 @@ void MergeTreeRangeReader::ReadResult::setFilter(const ColumnPtr & new_filter)
|
||||
|
||||
ConstantFilterDescription const_description(*new_filter);
|
||||
if (const_description.always_true)
|
||||
{
|
||||
setFilterConstTrue();
|
||||
}
|
||||
else if (const_description.always_false)
|
||||
{
|
||||
clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
FilterDescription filter_description(*new_filter);
|
||||
|
@ -191,10 +191,15 @@ void filterBlockWithQuery(const ASTPtr & query, Block & block, ContextPtr contex
|
||||
ConstantFilterDescription constant_filter(*filter_column);
|
||||
|
||||
if (constant_filter.always_true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (constant_filter.always_false)
|
||||
{
|
||||
block = block.cloneEmpty();
|
||||
return;
|
||||
}
|
||||
|
||||
FilterDescription filter(*filter_column);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user