yiguolei commented on code in PR #33934: URL: https://github.com/apache/doris/pull/33934#discussion_r1573838232
########## be/src/olap/rowset/segment_v2/segment_iterator.cpp: ########## @@ -1957,13 +1957,12 @@ void SegmentIterator::_replace_version_col(size_t num_rows) { uint16_t SegmentIterator::_evaluate_vectorization_predicate(uint16_t* sel_rowid_idx, uint16_t selected_size) { SCOPED_RAW_TIMER(&_opts.stats->vec_cond_ns); - if (_is_need_vec_eval) { - _is_need_vec_eval = false; - for (const auto& pred : _pre_eval_block_predicate) { - _is_need_vec_eval |= (!pred->always_true()); - } - } - if (!_is_need_vec_eval) { + bool all_pred_always_true = + std::all_of(_pre_eval_block_predicate.begin(), _pre_eval_block_predicate.end(), + [](const auto& pred) { return pred->always_true(); }); + + //If all predicates are always_true, then return directly. + if (all_pred_always_true) { Review Comment: 这里为什么不检查_is_need_vec_eval? 按道理说应该是all_pred_always_true || !_is_need_vec_eval -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org