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

    https://github.com/apache/spark/pull/1502#discussion_r15239395
  
    --- Diff: 
core/src/main/scala/org/apache/spark/util/collection/ExternalAppendOnlyMap.scala
 ---
    @@ -252,7 +251,7 @@ class ExternalAppendOnlyMap[K, V, C](
           if (it.hasNext) {
             var kc = it.next()
             kcPairs += kc
    -        val minHash = getKeyHashCode(kc)
    +        val minHash = hashKey(kc)
    --- End diff --
    
    This isn't for efficiency, it's actually for type safety. I changed this 
because when I changed the meaning of getKeyHashCode to just hash(whatever), 
these calls were not compile errors, though they no longer did the right thing. 
Now we actually ensure you pass in a (K, C) pair rather than just a Tuple2 (or, 
now, any object).


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

Reply via email to