You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by jo...@apache.org on 2016/02/18 03:56:35 UTC

spark git commit: [MINOR][MLLIB] fix mllib compile warnings

Repository: spark
Updated Branches:
  refs/heads/master 9451fed52 -> 0088b252b


[MINOR][MLLIB] fix mllib compile warnings

This PR fixes some warnings found by `build/sbt mllib/test:compile`.

Author: Xiangrui Meng <me...@databricks.com>

Closes #11227 from mengxr/fix-mllib-warnings-201602.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/0088b252
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/0088b252
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/0088b252

Branch: refs/heads/master
Commit: 0088b252bf56d391025a19b70af03f3ce6d7574c
Parents: 9451fed
Author: Xiangrui Meng <me...@databricks.com>
Authored: Wed Feb 17 18:56:19 2016 -0800
Committer: Josh Rosen <jo...@databricks.com>
Committed: Wed Feb 17 18:56:19 2016 -0800

----------------------------------------------------------------------
 .../spark/ml/classification/DecisionTreeClassifierSuite.scala    | 4 ++++
 .../test/scala/org/apache/spark/mllib/fpm/FPGrowthSuite.scala    | 2 ++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/0088b252/mllib/src/test/scala/org/apache/spark/ml/classification/DecisionTreeClassifierSuite.scala
----------------------------------------------------------------------
diff --git a/mllib/src/test/scala/org/apache/spark/ml/classification/DecisionTreeClassifierSuite.scala b/mllib/src/test/scala/org/apache/spark/ml/classification/DecisionTreeClassifierSuite.scala
index baf6b90..9169bcd 100644
--- a/mllib/src/test/scala/org/apache/spark/ml/classification/DecisionTreeClassifierSuite.scala
+++ b/mllib/src/test/scala/org/apache/spark/ml/classification/DecisionTreeClassifierSuite.scala
@@ -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.")
     }
   }
 

http://git-wip-us.apache.org/repos/asf/spark/blob/0088b252/mllib/src/test/scala/org/apache/spark/mllib/fpm/FPGrowthSuite.scala
----------------------------------------------------------------------
diff --git a/mllib/src/test/scala/org/apache/spark/mllib/fpm/FPGrowthSuite.scala b/mllib/src/test/scala/org/apache/spark/mllib/fpm/FPGrowthSuite.scala
index b9e997c..dc44c58 100644
--- a/mllib/src/test/scala/org/apache/spark/mllib/fpm/FPGrowthSuite.scala
+++ b/mllib/src/test/scala/org/apache/spark/mllib/fpm/FPGrowthSuite.scala
@@ -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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org