Skip to content

Commit 884c978

Browse files
BiteTheDDDDtCopilot
andcommitted
[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

File tree

‎be/src/exec/scan/scanner.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ Status Scanner::try_append_late_arrival_runtime_filter() {
253253
// avoid conjunct destroy in used by storage layer
254254
_conjuncts.clear();
255255
RETURN_IF_ERROR(_local_state->clone_conjunct_ctxs(_conjuncts));
256+
_applied_rf_num = arrived_rf_num;
256257
return Status::OK();
257258
}
258259

0 commit comments

Comments
 (0)