You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/09/27 11:38:19 UTC
[GitHub] [arrow-rs] chunshao90 opened a new issue, #2783: BinaryBuilder and StringBuilder initialization parameters in struct_builder may be wrong
chunshao90 opened a new issue, #2783:
URL: https://github.com/apache/arrow-rs/issues/2783
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
BinaryBuilder and StringBuilder initialization parameters in struct_builder may be wrong.
https://github.com/apache/arrow-rs/blob/a7cf274765945af4111fddaeec26d672715de9d0/arrow-array/src/builder/struct_builder.rs#L108
https://github.com/apache/arrow-rs/blob/a7cf274765945af4111fddaeec26d672715de9d0/arrow-array/src/builder/struct_builder.rs#L115
Refor to `with_capacity()` of BinaryBuilder and StringBuilder, the first parameter is item_capacity and the second parameter is data_capacity.
https://github.com/apache/arrow-rs/blob/a7cf274765945af4111fddaeec26d672715de9d0/arrow-array/src/builder/generic_binary_builder.rs#L41
https://github.com/apache/arrow-rs/blob/a7cf274765945af4111fddaeec26d672715de9d0/arrow-array/src/builder/generic_string_builder.rs#L39
**Describe the solution you'd like**
<!--
A clear and concise description of what you want to happen.
-->
We need to swap parameters, which means preallocating 1kB of data value buffer.
```
BinaryBuilder::with_capacity(capacity, 1024)
StringBuilder::with_capacity(capacity, 1024)
```
**Describe alternatives you've considered**
<!--
A clear and concise description of any alternative solutions or features you've considered.
-->
**Additional context**
<!--
Add any other context or screenshots about the feature request here.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] tustvold closed issue #2783: BinaryBuilder and StringBuilder initialization parameters in struct_builder may be wrong
Posted by GitBox <gi...@apache.org>.
tustvold closed issue #2783: BinaryBuilder and StringBuilder initialization parameters in struct_builder may be wrong
URL: https://github.com/apache/arrow-rs/issues/2783
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org