anjakefala commented on code in PR #36266:
URL: https://github.com/apache/arrow/pull/36266#discussion_r1402791954
##########
cpp/src/arrow/compute/kernels/scalar_cast_string.cc:
##########
@@ -338,10 +338,12 @@ BinaryToBinaryCastExec(KernelContext* ctx, const
ExecSpan& batch, ExecResult* ou
if (input.offset == output->offset) {
output->buffers[0] = input.GetBuffer(0);
} else {
- ARROW_ASSIGN_OR_RAISE(
- output->buffers[0],
- arrow::internal::CopyBitmap(ctx->memory_pool(), input.buffers[0].data,
- input.offset, input.length));
+ if (input.buffers[0].data != nullptr) {
+ ARROW_ASSIGN_OR_RAISE(
+ output->buffers[0],
+ arrow::internal::CopyBitmap(ctx->memory_pool(),
input.buffers[0].data,
+ input.offset, input.length));
+ }
Review Comment:
I attempted to expand the test! I'm still new to Arrow-C++, could you take a
look at it?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]