hanyuzheng7 commented on code in PR #22834: URL: https://github.com/apache/flink/pull/22834#discussion_r1243948355
########## flink-python/docs/reference/pyflink.table/expressions.rst: ########## @@ -230,6 +230,7 @@ advanced type helper functions Expression.array_position Expression.array_remove Expression.array_reverse + Expressions.array_slice Review Comment: Ok, I will fix it. ########## flink-python/pyflink/table/expression.py: ########## @@ -1512,6 +1512,19 @@ def array_reverse(self) -> 'Expression': """ return _binary_op("arrayReverse")(self) + def array_slice(self, start, length) -> 'Expression': + """ + Returns an array that is a subset of the original array, extracted based on the specified + `start` index and `length`. Supports both positive and negative indices. Positive indices + start from 1 (the first element) while negative indices start from the end of the array + (-1 being the last element). If the original array or start or length are null, null is + returned. If the `length` exceeds the available elements starting from the `start` index, + all elements till the end of the array are returned. If abs(start) is greater than the + length of the array or start equal to 0 or length is smaller than 0 or equal to 0, return + null. Review Comment: Ok, let me change behavior of the function. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org