-
- Downloads
[SPARK-6761][SQL][ML] Fixes to API and documentation of approximate quantiles
## What changes were proposed in this pull request? This continues thunterdb 's work on `approxQuantile` API. It changes the signature of `approxQuantile` from `(col: String, quantile: Double, epsilon: Double): Double` to `(col: String, probabilities: Array[Double], relativeError: Double): Array[Double]` and update API doc. It also improves the error message in tests and simplifies the merge algorithm for summaries. ## How was the this patch tested? Use the same unit tests as before. Closes #11325 Author: Timothy Hunter <timhunter@databricks.com> Author: Xiangrui Meng <meng@databricks.com> Closes #11332 from mengxr/SPARK-6761.
Showing
- sql/core/src/main/scala/org/apache/spark/sql/DataFrameStatFunctions.scala 30 additions, 6 deletions...n/scala/org/apache/spark/sql/DataFrameStatFunctions.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/stat/StatFunctions.scala 90 additions, 90 deletions...a/org/apache/spark/sql/execution/stat/StatFunctions.scala
- sql/core/src/test/scala/org/apache/spark/sql/DataFrameStatSuite.scala 24 additions, 18 deletions.../test/scala/org/apache/spark/sql/DataFrameStatSuite.scala
- sql/core/src/test/scala/org/apache/spark/sql/execution/stat/ApproxQuantileSuite.scala 6 additions, 6 deletions...apache/spark/sql/execution/stat/ApproxQuantileSuite.scala
Loading
Please register or sign in to comment