[ https://issues.apache.org/jira/browse/ARROW-5212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rok Mihevc updated ARROW-5212: ------------------------------ External issue URL: https://github.com/apache/arrow/issues/21687 > [Go] Array BinaryBuilder in Go library has no access to resize the values > buffer > -------------------------------------------------------------------------------- > > Key: ARROW-5212 > URL: https://issues.apache.org/jira/browse/ARROW-5212 > Project: Apache Arrow > Issue Type: Improvement > Components: Go > Reporter: Jonathan A Sternberg > Priority: Minor > Labels: pull-request-available > Fix For: 0.14.0 > > Time Spent: 1h 20m > Remaining Estimate: 0h > > When you are dealing with a binary builder, there are three buffers: the null > bitmap, the offset indexes, and the values buffer which contains the actual > data. > When {{Reserve}} or {{Resize}} are used, the null bitmap and the offsets are > modified to allow for additional appends to function. This seems correct to > me. There's no way to know how much the values buffer should be resized until > the values are being appended with just the number of values alone. > But, when you are then appending a bunch of string values, there's no > additional API to preallocate the size of that last buffer. That means that > batch appending a large amount of strings will constantly allocate even if > you know the size ahead of time. > There should be some additional API to modify this last buffer such as maybe > {{ReserveBytes}} and {{ResizeBytes}} that would correspond with the > {{Reserve}} and {{Resize}} methods, but would related to the values buffer. -- This message was sent by Atlassian Jira (v8.20.10#820010)