You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/05/02 11:30:00 UTC

[jira] [Updated] (FLINK-27471) Add ARRAY_DISTINCT supported in SQL & Table API

     [ https://issues.apache.org/jira/browse/FLINK-27471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated FLINK-27471:
-----------------------------------
    Labels: pull-request-available  (was: )

> Add ARRAY_DISTINCT supported in SQL & Table API
> -----------------------------------------------
>
>                 Key: FLINK-27471
>                 URL: https://issues.apache.org/jira/browse/FLINK-27471
>             Project: Flink
>          Issue Type: Sub-task
>            Reporter: Sergey Nuyanzin
>            Priority: Major
>              Labels: pull-request-available
>
> Removes duplicate values from the array.
> Syntax:
> array_distinct(array) 
> Arguments:
>     array: An ARRAY to be handled.
> Returns:
> An ARRAY. If value is NULL, the result is NULL. Keeps order of elements.
> Examples:
> {code:sql}
> SELECT array_distinct(ARRAY[1, 2, 3, 2, 1]);
> -- [1, 2, 3]
> SELECT array_distinct(ARRAY[1, NULL, 1]);
> -- [1, NULL]
> {code}
> See also 
> https://spark.apache.org/docs/latest/api/sql/index.html#array_distinct



--
This message was sent by Atlassian Jira
(v8.20.7#820007)