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

Sean Owen commented on SPARK-5186:
----------------------------------

It looks like equals and hashCode are based on the result of toArray in all 
cases. The indices matter of course to the result of toArray. What's an example 
of two SparseVectors that aren't correct? 

> Vector.equals is broken
> -----------------------
>
>                 Key: SPARK-5186
>                 URL: https://issues.apache.org/jira/browse/SPARK-5186
>             Project: Spark
>          Issue Type: Bug
>          Components: MLlib
>    Affects Versions: 1.2.0
>            Reporter: Derrick Burns
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> The implementation of Vector.equals (and Vector.hashCode) is only correct for 
> DenseVectors.   SparseVectors with different indices but the same values not 
> equal, but the indices are not considered in equals and hashCode.



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