Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19811#discussion_r157798917
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoinExec.scala
---
@@ -436,14 +435,13 @@ case class SortMergeJoinExec(
val rightKeyVars = copyKeys(ctx, rightKeyTmpVars)
// A list to hold all matched rows from right side.
- val matches = ctx.freshName("matches")
val clsName = classOf[ExternalAppendOnlyUnsafeRowArray].getName
val spillThreshold = getSpillThreshold
val inMemoryThreshold = getInMemoryThreshold
- ctx.addMutableState(clsName, matches,
- s"$matches = new $clsName($inMemoryThreshold, $spillThreshold);")
+ val matches = ctx.addMutableState(clsName, "matches",
+ v => s"$v = new $clsName($inMemoryThreshold, $spillThreshold);")
--- End diff --
ditto
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]