[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:
Xiangrui Meng 2016-02-17 18:56:19 -08:00 committed by Josh Rosen
parent 9451fed52c
commit 0088b252bf
2 changed files with 6 additions and 0 deletions

View file

@ -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.")
}
}

View file

@ -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