cloud-fan commented on a change in pull request #29104:
URL: https://github.com/apache/spark/pull/29104#discussion_r460768470



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/BroadcastHashJoinExec.scala
##########
@@ -454,6 +490,43 @@ case class BroadcastHashJoinExec(
     val (matched, checkCondition, _) = getJoinCondition(ctx, input)
     val numOutput = metricTerm(ctx, "numOutputRows")
 
+    if (isNullAwareAntiJoin) {
+      if (broadcastRelation.value.isInstanceOf[EmptyHashedRelation]) {
+        return s"""
+                  |// NAAJ Join EmptyHashedRelation accept all
+                  |$numOutput.add(1);
+                  |${consume(ctx, input)}
+            """.stripMargin
+      } else if 
(broadcastRelation.value.isInstanceOf[EmptyHashedRelationWithAllNullKeys]) {
+        return s"""
+                  |// NAAJ
+                  |// EmptyHashedRelationWithAllNullKeys
+                  |// reject all

Review comment:
       `// If the right side contains a key that all columns are null, NAAJ 
simply returns Nil.`




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to