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

   Hi, @snuyanzin , before I change the description, I have an question to ask 
you.
   
   I am currently attempting to adjust an array slice function to switch from a 
0-based index to a 1-based index . However, I have encountered some issues 
related to this change, specifically with regards to handling the start_offset 
and end_offset:
   
   In the context of a 1-based index, if we have a query like array_slice[0, 
2], what would be the expected output? Since 0 is not a valid index in a 
1-based system, how should we handle this start_offset or end_offset when it is 
set to 0?
   
   If we have a query like array_slice[1, 0], how should this be interpreted? 
According to the Google Cloud array_slice definition, the function should 
return an empty array if the position of the start_offset in the array is after 
the position of the end_offset. But in this case, since we are using a 1-based 
index, should we consider these positions to be the same and return [1], or 
should we consider end_offset of 0 to be invalid and return an empty array?


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