You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/05/21 12:30:27 UTC

[GitHub] [arrow-rs] HaoYang670 commented on issue #807: Buffer::bit_slice has incorrect length for aligned offset

HaoYang670 commented on issue #807:
URL: https://github.com/apache/arrow-rs/issues/807#issuecomment-1133619890

   Maybe an alternative way is to add the `length` field for `Buffer`, such as:
   ```rust
   pub struct Buffer {
       /// the internal byte buffer.
       data: Arc<Bytes>,
   
       /// The offset into the buffer.
       offset: usize,
   
       /// byte length
       length: usize,
   }
   ```
   
   Then we can always give buffer the correct length and reuse `data` when doing `slice` or `bit_slice`.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org