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

    https://github.com/apache/spark/pull/6433#discussion_r31171364
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/feature/StandardScaler.scala ---
    @@ -48,6 +48,16 @@ private[feature] trait StandardScalerParams extends 
Params with HasInputCol with
        * @group param
        */
       val withStd: BooleanParam = new BooleanParam(this, "withStd", "Scale to 
unit standard deviation")
    +
    +  protected def validateAndTransformSchema(schema: StructType): StructType 
= {
    +    val inputType = schema($(inputCol)).dataType
    --- End diff --
    
    This could be further simplified by using the SchemaUtils from `ml.util`. 
See:
    
https://github.com/apache/spark/blob/836a75898fdc4b10d4d00676ef29e24cc96f09fd/mllib/src/main/scala/org/apache/spark/ml/feature/IDF.scala#L55


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to