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

    https://github.com/apache/spark/pull/21081#discussion_r183796459
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/clustering/KMeans.scala 
---
    @@ -86,13 +86,23 @@ private[clustering] trait KMeansParams extends Params 
with HasMaxIter with HasFe
       @Since("1.5.0")
       def getInitSteps: Int = $(initSteps)
     
    +  /**
    +   * Validates the input schema.
    +   * @param schema input schema
    +   */
    +  private[clustering] def validateSchema(schema: StructType): Unit = {
    +    val typeCandidates = List( new VectorUDT,
    +      new ArrayType(DoubleType, false),
    +      new ArrayType(FloatType, false))
    +    SchemaUtils.checkColumnTypes(schema, $(featuresCol), typeCandidates)
    +  }
       /**
    --- End diff --
    
    Ping: There needs to be a newline between the "}" of the previous method 
and the "/**" Scaladoc of the next method.  Please start checking for this.


---

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

Reply via email to