Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6042#discussion_r53743888
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/DataFrameStatFunctions.scala ---
    @@ -37,6 +37,16 @@ import org.apache.spark.util.sketch.{BloomFilter, 
CountMinSketch}
     final class DataFrameStatFunctions private[sql](df: DataFrame) {
     
       /**
    +   * Calculate the approximate quantile of numerical column of a DataFrame.
    +   * @param col the name of the column
    +   * @param quantile the quantile number
    +   * @return the approximate quantile
    +   */
    +  def approxQuantile(col: String, quantile: Double, epsilon: Double): 
Double = {
    --- End diff --
    
    It is hard to think of a case when a user just needs a single quantile 
(maybe just median?). If we want to expose public APIs, I would suggest `def 
approxQuantiles(col: String, quantiles: Array[Double], epsilon: Double): 
Array[Double]`. I use `Array[Double]` here for Java compatibility.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to