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

    https://github.com/apache/spark/pull/7762#discussion_r36024369
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashedRelation.scala
 ---
    @@ -287,8 +299,11 @@ private[joins] final class UnsafeHashedRelation(
           // put it into binary map
           val loc = binaryMap.lookup(keyBuffer, 
PlatformDependent.BYTE_ARRAY_OFFSET, keySize)
           assert(!loc.isDefined, "Duplicated key found!")
    -      loc.putNewKey(keyBuffer, PlatformDependent.BYTE_ARRAY_OFFSET, 
keySize,
    +      val putSuceeded = loc.putNewKey(keyBuffer, 
PlatformDependent.BYTE_ARRAY_OFFSET, keySize,
             valuesBuffer, PlatformDependent.BYTE_ARRAY_OFFSET, valuesSize)
    +      if (!putSuceeded) {
    +        throw new IOException("Could not allocate memory to grow 
BytesToBytesMap")
    --- End diff --
    
    This can never get hit; I only added this check for completeness.


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