flink
flink copied to clipboard
[FLINK-32256][table] Add built-in ARRAY_ MIN function.
What is the purpose of the change
This is an implementation of ARRAY_MIN
Brief change log
The array_min() function get the minimum 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.
Arguments
array: Any ARRAY with elements for which order is supported.
Syntax array_min(array)
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_min(array(1, 20, NULL, 3));
result: 1
See also spark: https://spark.apache.org/docs/latest/api/sql/index.html#array_min
presto https://prestodb.io/docs/current/functions/array.html
Verifying this change
This change added tests in CollectionFunctionsITCase.
Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (yes / no)
- The public API, i.e., is any changed class annotated with
@Public(Evolving)
: (yes / no) - The serializers: (yes / no / don't know)
- The runtime per-record code paths (performance sensitive): (yes / no / don't know)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
- The S3 file system connector: (yes / no / don't know)
Documentation
- Does this pull request introduce a new feature? (yes / no)
- If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
CI report:
- 3147b67c256a0edce2d4e036f5c41b2e929691da Azure: SUCCESS
Bot commands
The @flinkbot bot supports the following commands:-
@flinkbot run azure
re-run the last Azure build
@flinkbot run azure
@flinkbot run azure
subsumed by #24071