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


##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -717,10 +717,15 @@ Status 
SegmentIterator::_apply_index_except_leafnode_of_andnode() {
             continue;
         }
 
+        int32_t unique_id = _schema->unique_id(pred->column_id());
+        bool need_remaining_after_evaluate = 
_column_has_fulltext_index(unique_id) &&
+                                             
PredicateTypeTraits::is_equal_or_list(pred_type);
         if (!res.ok()) {
-            if ((res.code() == ErrorCode::INVERTED_INDEX_FILE_NOT_FOUND &&
-                 pred->type() != PredicateType::MATCH) ||
-                res.code() == ErrorCode::INVERTED_INDEX_FILE_HIT_LIMIT) {
+            if (res.code() == ErrorCode::INVERTED_INDEX_FILE_NOT_FOUND ||
+                res.code() == ErrorCode::INVERTED_INDEX_FILE_HIT_LIMIT ||
+                res.code() == ErrorCode::INVERTED_INDEX_EVALUATE_SKIPPED ||
+                (res.code() == ErrorCode::INVERTED_INDEX_NO_TERMS &&
+                 need_remaining_after_evaluate)) {

Review Comment:
   wrap as a function, so _apply_inverted_index_on_column_predicate can also 
use it, and next time you change your condition, you will not forget that



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