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_r380150881
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
##########
@@ -652,6 +652,50 @@ object functions {
*/
def min(columnName: String): Column = min(Column(columnName))
+ /**
+ * Aggregate function: Returns and array of the approximate percentile values
+ * of numeric column col at the given percentages.
+ *
+ * Each value of the percentage array must be between 0.0 and 1.0.
+ *
+ * The accuracy parameter is a positive numeric literal
+ * which controls approximation accuracy at the cost of memory.
+ * Higher value of accuracy yields better accuracy, 1.0/accuracy
+ * is the relative error of the approximation.
+ *
+ * @group agg_funcs
+ * @since 3.1.0
+ */
+ def percentile_approx(e: Column, percentage: Array[Double], accuracy: Long):
Column = {
Review comment:
(and yes, I know I repeat myself here, and I am really sorry for that. I
really appreciate your reviews @HyukjinKwon, it's just some of these unwritten
rules seem rather inconsistent and arbitrary for a passer-by like me, and
navigating around these is not easy).
----------------------------------------------------------------
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]