Jefffrey commented on issue #9287: URL: https://github.com/apache/arrow-rs/issues/9287#issuecomment-3809076218
I think it has to do with `new_from_buffer()`. The safety for `as_slice()` (repeated for `as_slice_mut()`) states https://github.com/apache/arrow-rs/blob/a49af1de8543b844430d799dff89d125a6f87221/arrow-buffer/src/builder/mod.rs#L276-L283 > MutableBuffer is aligned and initialized for len elements of T But `new_from_buffer()` allows *any* `MutableBuffer` regardless of if it's the same type: https://github.com/apache/arrow-rs/blob/a49af1de8543b844430d799dff89d125a6f87221/arrow-buffer/src/builder/mod.rs#L97-L105 Which I assume this potential issue stems from. cc @viirya who added the API in #3115, perhaps you can share some thoughts on 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]
