wjones127 commented on issue #5104:
URL: https://github.com/apache/arrow-rs/issues/5104#issuecomment-1832763021

   > I was debating if I should open an issue and make object store return 
aligned buffers. Since there is no mmap in the object store I think this is 
doable?
   
   I think there might be a way to get aligned buffers more optimally within 
the existing APIs: Right now, the body is read as a stream of `Bytes` and then 
concatenated here:
   
   
https://github.com/apache/arrow-rs/blob/6d4b8bbad95c7e4fec0c4f1fb755ad7a1c542983/object_store/src/lib.rs#L1021
   
   The concatenation does a mem copy already, so we could mem copy them into an 
buffer of our preferred alignment. The `GetResult` struct seems to have a 
pretty open API, so I think users could achieve this themselves if they want:
   
   
https://github.com/apache/arrow-rs/blob/6d4b8bbad95c7e4fec0c4f1fb755ad7a1c542983/object_store/src/lib.rs#L969-L976
   


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