jorgecarleitao commented on pull request #9492: URL: https://github.com/apache/arrow/pull/9492#issuecomment-778739038
@nevi-me , I am not sufficiently experienced in Rust to say whether transmuting any `Buffer` to `ArrowNativeType` is sound. It could be that our alignment `ALIGNMENT` guarantees that it is safe to do so, but given all the warnings [here](https://doc.rust-lang.org/nomicon/transmutes.html) and [here](https://doc.rust-lang.org/std/mem/fn.transmute.html), I am not certain we fulfill all conditions. If you are certain, then I agree and let's do that instead. wrt to the offsets, I think that it since we always need to compute a length to access values, and thus we need to perform a subtraction of two unsigneds, Rust panics, so I think that from the safety point of view we are good. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
