Skip to content

Commit fa5e3f9

Browse files
committed
Correct validateAndTransformSchema
1 parent 6aad02d commit fa5e3f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mllib/src/main/scala/org/apache/spark/ml/clustering/GaussianMixture.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ private[clustering] trait GaussianMixtureParams extends Params with HasMaxIter w
6464
*/
6565
protected def validateAndTransformSchema(schema: StructType): StructType = {
6666
SchemaUtils.checkColumnType(schema, $(featuresCol), new VectorUDT)
67-
SchemaUtils.appendColumn(schema, $(predictionCol), IntegerType)
68-
SchemaUtils.appendColumn(schema, $(probabilityCol), new VectorUDT)
67+
val schema_temp = SchemaUtils.appendColumn(schema, $(predictionCol), IntegerType)
68+
SchemaUtils.appendColumn(schema_temp, $(probabilityCol), new VectorUDT)
6969
}
7070
}
7171

0 commit comments

Comments
 (0)