github-actions[bot] commented on code in PR #69160:
URL: https://github.com/apache/doris/pull/69160#discussion_r4295209565


##########
be/src/exprs/vcompound_pred.h:
##########
@@ -348,8 +366,19 @@ class VCompoundPred : public VectorizedFnCall {
                     "Compound operator must be AND, OR, or NOT to execute with 
inverted index.");
         }
 
+        if (branch_similarity != nullptr && _op != TExprOpcode::COMPOUND_NOT) {
+            auto scores = branch_similarity->release_scores();
+            if (!scores.empty() && (!all_pass || res.is_empty())) {

Review Comment:
   [P1] Propagate incomplete-scoring failures through parent compounds
   
   Using the new regression table, `WHERE (title MATCH_ANY 'apple' AND id > 0) 
OR tags MATCH_ANY 'missing_token' ORDER BY score() DESC LIMIT 100` reaches 
`OR(AND(scored MATCH, unindexed predicate), empty MATCH)`. The inner AND moves 
out and discards its scores before returning `INVERTED_INDEX_NOT_SUPPORTED`. 
The outer OR logs that error and continues, but its own map is empty because 
the other MATCH has no hits, so this `!scores.empty()` guard returns OK instead 
of preserving the failure. SegmentIterator then keeps the predicate for 
residual evaluation and materializes the empty root collector as zero scores; 
the cached MATCH bitmap still lets the apple rows pass. This silently changes 
valid positive scores to 0 and can corrupt ranking/score-range results. 
Propagate the incomplete-scoring error independently of remaining score-map 
contents, and cover the nested error with an empty/non-scoring sibling.



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

Reply via email to