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/09/27 17:24:09 UTC

[GitHub] [spark] viirya commented on a change in pull request #34034: [SPARK-36794][SQL] Ignore duplicated join keys when building relation for SEMI/ANTI hash join

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashJoin.scala
##########
@@ -158,6 +158,17 @@ trait HashJoin extends JoinCodegenSupport {
         output, (streamedPlan.output ++ buildPlan.output).map(_.withNullability(true)))
   }
 
+  // Exposed for testing
+  @transient lazy val ignoreDuplicatedKey = joinType match {
+    case LeftExistence(_) =>
+      // For building hash relation, ignore duplicated rows with same join keys if:
+      // 1. Join condition is empty.
+      // 2. Join condition only references streamed attributes and build join keys.

Review comment:
       We only need to meet any one requirement? So maybe say 
   
   ```
   1. Join condition is empty, or
   2. ...
   ```




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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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