You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Sergey Nuyanzin (Jira)" <ji...@apache.org> on 2023/03/27 09:48:00 UTC

[jira] [Commented] (FLINK-31622) Add ARRAY_APPEND supported in SQL & Table API

    [ https://issues.apache.org/jira/browse/FLINK-31622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17705269#comment-17705269 ] 

Sergey Nuyanzin commented on FLINK-31622:
-----------------------------------------

this is a duplicate of https://issues.apache.org/jira/browse/FLINK-27891

> Add ARRAY_APPEND supported in SQL & Table API
> ---------------------------------------------
>
>                 Key: FLINK-31622
>                 URL: https://issues.apache.org/jira/browse/FLINK-31622
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / Planner
>    Affects Versions: 1.18.0
>            Reporter: jackylau
>            Priority: Major
>             Fix For: 1.18.0
>
>
> array_append(array, element) - Append the element at the end of the array.
> Syntax:
> array_append(array, element)
> Arguments:
> array: An ARRAY to be handled.
> Returns:
> Append the element at the end of the array.
> This function does not return null when the elements are null. It appends null at the end of the array. But returns null if the array is null.
> {code:sql}
> > SELECT array_append(array(3, 2, 1), 1);
>  3 {code}
> See also
> spark not in docs https://spark.apache.org/docs/latest/api/sql/index.html#array but in code. [https://github.com/apache/spark/blob/c55c7ea6fc92c3733543d5f3d99eb00921cbe564/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala#L5059]
> snowflake [https://docs.snowflake.com/en/sql-reference/functions/array_append]
> postgresql [https://www.postgresql.org/docs/12/functions-array.html#ARRAY-FUNCTIONS-TABLE]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)