[ 
https://issues.apache.org/jira/browse/SPARK-9919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14695490#comment-14695490
 ] 

Joseph K. Bradley commented on SPARK-9919:
------------------------------------------

[~MechCoder] Would you want to copy your code from your old PR for this JIRA?

> Matrices should respect Java's equals and hashCode contract
> -----------------------------------------------------------
>
>                 Key: SPARK-9919
>                 URL: https://issues.apache.org/jira/browse/SPARK-9919
>             Project: Spark
>          Issue Type: Bug
>          Components: MLlib
>            Reporter: Feynman Liang
>            Priority: Critical
>
> The contract for Java's Object is that a.equals(b) implies a.hashCode == 
> b.hashCode. So usually we need to implement both. The problem with hashCode 
> is that we shouldn't compute it based on all values, which could be very 
> expensive. You can use the implementation of Vector.hashCode as a template, 
> but that requires some changes to avoid hash code collisions.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to