You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/12/08 21:07:14 UTC

[GitHub] [spark] MaxGekk commented on a change in pull request #26799: [WIP][SPARK-30170][SQL] Eliminate compilation warnings: part 1

MaxGekk commented on a change in pull request #26799: [WIP][SPARK-30170][SQL] Eliminate compilation warnings: part 1
URL: https://github.com/apache/spark/pull/26799#discussion_r355214785
 
 

 ##########
 File path: mllib/src/test/scala/org/apache/spark/ml/util/MLTest.scala
 ##########
 @@ -88,6 +88,8 @@ trait MLTest extends StreamTest with TempDirectory { self: Suite =>
     val n = Attribute.fromStructField(dataframe.schema(colName)) match {
       case binAttr: BinaryAttribute => Some(2)
       case nomAttr: NominalAttribute => nomAttr.getNumValues
+      case unknown =>
+        throw new IllegalArgumentException(s"Attribute type: ${unknown.getClass.getName}")
 
 Review comment:
   ```
       Warning:Warning:line (88)match may not be exhaustive.
   It would fail on the following inputs: NumericAttribute(), UnresolvedAttribute
       val n = Attribute.fromStructField(dataframe.schema(colName)) match {
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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