leanken commented on a change in pull request #29455:
URL: https://github.com/apache/spark/pull/29455#discussion_r472592192



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/ShuffledHashJoinExec.scala
##########
@@ -317,4 +318,41 @@ case class ShuffledHashJoinExec(
       v => s"$v = $thisPlan.buildHashedRelation(inputs[1]);", forceInline = 
true)
     HashedRelationInfo(relationTerm, keyIsUnique = false, isEmpty = false)
   }
+
+  /**
+   * Generates the code for anti join.
+   * Handles NULL-aware anti join (NAAJ) separately here.
+   */
+  protected override def codegenAnti(ctx: CodegenContext, input: 
Seq[ExprCode]): String = {
+    if (isNullAwareAntiJoin) {
+      val HashedRelationInfo(relationTerm, _, _) = prepareRelation(ctx)
+      val (keyEv, anyNull) = genStreamSideJoinKey(ctx, input)
+      val (matched, _, _) = getJoinCondition(ctx, input)
+      val numOutput = metricTerm(ctx, "numOutputRows")
+      val found = ctx.freshName("found")
+
+      // Skip code check on EmtpyHashedRelation and 
EmptyHashedRelationWithAllNullKeys,

Review comment:
       yes, will update comment




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to