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_r369525739
 
 

 ##########
 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:
   I don't recall any methods that can actually handle `Array[scala.Double]` 
(`Array[java.lang.Double]` wouldn't be an issue, and normally things are 
handled through `Seqs`).

----------------------------------------------------------------
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]

Reply via email to