From d1f34a3be45b527a9eb9f43d99a9c790a97e1812 Mon Sep 17 00:00:00 2001 From: Kang Date: Mon, 27 Mar 2023 11:29:42 +0800 Subject: [PATCH] [bugfix](inverted index)temporary disable skip read column data if it match inverted index (#18065) The optimization for skip reading column data if it match inverted index and only used in WHERE clause may get wrong result for complex SQL. This PR temporary disable the optimization and later PRs will resolve the problem fundamentality. --- be/src/olap/rowset/segment_v2/segment_iterator.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/be/src/olap/rowset/segment_v2/segment_iterator.cpp b/be/src/olap/rowset/segment_v2/segment_iterator.cpp index d11d07934d1578..41b4504757e8fc 100644 --- a/be/src/olap/rowset/segment_v2/segment_iterator.cpp +++ b/be/src/olap/rowset/segment_v2/segment_iterator.cpp @@ -852,13 +852,7 @@ Status SegmentIterator::_apply_inverted_index_on_block_column_predicate( } bool SegmentIterator::_need_read_data(ColumnId cid) { - int32_t unique_id = _schema.unique_id(cid); - if (_need_read_data_indices.count(unique_id) > 0 && !_need_read_data_indices[unique_id] && - _output_columns.count(unique_id) < 1) { - VLOG_DEBUG << "SegmentIterator no need read data for column: " - << _opts.tablet_schema->column_by_uid(unique_id).name(); - return false; - } + // TODO(xk) impl right logic return true; }