You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by srowen <gi...@git.apache.org> on 2018/08/09 18:07:10 UTC

[GitHub] spark pull request #22058: [SPARK-25036][SQL][FOLLOW-UP] Avoid match may not...

Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22058#discussion_r209027132
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/evaluation/ClusteringEvaluator.scala ---
    @@ -119,6 +119,8 @@ class ClusteringEvaluator @Since("2.3.0") (@Since("2.3.0") override val uid: Str
               df, $(predictionCol), $(featuresCol))
           case ("silhouette", "cosine") =>
             CosineSilhouette.computeSilhouetteScore(df, $(predictionCol), $(featuresCol))
    +      case (mn, dm) =>
    +        throw new IllegalArgumentException(s"($mn, $dm) is not matched in evaluate")
    --- End diff --
    
    This is OK, but doesn't really add much beyond what the MatchError would have said. Worth a message like "No support for metric $mn, distance $dm"?


---

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