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

    https://github.com/apache/spark/pull/2514#discussion_r17954596
  
    --- Diff: 
core/src/main/scala/org/apache/spark/util/collection/ExternalSorter.scala ---
    @@ -152,7 +152,7 @@ private[spark] class ExternalSorter[K, V, C](
         override def compare(a: K, b: K): Int = {
           val h1 = if (a == null) 0 else a.hashCode()
           val h2 = if (b == null) 0 else b.hashCode()
    -      h1 - h2
    +      if (h1 < h2) -1 else if (h1 == h2) 0 else 1
    --- End diff --
    
    Don't use this, use Integer.compare instead. Reason is Java will likely 
optimize the latter one. You can fix it in ExternalAppendOnlyMap too.


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