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


##########
be/src/exec/operator/olap_scan_operator.cpp:
##########
@@ -495,6 +495,13 @@ Status 
OlapScanLocalState::_process_conjuncts(RuntimeState* state) {
     }
     auto& p = _parent->cast<OlapScanOperatorX>();
     RETURN_IF_ERROR(validate_residual_scan_conjuncts(state, 
p._push_down_agg_type, _conjuncts));
+    if (!_conjuncts.empty()) {

Review Comment:
   [P1] Gate score pre-limit on every remaining row restriction
   
   This guard only sees scanner residuals, but storage can still remove rows 
that never appear in `_conjuncts`. On the new AGG_KEYS table, `WHERE 
search('title:needle') AND id > 2 ORDER BY score() DESC LIMIT 2` turns `id > 2` 
into a scan key, so SegmentIterator narrows `_row_bitmap` to IDs 3/4/5; 
SEARCH's independent top-k collector nevertheless keeps the global leaders IDs 
1/2, and the bitmap intersection returns too few rows. Remaining common 
expressions fail similarly, while rowset delete predicates or a MoW delete 
bitmap can discard preselected rows (the former also leaves MATCH top-k 
enabled). This is distinct from the fixed scanner-residual thread. Please 
enable a pre-limit only when its collector ranks the final visible, 
predicate-qualified candidates; otherwise collect full scores, and cover 
key/common/delete cases.



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