You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HyukjinKwon (via GitHub)" <gi...@apache.org> on 2025/06/23 02:51:55 UTC

Re: [PR] [SPARK-52515][SQL] Add approx_top_k function [spark]

HyukjinKwon commented on code in PR #51236:
URL: https://github.com/apache/spark/pull/51236#discussion_r2160627752


##########
sql/api/src/main/scala/org/apache/spark/sql/functions.scala:
##########
@@ -764,6 +764,66 @@ object functions {
     hll_union_agg(Column(columnName))
   }
 
+  /**
+   * Aggregate function: returns approximate top k (i.e., k-most-frequent) items of a column,
+   * using Frequent Items Sketches from Apache DataSketches
+   *
+   * @group agg_funcs
+   * @since 4.1.0
+   */
+  def approx_top_k(e: Column, k: Int, maxItemsTracked: Int): Column =

Review Comment:
   We would also need to add them for Spark Connect together.



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org