Dandandan opened a new pull request, #27638: URL: https://github.com/apache/datafusion/pull/27638
## Rationale for this change An ordered integer input can already satisfy the buffered-side ordering for a single inequality join. For sufficiently large candidate pair counts a nested loop can perform substantially more comparison work. ## What changes are included in this PR? Consider the existing piecewise merge operator for inner and outer joins when estimated inputs each contain 64 through 100,000 rows, their product is at least one million, and the buffered integer key supplies the required ordering. These are provisional crossover thresholds for benchmarking. Explicit piecewise selection continues to take precedence. ## What is the testing strategy for this PR? A SQL planning test covers an ordered join, an unordered input, a small join and disabling automatic selection. Targeted range-join benchmarks exercise the affected shape. Original TPC-H and TPC-DS queries primarily exercise equality joins and serve as regression controls. ## Are there any user-facing changes? The new default-on optimizer setting `datafusion.optimizer.auto_piecewise_merge_join` controls automatic selection. Set it to false to restore the previous default planning behavior. -- 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]
