snuyanzin commented on code in PR #22834:
URL: https://github.com/apache/flink/pull/22834#discussion_r1251141458
##########
docs/data/sql_functions.yml:
##########
@@ -643,6 +643,11 @@ collection:
- sql: ARRAY_REVERSE(haystack)
table: haystack.arrayReverse()
description: Returns an array in reverse order. If the array itself is
null, the function will return null.
+ - sql: ARRAY_SLICE(array, start_offset, end_offset)
+ table: array.arraySlice(start_offset, end_offset)
+ description: Returns a subset of the input array, starting from
'start_offset' and ending at 'end_offset'. These offsets are 1-based and can be
positive (counted from the start of the array) or negative (counted from the
end of the array). If 'start_offset' or 'end_offset' are 0, they are treated
+ as starting from the beginning of the input array. If 'start_offset' is
after 'end_offset' or if the input array is empty, it will return an empty
array. If either 'start_offset' or 'end_offset' exceed the array bounds, they
are adjusted to the size of the array. Conversely, if the absolute value
+ of a negative 'start_offset' or 'end_offset'is greater than the size of
the array, the corresponding offset is reset to the beginning of the array,
which is 1. Returns null if any input is null.
- sql: ARRAY_UNION(array1, array2)
Review Comment:
seems 2 words are useless `ending at` and could be removed
like that
```
Returns a subarray of the input array between 'start_offset' and
'end_offset' inclusive.
The offsets are 1-based however 0 is also treated as the beginning of the
array. Positive values are counted from the beginning of the array while
negative from the end. If 'start_offset' is after 'end_offset' an empty array
will be returned. If both 'start_offset' and 'end_offset' are out of array
bounds an empty array will be returned.
Returns null if any input is null.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]