Rich-T-kid commented on PR #11174:
URL: https://github.com/apache/arrow-rs/pull/11174#issuecomment-6305286024

   > The precedent I saw was InProgressArray::copy_rows. It is a safe trait 
method with no documented precondition, and its impls call get_unchecked on 
offset..offset + len behind a SAFETY comment that relies on the caller 
([primitive.rs](https://github.com/apache/arrow-rs/blob/d58a0fce35b67836ac9b2e20a7efe47a584e0a86/arrow-select/src/coalesce/primitive.rs#L167-L169),
 
[byte_view.rs](https://github.com/apache/arrow-rs/blob/d58a0fce35b67836ac9b2e20a7efe47a584e0a86/arrow-select/src/coalesce/byte_view.rs#L411-L412)).
 
   
   +1 on this. Im not sure why we need to mark the entire method as unsafe if 
we check for invariants before calling it. since the method is private, users 
cannot directly shoot themselves in the foot with this


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