tustvold commented on PR #5440: URL: https://github.com/apache/arrow-rs/pull/5440#issuecomment-1975782219
So my understanding is there are two potential motivations for this functionality: 1. To provide a more idiomatic API for constructing an OffsetBuffer 2. To provide a more efficient API for constructing an OffsetBuffer Currently this PR I believe addresses 1, but not really 2. I would perhaps suggest taking a look at the way `OffsetBuffer::from_lengths` is implemented. In particular, tracking the in-progress size using `usize`, incrementing it using checked arithmetic, and converting to `O` with `usize_as`. Then at the end, i.e. in `OffsetsBuilder::finish`, checking if the value of `usize` overflows `O`. -- 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]
