pitrou commented on a change in pull request #7449: URL: https://github.com/apache/arrow/pull/7449#discussion_r447171303
########## File path: cpp/src/arrow/compute/kernels/scalar_string.cc ########## @@ -133,23 +134,23 @@ struct Utf8Transform { output_string_offsets[i + 1] = output_ncodeunits; } - // trim the codepoint buffer, since we allocated too much + // Trim the codepoint buffer, since we allocated too much KERNEL_RETURN_IF_ERROR( - ctx, - output->buffers[2]->CopySlice(0, output_ncodeunits).Value(&output->buffers[2])); + ctx, values_buffer->Resize(output_ncodeunits, /*shrink_to_fit=*/true)); Review comment: :-) ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org