yiguolei commented on code in PR #66472:
URL: https://github.com/apache/doris/pull/66472#discussion_r3764816105
##########
be/src/storage/segment/segment_iterator.h:
##########
@@ -361,45 +321,28 @@ class SegmentIterator : public RowwiseIterator {
rowid_t _cur_rowid;
// members related to lazy materialization read
// --------------------------------------------
- // whether lazy materialization read should be used.
- bool _lazy_materialization_read;
- // columns to read after predicate evaluation and remaining expr execute
- std::vector<ColumnId> _non_predicate_columns;
- std::set<ColumnId> _common_expr_columns;
// remember the rowids we've read for the current row block.
// could be a local variable of next_batch(), kept here to reuse vector
memory
std::vector<rowid_t> _block_rowids;
bool _is_need_vec_eval = false;
bool _is_need_short_eval = false;
bool _is_need_expr_eval = false;
- std::set<ColumnId> _support_lazy_read_pruned_columns;
bool _enable_prune_nested_column = false;
- // fields for vectorization execution
- std::vector<ColumnId>
- _vec_pred_column_ids; // keep columnId of columns for vectorized
predicate evaluation
- std::vector<ColumnId>
- _short_cir_pred_column_ids; // keep columnId of columns for short
circuit predicate evaluation
- std::vector<bool> _is_pred_column; // columns hold _init segmentIter
- std::map<uint32_t, bool> _need_read_data_indices;
- std::vector<bool> _is_common_expr_column;
- MutableColumns _current_return_columns;
+ // Per-column state indexed by read schema ordinal. Ordered column lists
+ // below are execution plans rather than additional column membership sets.
+ std::vector<ColumnReadState> _column_states;
+ // Columns of the current batch, indexed by read schema ordinal.
+ MutableColumns _current_columns;
std::vector<std::shared_ptr<ColumnPredicate>> _pre_eval_block_predicate;
std::vector<std::shared_ptr<ColumnPredicate>> _short_cir_eval_predicate;
- std::vector<uint32_t> _delete_range_column_ids;
- std::vector<uint32_t> _delete_bloom_filter_column_ids;
- // when lazy materialization is enabled, segmentIter need to read data at
least twice
- // first, read predicate columns by various index
- // second, read non-predicate columns
- // so we need a field to stand for columns first time to read
- std::vector<ColumnId> _predicate_column_ids;
- std::vector<ColumnId> _common_expr_column_ids;
- // Block slot indexes to filter after common expr evaluation. This is not
- // tablet column ids because Block::filter_block_internal filters by block
- // position.
- std::vector<ColumnId> _columns_to_filter;
- std::vector<bool> _converted_column_ids;
+ // Ordered, disjoint column-role lists built once and reused by every
batch.
+ std::vector<ColumnId> _predicate_ordinals;
+ std::vector<ColumnId> _common_expr_ordinals;
+ std::vector<ColumnId> _output_ordinals;
+ // Sparse, ordered execution list for recovering pruned nested children.
+ std::vector<ColumnId> _lazy_pruned_ordinals;
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]