Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.18.0
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
// Fink SQL-> select array_max(array[1, 20, null, 3])
20
See also
spark https://spark.apache.org/docs/latest/api/sql/index.html#array_max
presto https://prestodb.io/docs/current/functions/array.html
Attachments
Issue Links
- causes
-
FLINK-32490 ArrayElementOutputTypeStrategyTest>TypeStrategiesTestBase.testTypeStrategy constantly fails
- Resolved
- is a parent of
-
FLINK-32498 array_max return type should always nullable
- Closed
- links to