You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Hanyu Zheng (Jira)" <ji...@apache.org> on 2023/06/06 19:39:00 UTC
[jira] [Updated] (FLINK-32256) Add ARRAY_MAX support in SQL & Table API
[ https://issues.apache.org/jira/browse/FLINK-32256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hanyu Zheng updated FLINK-32256:
--------------------------------
Description:
This is an implementation of ARRAY_MAX
The array_max() function concatenates get the maximum element from input array.
The result matches the type of the elements. NULL elements are skipped. If array is empty, or contains only NULL elements, NULL is returned.
Syntax
array_max(array)
Arguments
array: Any ARRAY with elements for which order is supported.
Returns
The result matches the type of the elements. NULL elements are skipped. If array is empty, or contains only NULL elements, NULL is returned.
Examples
SQL
> SELECT array_max(array(1, 20, NULL, 3)); 20
{code:java}
// Fink SQL-> select array_max(array[1, 20, null, 3])
20{code}
> Add ARRAY_MAX support in SQL & Table API
> ----------------------------------------
>
> Key: FLINK-32256
> URL: https://issues.apache.org/jira/browse/FLINK-32256
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Planner
> Affects Versions: 1.18.0
> Reporter: Bonnie Varghese
> Assignee: Hanyu Zheng
> Priority: Major
> Fix For: 1.18.0
>
>
> This is an implementation of ARRAY_MAX
> The array_max() function concatenates get the maximum element from input array.
> The result matches the type of the elements. NULL elements are skipped. If array is empty, or contains only NULL elements, NULL is returned.
>
> Syntax
> array_max(array)
> Arguments
> array: Any ARRAY with elements for which order is supported.
>
> Returns
> The result matches the type of the elements. NULL elements are skipped. If array is empty, or contains only NULL elements, NULL is returned.
>
> Examples
> SQL
>
> > SELECT array_max(array(1, 20, NULL, 3)); 20
>
> {code:java}
> // Fink SQL-> select array_max(array[1, 20, null, 3])
> 20{code}
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)