alamb commented on PR #9778:
URL: https://github.com/apache/arrow-rs/pull/9778#issuecomment-4319992516

   > I don't see a good way now to avoid these copies, apart from waiting for 
improvements in the rust standard library itself 
(https://github.com/rust-lang/rfcs/blob/master/text/2930-read-buf.md#summary).
   
   One thing we maybe could do (that woudl be more invasive) would be to add a 
template parameter to `read_buffer` with the relevant underlying native type to 
ensure alignment. 
   
   So instead of `read_buffer` it would be something like `read_buffer<i32>` 
and `read_buffer<i64>` 
   
   This would ensure the correct underlying buffer alignment but would take 
some non trivial changes (e.g. move away from usng ArrowData and instead create 
the various arrays directly (e.g. PrimtiveArray::new())`


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