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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]