LukaZdravic opened a new pull request, #60297: URL: https://github.com/apache/spark/pull/60297
### What changes were proposed in this pull request? `SpillableArrayIterator` in `ExternalAppendOnlyUnsafeRowArray` now implements `Closeable`. Its close code moves from `closeIfNeeded` into a public `close()`, and `closeIfNeeded` calls it. Master already has these lines, from SPARK-58201. This PR takes only these lines. ### Why are the changes needed? SPARK-61248 (#60240) was picked to branch-4.x. Its fix closes a right-side group's iterator only if the iterator is `Closeable`. On branch-4.x the spill-backed iterator is not, so the fix closes nothing. Its new test fails the branch-4.x build ([run](https://github.com/apache/spark/actions/runs/42732290097), "sql - other tests"): ``` - buffered scan closes the spill readers of a group it leaves early *** FAILED *** Backward: 55 was not less than 8 the scan left 55 more files open (SortMergeAsOfJoinScannerSuite.scala:117) ``` ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? On branch-4.x, the failing test now passes. `SortMergeAsOfJoinScannerSuite`, `ExternalAppendOnlyUnsafeRowArraySuite`, `AsOfJoinSortMergeSQLSuite` and `SortMergeAsOfJoinSuite` pass: 275 tests. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code This pull request and its description were written by Isaac. -- 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]
