Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/8675#discussion_r39671227
--- Diff:
mllib/src/test/scala/org/apache/spark/ml/classification/LogisticRegressionSuite.scala
---
@@ -191,6 +191,10 @@ class LogisticRegressionSuite extends SparkFunSuite
with MLlibTestSparkContext {
val model = lr.fit(dataset)
assert(model.numClasses === 2)
+ val datasetFeatureSize = dataset.rdd.first() match {
--- End diff --
You shouldn't assume a column ordering. Instead:
```
dataset.select("features").first().getAs[Vector](0).size
```
or
```
dataset.select("features").first() match {
case features: Vector => features.size
}
```
(same issue in other test suites)
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]