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

    https://github.com/apache/spark/pull/549#discussion_r11994957
  
    --- Diff: core/src/main/scala/org/apache/spark/Partitioner.scala ---
    @@ -155,4 +157,17 @@ class RangePartitioner[K : Ordering : ClassTag, V](
         case _ =>
           false
       }
    +
    +
    +  override def hashCode(): Int = {
    +    val prime = 31
    +    var result = 1
    +    var i = 0
    +    while (i < rangeBounds.length) {
    --- End diff --
    
    Darn, `java.util.Arrays.hashCode(Object[])` doesn't match any scala array? 
`java.util.Arrays.hashCode(Array(1,2,3))` works fine but that's not quite the 
situation here. Oh well. Maybe wrap as a `List` and use its `hashCode`? may not 
be worth it to save the code.


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