BiteTheDDDDt opened a new pull request, #62872:
URL: https://github.com/apache/doris/pull/62872

   ### What problem does this PR solve?
   
   Related PR: #59786
   
   Problem Summary: PR #59786 (commit e78d089ec81) refactored 
`Scanner::try_append_late_arrival_runtime_filter()` and accidentally removed 
the trailing `_applied_rf_num = arrived_rf_num;` assignment. As a result 
`_applied_rf_num` is permanently 0 after construction:
   
   * the fast-path `_applied_rf_num == _total_rf_num` early return at the top 
of the function never fires, so every batch goes through the full late-arrival 
check;
   * `arrived_rf_num == _applied_rf_num` only short-circuits when no runtime 
filter has ever arrived. Once any RF arrives, every subsequent call needlessly 
`_conjuncts.clear()`s, re-clones the conjunct ctxs and appends the old ones 
into `_stale_expr_ctxs` — wasted CPU plus slow memory growth;
   * the `ApplyAllRuntimeFilters=True` info string in scanner profile 
(`file_scanner.cpp:384`) is never emitted;
   * `DCHECK(_applied_rf_num < _total_rf_num)` is effectively dead because the 
left-hand side is always 0.
   
   Restore the single missing assignment after cloning the new conjunct ctxs.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test: No need to test (one-line restoration of removed assignment; 
behavior covered by existing runtime-filter regression tests)
   - Behavior changed: No
   - Does this need documentation: No


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