yiguolei commented on code in PR #66472:
URL: https://github.com/apache/doris/pull/66472#discussion_r3765544540
##########
be/src/storage/segment/segment_iterator.cpp:
##########
@@ -1940,185 +1854,76 @@ Status SegmentIterator::_seek_columns(const
std::vector<ColumnId>& column_ids, r
// todo(wb) need a UT here
Status SegmentIterator::_vec_init_lazy_materialization() {
- _is_pred_column.resize(_schema->columns().size(), false);
-
- // including short/vec/delete pred
- std::set<ColumnId> pred_column_ids;
- _lazy_materialization_read = false;
-
- std::set<ColumnId> del_cond_id_set;
- _opts.delete_condition_predicates->get_all_column_ids(del_cond_id_set);
-
- std::set<std::shared_ptr<const ColumnPredicate>> delete_predicate_set {};
-
_opts.delete_condition_predicates->get_all_column_predicate(delete_predicate_set);
- for (auto predicate : delete_predicate_set) {
- if (PredicateTypeTraits::is_range(predicate->type())) {
- _delete_range_column_ids.push_back(predicate->column_id());
- } else if (PredicateTypeTraits::is_bloom_filter(predicate->type())) {
- _delete_bloom_filter_column_ids.push_back(predicate->column_id());
- }
- }
+ // Inverted-index evaluation may have removed fully evaluated predicates
+ // from _col_predicates. Rebuild only the row-predicate part; delete
+ // predicate membership is stable for the lifetime of this iterator.
+ _rebuild_row_predicate_columns();
// Step1: extract columns that can be lazy materialization
- if (!_col_predicates.empty() || !del_cond_id_set.empty()) {
- std::set<ColumnId> short_cir_pred_col_id_set; // using set for
distinct cid
- std::set<ColumnId> vec_pred_col_id_set;
-
- for (auto predicate : _col_predicates) {
- auto cid = predicate->column_id();
- _is_pred_column[cid] = true;
- pred_column_ids.insert(cid);
-
- // check pred using short eval or vec eval
- if (_can_evaluated_by_vectorized(predicate)) {
- vec_pred_col_id_set.insert(cid);
- _pre_eval_block_predicate.push_back(predicate);
- } else {
- short_cir_pred_col_id_set.insert(cid);
- _short_cir_eval_predicate.push_back(predicate);
- }
- if (predicate->is_runtime_filter()) {
- _filter_info_id.push_back(predicate);
Review Comment:
这个没用了吗
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]