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

Sean R. Owen commented on SPARK-34517:
--------------------------------------

That's wild. I think this is a Breeze issue really. Are you saying Spark code 
has this comparison or your code? Things like ```(zero :== vec).forall(x => 
x)``` "work" but is that really how to compare elements in a vector in Breeze?

> breeze.linalg.SparseVector.equals always return true may bring error.
> ---------------------------------------------------------------------
>
>                 Key: SPARK-34517
>                 URL: https://issues.apache.org/jira/browse/SPARK-34517
>             Project: Spark
>          Issue Type: Bug
>          Components: GraphX
>    Affects Versions: 3.0.2
>         Environment: OpenJDK 1.8.0_275
> Scala 2.12.10
> Hadoop 3.3.0
> Spark 3.0.2
>            Reporter: MiKou
>            Priority: Major
>
> I implemented an iterative graph algorithm with 'breeze.linalg.SparseVector' 
> just like 'Graph.staticParallelPersonalizedPageRank' does. However, the 
> algorithm can not iterate correctly and I finally found that is because 
> 'breeze.linalg.SparseVector.equals' will always return 'true' if two vectors 
> have the same dimension.
>  
> {code:java}
> scala> val zero =  SparseVector.zeros[Double](10)
> zero: breeze.linalg.SparseVector[Double] = SparseVector(10)()
> scala> val vec = SparseVector(10)((0, 1.0))
> vec: breeze.linalg.SparseVector[Double] = SparseVector(10)((0,1.0))
> scala> zero == vec
> res2: Boolean = true
> {code}
>  
> Does that bring the same error for 'Graph.staticParallelPersonalizedPageRank' 
> ?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to