github-actions[bot] commented on code in PR #65916:
URL: https://github.com/apache/doris/pull/65916#discussion_r3634888884
##########
be/src/exec/operator/olap_scan_operator.cpp:
##########
@@ -495,6 +495,9 @@ 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] Disable every score pre-limit when residual conjuncts remain
This guard leaves `_score_runtime` active. For `TopN(score DESC, K) ->
Project -> Filter(text MATCH 'needle' AND random(1) < 0.9) -> OlapScan`, the
score rewrite keeps `random(1)` as a scanner residual. SegmentIterator consumes
and erases the MATCH common expression, then calls `get_topn_bm25_scores()`,
reducing the segment to K rows before `Scanner::_filter_output_block()`
evaluates the residual; rejecting one selected row under-returns even when
another match could fill the limit. SEARCH DSL can pre-limit even earlier
through `IndexQueryContext::query_limit`. Please preserve ScoreRuntime for full
score materialization, but disable both score pre-limit stages whenever
`_conjuncts` remains nonempty, and cover this sibling case.
--
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]