SAY-5 commented on PR #23433:
URL: https://github.com/apache/datafusion/pull/23433#issuecomment-5024593059

   Reworked as suggested. `resolve_start_from` now keeps the original 1-based 
i64 values, and a single `zero_based_start(start_from, row_len)` helper does 
the `checked_sub(1)` + `usize::try_from` and validates the resulting 0-based 
index against the row length, returning `start_from out of bounds` instead of 
saturating or panicking. Both the scalar fast path and the general dispatch now 
go through it. The i64::MIN case is covered by the existing unit test and the 
array_position sqllogictests pass.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to