Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11083#discussion_r53567059
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashSemiJoin.scala 
---
    @@ -92,3 +78,36 @@ trait HashSemiJoin {
         }
       }
     }
    +
    +private[execution] object HashSemiJoin {
    +  def buildKeyHashSet(
    +    keys: Seq[Expression],
    +    attributes: Seq[Attribute],
    +    rows: Iterator[InternalRow]): java.util.HashSet[InternalRow] = {
    +    val hashSet = new java.util.HashSet[InternalRow]()
    +
    +    // Create a Hash set of buildKeys
    +    val key = UnsafeProjection.create(keys, attributes)
    +    while (rows.hasNext) {
    +      val currentRow = rows.next()
    +      val rowKey = key(currentRow)
    +      if (!rowKey.anyNull) {
    +        val keyExists = hashSet.contains(rowKey)
    +        if (!keyExists) {
    +          hashSet.add(rowKey.copy())
    +        }
    +      }
    +    }
    +    hashSet
    +  }
    +}
    +
    +/** HashSetBroadcastMode requires that the input rows are broadcasted as a 
set. */
    +private[execution] case class HashSetBroadcastMode(
    --- End diff --
    
    I created https://issues.apache.org/jira/browse/SPARK-13422 to track this 
one.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to