HyukjinKwon commented on code in PR #42398:
URL: https://github.com/apache/spark/pull/42398#discussion_r1287909249
##########
sql/core/src/main/scala/org/apache/spark/sql/functions.scala:
##########
@@ -1148,6 +1148,60 @@ object functions {
*/
def sum_distinct(e: Column): Column = withAggregateFunction(Sum(e.expr),
isDistinct = true)
+ /**
+ * Aggregate function: returns the concatenated input values.
+ *
+ * @group agg_funcs
+ * @since 4.0.0
+ */
+ def listagg(e: Column): Column = withAggregateFunction {
+ ListAgg(e.expr)
+ }
+
+ /**
+ * Aggregate function: returns the concatenated input values.
+ *
+ * @group agg_funcs
+ * @since 4.0.0
+ */
+ def listagg(columnName: String): Column = listagg(Column(columnName))
+
+ /**
+ * Aggregate function: returns the concatenated input values, separated by
the delimiter string.
+ *
+ * @group agg_funcs
+ * @since 4.0.0
+ */
+ def listagg(e: Column, delimiter: String): Column = withAggregateFunction {
Review Comment:
Expose `Column` signature only (see the top of this file)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]