Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-34517

breeze.linalg.SparseVector.equals always return true may bring error.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.2
    • None
    • GraphX
    • None
    • OpenJDK 1.8.0_275

      Scala 2.12.10

      Hadoop 3.3.0

      Spark 3.0.2

    Description

      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.

       

      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
      

       

      Does that bring the same error for 'Graph.staticParallelPersonalizedPageRank' ?

      Attachments

        Activity

          People

            Unassigned Unassigned
            lumine MiKou
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: