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

UnionBuilder Create Children With Capacity #2523

Closed
tustvold opened this issue Aug 19, 2022 · 3 comments · Fixed by #2560
Closed

UnionBuilder Create Children With Capacity #2523

tustvold opened this issue Aug 19, 2022 · 3 comments · Fixed by #2560
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog good first issue Good for newcomers help wanted

Comments

@tustvold
Copy link
Contributor

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

UnionBuilder is created with a capacity, but this is only used to pre-allocate its type_ids buffer. The child buffers are created with a capacity of 1.

Describe the solution you'd like

We should save this capacity and pass it to FieldData::new. In the case of a sparse union, we should pass the maximum of the currently length and the capacity.

Describe alternatives you've considered

Additional context

@tustvold tustvold added enhancement Any new improvement worthy of a entry in the changelog good first issue Good for newcomers help wanted labels Aug 19, 2022
@kastolars
Copy link
Contributor

Hi, has anyone started on this issue?

@tustvold
Copy link
Contributor Author

No, would you like me to assign it to you?

@kastolars
Copy link
Contributor

I can give it a shot yeah, I'll try to get a PR out today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog good first issue Good for newcomers help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants