Rich-T-kid opened a new pull request, #27933: URL: https://github.com/apache/datafusion/pull/27933
## Which issue does this PR close? - Working toward `RepartitionExec` optimizations. ## Rationale for this change Unordered repartition currently creates a `SpillManager` and three spill metrics for every output partition, but only the manager from the first output to initialize the shared state is used. At 512 output partitions, each unordered `RepartitionExec` therefore creates 511 unused managers and 1,533 unused metrics. ## What changes are included in this PR? Create the shared unordered spill manager only after winning state initialization. Ordered repartition remains unchanged and continues to use one spill manager per output merge. ## What is the testing strategy for this PR? Added coverage for lazy registration, one shared metric set, partition attribution, and fixed-membership snapshots. All 86 repartition tests, formatting, and all-target/all-feature crate Clippy pass. A local P512 screen used 14 balanced process pairs per workload. Negative values are faster/lower. | Workload | Time | Paired 95% CI | RSS | |---|---:|---:|---:| | TPCH Q18 | -0.30% | [-1.06%, +0.45%] | -0.48% | | TPC-DS Q64 | -1.09% | [-1.96%, -0.21%] | +0.26% | | ClickBench Q32 | -1.66% | [-3.61%, +0.28%] | +0.09% | ## Are there any user-facing changes? For unordered repartition, losing output partitions no longer report redundant zero-valued spill metrics. Spill metrics are registered on first poll, so an earlier fixed-membership metric snapshot does not include them; fresh snapshots and aggregate spill values are unchanged after initialization. -- 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]
