Github user yanboliang commented on a diff in the pull request: https://github.com/apache/spark/pull/12066#discussion_r61878826 --- Diff: mllib/src/main/scala/org/apache/spark/ml/classification/Classifier.scala --- @@ -179,7 +230,7 @@ abstract class ClassificationModel[FeaturesType, M <: ClassificationModel[Featur } predictUDF(col(getFeaturesCol)) } - outputData = outputData.withColumn(getPredictionCol, predUDF) + outputData = outputData.withColumn(getPredictionCol, predUDF, predictionMetadata) --- End diff -- The type of ```predictionMetadata``` is ```Metadata``` rather than ```Attribute```, so we can not use ```withName``` method. Actually ```predictionMetadata``` has been set name with ```getPredictionCol``` in ```generatePredictionMetadata```.
--- 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