You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/05/21 04:33:34 UTC

[jira] [Resolved] (SPARK-9919) Matrices should respect Java's equals and hashCode contract

     [ https://issues.apache.org/jira/browse/SPARK-9919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyukjin Kwon resolved SPARK-9919.
---------------------------------
    Resolution: Incomplete

> 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
>              Labels: bulk-closed
>
> 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
(v7.6.3#76005)

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