alamb commented on PR #9120: URL: https://github.com/apache/arrow-rs/pull/9120#issuecomment-3744092278
> Oh... BooleanBufferBuilder::finish takes &mut self and must allocate internal replacements for the consumed state, while From (as always) consumes self. Maybe it's worth documenting that pitfall on the finish method? I didn't even realize that impl From was a cheap/final alternative to finish, but it does make sense in retrospect. Yeah, I am not sure how expensive the `finish` call really is (it does do more work than the impl `From` but as you point out the amount of extra work is quite small) I'll make a follow on PR to document how this works. I also wonder why the builders done just have a (consuming) build method 🤔 -- 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]
