You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/02/12 18:33:56 UTC

[GitHub] [spark] mengxr commented on a change in pull request #27522: [SPARK-30762] Add dtype=float32 support to vector_to_array UDF

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:
users@infra.apache.org


With regards,
Apache Git Services

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