Skip to content

Implement ArrayBuilder for UnionBuilder #8033

@grtlr

Description

@grtlr

Which part is this question about

The arrow-rs library.

Describe your question

I'm currently working on a tool that converts protobuf messages into Arrow data. To capture the nested structure of protobuf messages, I'm using type-erased Box<dyn ArrayBuilder>s.

While doing so, I stumbled upon the fact that UnionBuilder does not implement the ArrayBuilder trait. Is there a technical limitation for this? If not, I could try to come up with an implementation.

Additional context

To implement this, I would add Send + Sync to the FieldDataValues trait. Then it looks like it's enough to implement finish and finish_cloned, which I could implement similar to UnionBuilder::build().

Would it be ok to panic if the underlying UnionArray::try_new fails?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions