snuyanzin commented on code in PR #22834:
URL: https://github.com/apache/flink/pull/22834#discussion_r1242649514


##########
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:
   Sam comment as above for doc



##########
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:
   Same comment as above for doc



-- 
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]

Reply via email to