[
https://issues.apache.org/jira/browse/FLINK-21949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17335641#comment-17335641
]
jiabao sun commented on FLINK-21949:
------------------------------------
Hi, [~jark]
In Spark SQL there are functions called collect_list and collect_set.
[https://spark.apache.org/docs/latest/api/sql/index.html#collect_set]
In PostgreSQL(version > 8.4) there's a function called ARRAY_AGG.
[https://www.postgresql.org/docs/8.4/functions-aggregate.html]
[https://stackoverflow.com/questions/533256/concatenate-multiple-rows-in-an-array-with-sql-on-postgresql/5883122]
In Snowflake there's also a function called ARRAY_AGG.
[https://docs.snowflake.com/en/sql-reference/functions/array_agg.html]
In MongoDB there's a function called $push.
[https://docs.mongodb.com/manual/reference/operator/aggregation/push/]
In Elasticsearch there's a function called nested.
[https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-nested-aggregation.html]
Hope this helps.
> Support collect to array aggregate function
> -------------------------------------------
>
> Key: FLINK-21949
> URL: https://issues.apache.org/jira/browse/FLINK-21949
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / API
> Affects Versions: 1.12.0
> Reporter: jiabao sun
> Priority: Minor
>
> Some nosql databases like mongodb and elasticsearch support nested data types.
> Aggregating multiple rows into ARRAY<ROW> is a common requirement.
> The CollectToArray function is similar to Collect, except that it returns
> ARRAY<ROW> instead of MULTISET<ROW>.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)