Github user srowen commented on a diff in the pull request: https://github.com/apache/spark/pull/14555#discussion_r74397043 --- Diff: mllib-local/src/test/scala/org/apache/spark/ml/linalg/VectorsSuite.scala --- @@ -72,6 +72,12 @@ class VectorsSuite extends SparkMLFunSuite { } } + test("sparse vector construction with negative indices") { + intercept[IllegalArgumentException] { + Vectors.sparse(3, Array(-1, 1), Array(3.0, 5.0)) + } + } + --- End diff -- ... but https://github.com/apache/spark/blob/master/mllib-local/src/main/scala/org/apache/spark/ml/linalg/Vectors.scala#L210 does not assume this and that's the method to test.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org