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

Why are null buffers / validity slices exposed by some builders, but not others? #5749

Closed
HadrienG2 opened this issue May 11, 2024 · 1 comment · Fixed by #5754
Closed

Why are null buffers / validity slices exposed by some builders, but not others? #5749

HadrienG2 opened this issue May 11, 2024 · 1 comment · Fixed by #5754
Labels
question Further information is requested

Comments

@HadrienG2
Copy link
Contributor

Which part is this question about
API of arrow_array::builder.

Describe your question
BooleanBuilder and PrimitiveBuilder provide read-only access to their null buffer via a validity_slice() method. However, GenericListBuilder does not provided such access, even though it does expose list offsets via the offsets_slice() method.

Is there a reason why this is the case, or may I submit a PR to add validity_slice() methods to this builder, and possibly other builders with a null buffer along the way?

Additional context
In the context of #5700, I'm investigating which strongly typed builders could expose their contents via a generalized slice type. Right now, I would able to do so for builders of non-nullable lists, but not for builders of nullable lists, due to lack of access to the list builder's null buffer. Exposing offsets but not the null buffer seems odd, hence my asking.

@HadrienG2 HadrienG2 added the question Further information is requested label May 11, 2024
@tustvold
Copy link
Contributor

I see no reason not to add this to ListBuilder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants