[MINOR][MLLIB] fix mllib compile warnings
This PR fixes some warnings found by `build/sbt mllib/test:compile`. Author: Xiangrui Meng <meng@databricks.com> Closes #11227 from mengxr/fix-mllib-warnings-201602.
This commit is contained in:
parent
9451fed52c
commit
0088b252bf
|
@ -305,7 +305,11 @@ class DecisionTreeClassifierSuite extends SparkFunSuite with MLlibTestSparkConte
|
|||
n.split match {
|
||||
case s: CategoricalSplit =>
|
||||
assert(s.leftCategories === Array(1.0))
|
||||
case other =>
|
||||
fail(s"All splits should be categorical, but got ${other.getClass.getName}: $other.")
|
||||
}
|
||||
case other =>
|
||||
fail(s"Root node should be an internal node, but got ${other.getClass.getName}: $other.")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
*/
|
||||
package org.apache.spark.mllib.fpm
|
||||
|
||||
import scala.language.existentials
|
||||
|
||||
import org.apache.spark.SparkFunSuite
|
||||
import org.apache.spark.mllib.util.MLlibTestSparkContext
|
||||
import org.apache.spark.util.Utils
|
||||
|
|
Loading…
Reference in a new issue