cherry pick from #41547
This commit is contained in:
@ -504,7 +504,8 @@ Status SegmentIterator::_get_row_ranges_by_column_conditions() {
|
||||
RETURN_IF_ERROR(_apply_bitmap_index());
|
||||
{
|
||||
if (_opts.runtime_state &&
|
||||
_opts.runtime_state->query_options().enable_inverted_index_query) {
|
||||
_opts.runtime_state->query_options().enable_inverted_index_query &&
|
||||
has_inverted_index_in_iterators()) {
|
||||
SCOPED_RAW_TIMER(&_opts.stats->inverted_index_filter_timer);
|
||||
size_t input_rows = _row_bitmap.cardinality();
|
||||
RETURN_IF_ERROR(_apply_inverted_index());
|
||||
|
||||
@ -157,6 +157,11 @@ public:
|
||||
return _inverted_index_iterators;
|
||||
}
|
||||
|
||||
bool has_inverted_index_in_iterators() const {
|
||||
return std::any_of(_inverted_index_iterators.begin(), _inverted_index_iterators.end(),
|
||||
[](const auto& iterator) { return iterator != nullptr; });
|
||||
}
|
||||
|
||||
private:
|
||||
Status _next_batch_internal(vectorized::Block* block);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user