[Enhancement](inverted index) set need to read data only when delete predicate contains the column (#33172)

This commit is contained in:
airborne12
2024-04-03 10:48:59 +08:00
committed by yiguolei
parent c61d6ad1e2
commit 7f2fdf78ac

View File

@ -1093,7 +1093,9 @@ bool SegmentIterator::_need_read_data(ColumnId cid) {
return true;
}
// if there is delete predicate, we always need to read data
if (_opts.delete_condition_predicates->num_of_column_predicate() > 0) {
std::set<uint32_t> delete_columns_set;
_opts.delete_condition_predicates->get_all_column_ids(delete_columns_set);
if (delete_columns_set.count(cid) > 0) {
return true;
}
if (_output_columns.count(-1)) {