Skip to content

Add a mutable builder for Offsets #5384

@alamb

Description

@alamb

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Part of a discussion in Discord: https://discord.com/channels/885562378132000778/885562378132000781/1205552581422878730

@kylebarron notes that arrow-rs has an immutable OffsetBuffer but no mutable builder counterpart.

arrow2 had a mutable builder called Offsets to help building up the offsets, with helpers like try_push_usize that would enforce the monotonically increasing invariant

As part of his arrow2 -> arrow-rs conversion he vendored that builder in my own code https://github.com/geoarrow/geoarrow-rs/blob/011e77736ac25c55141608c135852c1f5d3198dd/src/array/offset_builder.rs

Describe the solution you'd like
Consider upstreaming OffsetBuilder into arrow-rs

Describe alternatives you've considered
We can leave the current situation alone.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrowChanges to the arrow crateenhancementAny new improvement worthy of a entry in the changelog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions