Github user mgaido91 commented on a diff in the pull request: https://github.com/apache/spark/pull/19937#discussion_r155927167 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoinExec.scala --- @@ -617,6 +619,7 @@ case class SortMergeJoinExec( s""" |while (findNextInnerJoinRows($leftInput, $rightInput)) { + | ${leftVarDecl.mkString("\n")} --- End diff -- I am not sure about the amount of overhead introduced honestly. But I think that there might be, even if low. Therefore my suggestion was to avoid the overhead, since IMHO it is feasible and it reflects the previous situation. Honestly I don't think that the readability of the generated code is a big point, because I think that the generated code is already nearly impossible to be read as of now (without reading and knowing the code which generates it). But maybe we can create a test and evaluate the overhead if you think this is the best option. WDYT?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org