Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-35604][SQL] Fix condition check for FULL OUTER sort merge join
### What changes were proposed in this pull request? The condition check for FULL OUTER sort merge join (https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoinExec.scala#L1368 ) has unnecessary trip when `leftIndex == leftMatches.size` or `rightIndex == rightMatches.size`. Though this does not affect correctness (`scanNextInBuffered()` returns false anyway). But we can avoid it in the first place. ### Why are the changes needed? Better readability for developers and avoid unnecessary execution. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing unit tests, such as `OuterJoinSuite.scala`. Closes #32736 from c21/join-bug. Authored-by: Cheng Su <chengsu@fb.com> Signed-off-by: Gengliang Wang <ltnwgl@gmail.com>
- Loading branch information