zero323 commented on a change in pull request #27278: [SPARK-30569][SQL][PYSPARK][SPARKR] Add percentile_approx DSL functions. URL: https://github.com/apache/spark/pull/27278#discussion_r380159009
########## File path: core/src/main/scala/org/apache/spark/api/python/PythonUtils.scala ########## @@ -71,6 +71,13 @@ private[spark] object PythonUtils { vs.toArray().asInstanceOf[Array[T]] } + /** + * Convert list of java.lang.Double into array of Double + */ + def doubleJListToArray(vs: JList[java.lang.Double]): Array[Double] = { + vs.asScala.map(_.doubleValue).toArray Review comment: Are you sure about it? Type erasure, on which we depend all over the place, doesn't apply to `Arrays`, so I fairly confident this won't do. I will double check that of course. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org