mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
fix segfault in MergeTreeRangeReader
This commit is contained in:
parent
7aeb900922
commit
7041e28077
@ -333,8 +333,8 @@ void MergeTreeRangeReader::ReadResult::optimize()
|
|||||||
filter_holder_original = std::move(filter_holder);
|
filter_holder_original = std::move(filter_holder);
|
||||||
filter = new_filter.get();
|
filter = new_filter.get();
|
||||||
filter_holder = std::move(new_filter);
|
filter_holder = std::move(new_filter);
|
||||||
|
need_filter = true;
|
||||||
}
|
}
|
||||||
need_filter = true;
|
|
||||||
}
|
}
|
||||||
/// Another guess, if it's worth filtering at PREWHERE
|
/// Another guess, if it's worth filtering at PREWHERE
|
||||||
else if (countBytesInResultFilter(filter->getData()) < 0.6 * filter->size())
|
else if (countBytesInResultFilter(filter->getData()) < 0.6 * filter->size())
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
foo
|
@ -0,0 +1,11 @@
|
|||||||
|
drop table if exists t;
|
||||||
|
|
||||||
|
create table t (a Int) engine = MergeTree order by a;
|
||||||
|
|
||||||
|
-- some magic to satisfy conditions to run optimizations in MergeTreeRangeReader
|
||||||
|
insert into t select number < 10 ? 0 : 1 from numbers(50);
|
||||||
|
alter table t add column s String default 'foo';
|
||||||
|
|
||||||
|
select s from t prewhere a != 1 where rand() % 2 = 0 limit 1;
|
||||||
|
|
||||||
|
drop table t;
|
Loading…
Reference in New Issue
Block a user