Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/661#discussion_r12414571
--- 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 --
The test case tests whether `fromBreeze` can map a `BSV` created by the
builder correctly. But the PR handles the case when `index.length > used`. To
test it, you should create a `BSV` with `index.length > used` and verify that
`fromBreeze` works correctly. Try to construct a `SparseArray` directly and use
it to construct a `BSV`.
---
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.
---