hanyuzheng7 commented on PR #22834: URL: https://github.com/apache/flink/pull/22834#issuecomment-1621958121
> if the third is optional the result should be same as the third arg is equal to length of the array (same as in case of `substring`) the result should be > > ``` > array_slice(ARRAY[1,2,3] , -3) -> [1,2,3] <-- here yes, correct, it is same as array_slice(ARRAY[1,2,3] , -3) > array_slice(ARRAY[1,2,3] , 1) -> [1, 2, 3] <-- here it is same as array_slice(ARRAY[1,2,3] , 1, 3) > and array_slice(ARRAY[1,2,3], 4) -> [] <-- same as array_slice(ARRAY[1,2,3], 4, 3) -> [] > ``` -3 stand for from end of array to start of array so it stand from 1, how about this situation ` array_slice(ARRAY[1,2,3] , -5) -> [1,2,3] ?` -- 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]
