Skip to content

Commit f0e0ac4

Browse files
authored
fix: exclude child compute from NestedLoopJoinExec metrics (apache#24491)
## Which issue does this PR close? - Part of apache#24459. ## Rationale for this change `NestedLoopJoinExec` included time spent polling its build-side and probe-side inputs in `build_time` and `join_time`. Because child operators report their own compute time, this double-counted child work in plan-level `elapsed_compute` metrics. ## What changes are included in this PR? - Time build-side bookkeeping and materialization only after each left input batch is ready. - Start probe-side timing only after the right input returns a ready result. - Apply the same accounting to the memory-limited spill and replay paths. - Add regressions for standard and spill execution that verify child polling is excluded while join-owned work remains timed. ## Are these changes tested? Yes. - `cargo test -p datafusion-physical-plan joins::nested_loop_join::tests --all-features` - `cargo test -p datafusion-physical-plan --all-features` - `cargo clippy --all-targets --all-features -- -D warnings` - `RUST_BACKTRACE=1 cargo test --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-cli --workspace --lib --tests --bins --features avro,json,backtrace,extended_tests,recursive_protection,parquet_encryption` The four new timing regressions were also ablated by restoring the previous outer timer scopes; each failed because the injected child delay was included. ## Are there any user-facing changes? `NestedLoopJoinExec` metrics now exclude child input polling. Query results and public APIs are unchanged.
1 parent 4a93ade commit f0e0ac4

1 file changed

Lines changed: 385 additions & 48 deletions

File tree

0 commit comments

Comments
 (0)