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

The GenericBinaryBuilder should use buffer builders directly. #2104

Closed
HaoYang670 opened this issue Jul 19, 2022 · 1 comment · Fixed by #2117
Closed

The GenericBinaryBuilder should use buffer builders directly. #2104

HaoYang670 opened this issue Jul 19, 2022 · 1 comment · Fixed by #2117
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog

Comments

@HaoYang670
Copy link
Contributor

HaoYang670 commented Jul 19, 2022

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently, the GenericBinaryBuilder is based on GenericListBuilder:

///  Array builder for `BinaryArray`
#[derive(Debug)]
pub struct GenericBinaryBuilder<OffsetSize: OffsetSizeTrait> {
    builder: GenericListBuilder<OffsetSize, UInt8Builder>,
}

It is not a good implementation because

  1. There are some bugs in the method BinaryArray::from_list: GenericBinaryArray::from_list and GenericStringArray::from_list Ignores Offset #1726
  2. list array is nested, which will occupy more memory
  3. Building from buffer builders is faster.

Describe the solution you'd like

  1. Use buffer builders directly.
  2. Delete the methods append_byte and append which are unsafe and are not used in other mods.

Describe alternatives you've considered
We could not do this.

Additional context
Add any other context or screenshots about the feature request here.

@HaoYang670 HaoYang670 added the enhancement Any new improvement worthy of a entry in the changelog label Jul 19, 2022
@HaoYang670
Copy link
Contributor Author

I will work on this.

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants