andishgar commented on issue #46177: URL: https://github.com/apache/arrow/issues/46177#issuecomment-2832089833
> Thank your for your response. BTW, should I open a separate issue for the following code? It seems to reallocate the offset_buffer, even though it's already been allocated > > [arrow/cpp/src/arrow/compute/kernels/scalar_cast_string.cc](https://github.com/apache/arrow/blob/c2ec1cda88918a3920b7b29eca8d2e3ca7a49fb2/cpp/src/arrow/compute/kernels/scalar_cast_string.cc#L340-L343) > > Lines 340 to 343 in [c2ec1cd](/apache/arrow/commit/c2ec1cda88918a3920b7b29eca8d2e3ca7a49fb2) > > // Set up offset and data buffer > OffsetBuilder offset_builder(ctx->memory_pool()); > RETURN_NOT_OK(offset_builder.Reserve(input.length + 1)); > offset_builder.UnsafeAppend(0); // offsets start at 0 @pitrou I decided to send a pull request to correct this. However, I doubt maybe the same issue exists for other casting string types compute functions and after further investigation, I figured out there are 8 casting compute functions regarding string types. All of them expect fixed-> offset considers the second buffers as not allocated! So, I come up with a different plan in my pull request #46230 -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org