mengxr commented on a change in pull request #27522: [SPARK-30762] Add
dtype=float32 support to vector_to_array UDF
URL: https://github.com/apache/spark/pull/27522#discussion_r378435612
##########
File path: mllib/src/test/scala/org/apache/spark/ml/FunctionsSuite.scala
##########
@@ -61,5 +59,34 @@ class FunctionsSuite extends MLTest {
"`org.apache.spark.ml.linalg.Vector` or
`org.apache.spark.mllib.linalg.Vector`, " +
s"but got ${valType}"))
}
+
+ val df3 = Seq(
+ (Vectors.dense(1.0, 2.0, 3.0), OldVectors.dense(10.0, 20.0, 30.0)),
+ (Vectors.sparse(3, Seq((0, 2.0), (2, 3.0))), OldVectors.sparse(3,
Seq((0, 20.0), (2, 30.0))))
+ ).toDF("vec", "oldVec")
+ val df_array_float = df3.select(
Review comment:
use camelCase in scala. the UDF naming is an exception.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]