You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/02 08:54:54 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #29572: [SPARK-32730][SQL] Improve LeftSemi SortMergeJoin right side buffering
cloud-fan commented on a change in pull request #29572:
URL: https://github.com/apache/spark/pull/29572#discussion_r481907082
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoinExec.scala
##########
@@ -673,8 +680,29 @@ 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 =
+ private[this] val bufferedMatches: AppendOnlyUnsafeRowArray = if (bufferFirstOnly) {
+ new AppendOnlyUnsafeRowArray {
+ var buffer: UnsafeRow = null
+
+ override def clear(): Unit = {
+ buffer = null
+ }
+
+ override def add(row: UnsafeRow): Unit = {
+ assert(buffer == null)
Review comment:
Are you saying that `ExternalAppendOnlyUnsafeRowArray` will do spill even if we only add one row?
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org