Github user rdblue commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19568#discussion_r146928894
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoinExec.scala
 ---
    @@ -585,21 +585,26 @@ case class SortMergeJoinExec(
     
         val iterator = ctx.freshName("iterator")
         val numOutput = metricTerm(ctx, "numOutputRows")
    +    val joinedRow = ctx.freshName("joined")
    --- End diff --
    
    The joined row should always be used for correctness. We don't know what 
code the expression will generate, so we should plan on always passing the 
correct input row. Setting left and right on a joined row is a cheap operation, 
so I'd rather do it correctly than rely on something brittle like 
`isInstanceOf[CodegenFallback]`.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to