Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/661#discussion_r12389263
--- Diff:
mllib/src/test/scala/org/apache/spark/mllib/linalg/BreezeVectorConversionSuite.scala
---
@@ -55,4 +55,16 @@ class BreezeVectorConversionSuite extends FunSuite {
assert(vec.indices.eq(indices), "should not copy data")
assert(vec.values.eq(values), "should not copy data")
}
+
+ test("sparse breeze by vector builder to vector") {
--- End diff --
To ensure we can convert BSV to SparseVector correctly when there are used
elements, we should use
https://github.com/scalanlp/breeze/blob/master/math/src/main/scala/breeze/linalg/SparseVector.scala#L54
with `activeSize < index.length`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---