xiaokang commented on code in PR #36292:
URL: https://github.com/apache/doris/pull/36292#discussion_r1641597598
##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -984,7 +1012,7 @@ std::string
SegmentIterator::_gen_predicate_result_sign(ColumnPredicate* predica
std::string col_name = column_desc->name();
- if (column_desc->path() != nullptr) {
+ if (column_desc->path() != nullptr && !_storage_name_and_type.empty()) {
Review Comment:
Is this another problem?
##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -343,6 +343,34 @@ Status SegmentIterator::_init_impl(const
StorageReadOptions& opts) {
_storage_name_and_type[i] = std::make_pair(col->name(),
storage_type);
}
}
+
+ // find columns that definitely require reading data, such as functions
that are not pushed down.
+ {
+ std::set<std::string> push_down_preds;
+ for (auto* pred : _col_predicates) {
+ if (!_check_apply_by_inverted_index(pred)) {
+ continue;
+ }
+ push_down_preds.insert(_gen_predicate_result_sign(pred));
Review Comment:
Pred may not be evaluated by index even if
_check_apply_by_inverted_index(pred) return true due to skip index based on hit
ratio. So push_down_preds.contains(column_sign) can not guarantee that the pred
for column_sing can be skipped.
--
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]