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

    https://github.com/apache/spark/pull/21311#discussion_r187861750
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashedRelation.scala
 ---
    @@ -568,13 +568,16 @@ private[execution] final class LongToUnsafeRowMap(val 
mm: TaskMemoryManager, cap
         }
     
         // There is 8 bytes for the pointer to next value
    -    if (cursor + 8 + row.getSizeInBytes > page.length * 8L + 
Platform.LONG_ARRAY_OFFSET) {
    +    val needSize = cursor + 8 + row.getSizeInBytes
    +    val nowSize = page.length * 8L + Platform.LONG_ARRAY_OFFSET
    +    if (needSize > nowSize) {
           val used = page.length
           if (used >= (1 << 30)) {
             sys.error("Can not build a HashedRelation that is larger than 8G")
    --- End diff --
    
    This is not related to this pr though, `sys.error` instead of 
`UnsupportedOperationException`?
    
https://github.com/apache/spark/blob/b6c50d7820aafab172835633fb0b35899e93146b/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/codegen/UTF8StringBuilder.java#L45


---

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

Reply via email to