[
https://issues.apache.org/jira/browse/FLINK-32259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated FLINK-32259:
-----------------------------------
Labels: pull-request-available (was: )
> Add ARRAY_JOIN support in SQL & Table API
> -----------------------------------------
>
> Key: FLINK-32259
> URL: https://issues.apache.org/jira/browse/FLINK-32259
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / Planner
> Affects Versions: 1.18.0
> Reporter: Bonnie Varghese
> Assignee: Hanyu Zheng
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.18.0
>
>
> Concatenates the elements of the array with a delimiter and optional string
> to replace nulls.
> Syntax:
> array_join(array, delimiter, null_replacement)
>
> Arguments:
> array: An ARRAY to be handled.
> delimiter: A STRING used to separate the concatenated array elements.
> null_replacement: A STRING used to express a NULL value in the result.
> Returns:
> A STRING where the elements of array are separated by delimiter and null
> elements are substituted for null_replacement. If null_replacement parameter
> is not provided, null elements are filtered out. If any argument is NULL, the
> result is NULL.
> Examples:
> {code:java}
> > SELECT array_join(array('hello', 'world'), ' ');
> hello world
> > SELECT array_join(array('hello', NULL ,'world'), ' ');
> hello world
> > SELECT array_join(array('hello', NULL ,'world'), ' ', ',');
> hello , world{code}
>
> See also:
> spark - [https://spark.apache.org/docs/latest/api/sql/index.html#array_join]
> presto - [https://prestodb.io/docs/current/functions/array.html]
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)