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


##########
be/src/exprs/vsearch.cpp:
##########
@@ -300,8 +300,13 @@ Status VSearchExpr::evaluate_inverted_index(VExprContext* 
context, uint32_t segm
 
     VLOG_DEBUG << "VSearchExpr: bundle.iterators.size()=" << 
bundle.iterators.size();
 
-    const bool is_nested_query = _search_param.root.clause_type == "NESTED";
-    if (bundle.iterators.empty() && !is_nested_query) {
+    auto index_query_context = index_context->get_index_query_context();
+    const bool has_nested_query = 
search_clause_contains_nested(_search_param.root);
+    const bool is_top_level_nested_query = _search_param.root.clause_type == 
"NESTED";
+    const bool collects_score =
+            index_query_context != nullptr && 
index_query_context->collection_similarity != nullptr;
+    if (bundle.iterators.empty() && !is_top_level_nested_query &&

Review Comment:
   This direct `VSearchExpr` path only preserves the new nested+score error 
when the expression is evaluated by itself. If the search is under a pushed 
`VCompoundPred` AND/OR, `VSearchExpr` can still reach `FunctionSearch` and 
return the new `INVALID_ARGUMENT`, but the compound parent catches non-OK child 
statuses, logs them, sets `all_pass=false`, and then returns OK. 
`SegmentIterator::_apply_index_expr()` never sees the non-downgradable status, 
so a score-runtime path with a compound predicate containing nested search can 
bypass the intended nested+score error and fall back to residual or generic 
handling. Please propagate non-downgradable child statuses from compound 
inverted-index evaluation, at least this nested-score `INVALID_ARGUMENT`, and 
cover the compound score-runtime path in BE tests.



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