airborne12 commented on code in PR #26080:
URL: https://github.com/apache/doris/pull/26080#discussion_r1375617871


##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -1040,6 +1043,55 @@ Status SegmentIterator::_apply_inverted_index() {
             }
         }
     }
+
+    // delete from _common_expr_ctxs_push_down if a MATCH predicate will be 
removed from _col_predicates
+    // since it's not necessary to eval it any more to avoid index miss, which 
is added in _normalize_predicate
+    for (auto pred : _col_predicates) {
+        if (pred->type() == PredicateType::MATCH &&
+            std::find(remaining_predicates.begin(), 
remaining_predicates.end(), pred) ==
+                    remaining_predicates.end()) {
+            MatchPredicate* match_pred = dynamic_cast<MatchPredicate*>(pred);

Review Comment:
   If we confirm that the predicate type is match, we can use static_cast to 
avoid the overhead of dynamic_cast. Otherwise, we need to check whether 
match_pred is nullptr.



-- 
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

Reply via email to