apache / arrow-nanoarrow

Helpers for Arrow C Data & Arrow C Stream interfaces
https://arrow.apache.org/nanoarrow
Apache License 2.0
169 stars 35 forks source link

fix!: Change `ArrowBufferResize()` and `ArrowBitmapResize()` to update `size_bytes` #459

Closed paleolimbot closed 4 months ago

paleolimbot commented 4 months ago

Currently, ArrowBufferResize() and ArrowBitmapResize() update the capacity of the underlying buffer but do not update the size. This was documented and is consistent with Arrow C++'s BufferBuilder but inconsistent with std::vector, Arrow C++'s PoolBuffer, and user expectations given the name of the function.

After this PR, ArrowBufferResize() and ArrowBitmapResize() update the size_bytes of the underlying buffer.

This is a breaking change.