peter-toth commented on a change in pull request #29572:
URL: https://github.com/apache/spark/pull/29572#discussion_r482756735
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoinExec.scala
##########
@@ -673,8 +680,9 @@ private[joins] class SortMergeJoinScanner(
*/
private[this] var matchJoinKey: InternalRow = _
/** Buffered rows from the buffered side of the join. This is empty if there
are no matches. */
- private[this] val bufferedMatches =
- new ExternalAppendOnlyUnsafeRowArray(inMemoryThreshold, spillThreshold)
+ private[this] val bufferedMatches: ExternalAppendOnlyUnsafeRowArray =
+ new ExternalAppendOnlyUnsafeRowArray(if (bufferFirstOnly) 1 else
inMemoryThreshold,
Review comment:
Not this change does it, but the one in `bufferMatchingRows()`. This
change just avoids creating a buffer larger than 1.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]