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 2021/05/26 16:44:03 UTC

[GitHub] [spark] viirya commented on a change in pull request #32547: [SPARK-35351][SQL] Add code-gen for left anti sort merge join

viirya commented on a change in pull request #32547:
URL: https://github.com/apache/spark/pull/32547#discussion_r639916474



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoinExec.scala
##########
@@ -680,13 +680,36 @@ case class SortMergeJoinExec(
       ctx.currentVars = streamedVars ++ bufferedVars
       val cond = BindReferences.bindReference(
         condition.get, streamedPlan.output ++ bufferedPlan.output).genCode(ctx)
-      // evaluate the columns those used by condition before loop
+      // Evaluate the columns those used by condition before loop
       val before =
         s"""
            |boolean $loaded = false;
            |$streamedBefore
          """.stripMargin
 
+      val loadStreamed =
+        s"""
+           |if (!$loaded) {
+           |  $loaded = true;
+           |  $streamedAfter
+           |}
+         """.stripMargin

Review comment:
       nit: seems `loaded` is not needed for `LeftAnti` case.




-- 
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