Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/21509#discussion_r194058303
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/clustering/PowerIterationClustering.scala
---
@@ -166,6 +166,7 @@ class PowerIterationClustering private[clustering] (
val w = if (!isDefined(weightCol) || $(weightCol).isEmpty) {
lit(1.0)
} else {
+ SchemaUtils.checkColumnTypes(dataset.schema, $(weightCol),
Seq(FloatType, DoubleType))
--- End diff --
shall we check if it is a `NumericType`? An integer column with value 1 is
a valid input as well and if someone is using it, this may introduce a
regression.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]