goutamadwant opened a new pull request, #24491: URL: https://github.com/apache/datafusion/pull/24491
## Which issue does this PR close? - Part of #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. -- 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]
