cloud-fan commented on code in PR #40766:
URL: https://github.com/apache/spark/pull/40766#discussion_r1170751510
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/JoinCodegenSupport.scala:
##########
@@ -42,13 +42,15 @@ trait JoinCodegenSupport extends CodegenSupport with
BaseJoinExec {
buildRow: Option[String] = None): (String, String, Seq[ExprCode]) = {
val buildSideRow = buildRow.getOrElse(ctx.freshName("buildRow"))
val buildVars = genOneSideJoinVars(ctx, buildSideRow, buildPlan,
setDefaultValue = false)
+ val streamVars2 = streamVars.map(_.copy())
Review Comment:
late LGTM. Can we add some comments here? This is very tricky and we should
tell others why a copy is needed. The problem is `ExprCode` is mutable,
`streamVars` may be used again by full outer joins and we should not change its
states here.
--
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]