zhengruifeng opened a new pull request, #57788: URL: https://github.com/apache/spark/pull/57788
### What changes were proposed in this pull request? This PR moves the final Pool Adjacent Violators (PAV) pass in `IsotonicRegression` from the driver to a single executor partition. It replaces the in-memory `repartition(1)` plus local sort with `sortBy(..., numPartitions = 1)`, so Spark's shuffle sorter can spill while ordering the partial results. The driver collects only the final PAV output. It also adds coverage for a monotonicity violation that spans two input partitions. ### Why are the changes needed? The final PAV pass can substantially compress partial results. Running it before `collect()` reduces driver memory and data transfer when that compression occurs. The final pass is still necessarily single-partition, but its preceding shuffle sort can spill rather than requiring an in-memory sort of all partial results. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Added a regression test for merging partial PAV results across partitions. Static checks completed successfully: - `git diff --check` - ASCII scan of the changed Scala files - changed-line length scan The test suite was not run because it was not requested. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Codex (GPT-5) -- 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]
