Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/20686#discussion_r173600557
--- Diff:
mllib/src/test/scala/org/apache/spark/ml/feature/VectorIndexerSuite.scala ---
@@ -128,18 +126,29 @@ class VectorIndexerSuite extends SparkFunSuite with
MLlibTestSparkContext
MLTestingUtils.checkCopyAndUids(vectorIndexer, model)
- model.transform(densePoints1) // should work
- model.transform(sparsePoints1) // should work
+ // should work
+ testTransformer[FeatureData](densePoints1, model, "indexed") { _ => }
+ // should work
+ testTransformer[FeatureData](sparsePoints1, model, "indexed") { _ => }
+
// If the data is local Dataset, it throws AssertionError directly.
- intercept[AssertionError] {
- model.transform(densePoints2).collect()
- logInfo("Did not throw error when fit, transform were called on
vectors of different lengths")
+ withClue("Did not found expected error message when fit, " +
--- End diff --
found -> find
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]