hanyuzheng7 commented on PR #22834:
URL: https://github.com/apache/flink/pull/22834#issuecomment-1618890061

   > then probably need change definition for Google Spanner[1] e.g. it's 
mentioned `Out-of-bounds offsets are supported` Probably should have same 
instead of `If either 'start_offset' or 'end_offset' exceed the array bounds, 
they are adjusted to the size of the array`
   > 
   > also an example from Google Spanner (remember it's zero based)
   > 
   > ```sql
   > SELECT ARRAY_SLICE(['a', 'b', 'c', 'd', 'e'], 5, 30) AS result
   > 
   > /*--------*
   >  | result |
   >  +--------+
   >  | []     |
   >  *--------*/
   > ```
   > 
   > [1] 
https://cloud.google.com/spanner/docs/reference/standard-sql/array_functions#array_slice
   
   So, we if start offset larger than size, will return empty, so how about 
this case
   `SELECT ARRAY_SLICE(['a', 'b', 'c', 'd', 'e'], -50, -30`
   this should return empty?


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