Repository navigation
Commit 884c978
[fix](runtime-filter) Restore _applied_rf_num update in late arrival path
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: apache#59786
Problem Summary: PR apache#59786 (commit e78d089) 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, so once any RF arrives every
subsequent call needlessly clears _conjuncts, re-clones them, and
appends the old ctxs into _stale_expr_ctxs (CPU waste + slow
memory growth);
* the `ApplyAllRuntimeFilters=True` info string in profile
(file_scanner.cpp) 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 to bring back the original behavior.
### 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
Co-authored-by: Copilot <[email protected]>1 parent 6c6932f commit 884c978
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
256 | 257 | | |
257 | 258 | | |
258 | 259 | | |
| |||
0 commit comments