Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StructBuilder should provide a way to get a &dyn ArrayBuilder of a field builder #7193

Open
the80srobot opened this issue Feb 25, 2025 · 0 comments · May be fixed by #7217
Open

StructBuilder should provide a way to get a &dyn ArrayBuilder of a field builder #7193

the80srobot opened this issue Feb 25, 2025 · 0 comments · May be fixed by #7217
Labels
enhancement Any new improvement worthy of a entry in the changelog

Comments

@the80srobot
Copy link

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

At the moment, there is no way to generically iterate over field builders in a StructBuilder, e.g. to check their len().

Describe the solution you'd like

Calling StructBuilder::field_builder requires knowing the concrete type of the ArrayBuilder in that column, but that should not be necessary. In fact, returning a reference to the Box would be sufficient, because Box<dyn ArrayBuilder> already implements ArrayBuilder.

Describe alternatives you've considered

I can think of no alternatives.

@the80srobot the80srobot added the enhancement Any new improvement worthy of a entry in the changelog label Feb 25, 2025
the80srobot added a commit to the80srobot/pedro that referenced this issue Feb 25, 2025
This works around the fact that `append_null` is
non-recursive in Rust (even though it is in C++?)
by providing a recursive append_null. (See
apache/arrow-rs#7192).

Unfortunately, providing a recursive append_null
requires codegen, because of
apache/arrow-rs#7193.

Finally, it seems that "item" fields in Lists must
always be nullable, because Arrow will
occasionally make them so in a copy of the schema
it uses for validation. (I don't yet have a
minimal repro for this bug, so I haven't filed it
yet.)
the80srobot added a commit to the80srobot/pedro that referenced this issue Feb 25, 2025
This works around the fact that `append_null` is
non-recursive in Rust (even though it is in C++?)
by providing a recursive append_null. (See
apache/arrow-rs#7192).

Unfortunately, providing a recursive append_null
requires codegen, because of
apache/arrow-rs#7193.

Finally, it seems that "item" fields in Lists must
always be nullable, because Arrow will
occasionally make them so in a copy of the schema
it uses for validation. (I don't yet have a
minimal repro for this bug, so I haven't filed it
yet.)
the80srobot added a commit to the80srobot/pedro that referenced this issue Feb 25, 2025
This works around the fact that `append_null` is
non-recursive in Rust (even though it is in C++?)
by providing a recursive append_null. (See
apache/arrow-rs#7192).

Unfortunately, providing a recursive append_null
requires codegen, because of
apache/arrow-rs#7193.

Finally, it seems that "item" fields in Lists must
always be nullable, because Arrow will
occasionally make them so in a copy of the schema
it uses for validation. (I don't yet have a
minimal repro for this bug, so I haven't filed it
yet.)
the80srobot added a commit to the80srobot/pedro that referenced this issue Feb 25, 2025
This works around the fact that `append_null` is
non-recursive in Rust (even though it is in C++?)
by providing a recursive append_null. (See
apache/arrow-rs#7192).

Unfortunately, providing a recursive append_null
requires codegen, because of
apache/arrow-rs#7193.

Finally, it seems that "item" fields in Lists must
always be nullable, because Arrow will
occasionally make them so in a copy of the schema
it uses for validation. (I don't yet have a
minimal repro for this bug, so I haven't filed it
yet.)
the80srobot added a commit to wowsignal-io/pedro that referenced this issue Feb 26, 2025
This works around the fact that `append_null` is
non-recursive in Rust (even though it is in C++?)
by providing a recursive append_null. (See
apache/arrow-rs#7192).

Unfortunately, providing a recursive append_null
requires codegen, because of
apache/arrow-rs#7193.

Finally, it seems that "item" fields in Lists must
always be nullable, because Arrow will
occasionally make them so in a copy of the schema
it uses for validation. (I don't yet have a
minimal repro for this bug, so I haven't filed it
yet.)
@lewiszlw lewiszlw linked a pull request Feb 28, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant