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

    https://github.com/apache/spark/pull/14373#discussion_r72347178
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashedRelation.scala
 ---
    @@ -608,7 +608,7 @@ private[execution] final class LongToUnsafeRowMap(val 
mm: TaskMemoryManager, cap
       def optimize(): Unit = {
         val range = maxKey - minKey
         // Convert to dense mode if it does not require more memory or could 
fit within L1 cache
    -    if (range < array.length || range < 1024) {
    +    if (range >= 0 && (range < array.length || range < 1024)) {
    --- End diff --
    
    I might suggest a comment explaining why this check exists, but LGTM


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