anjakefala commented on code in PR #36266:
URL: https://github.com/apache/arrow/pull/36266#discussion_r1412464754
##########
cpp/src/arrow/compute/kernels/scalar_cast_test.cc:
##########
@@ -2104,6 +2104,11 @@ TEST(Cast, BinaryToString) {
// ARROW-16757: we no longer zero copy, but the contents are equal
ASSERT_NE(invalid_utf8->data()->buffers[1].get(),
strings->data()->buffers[2].get());
ASSERT_TRUE(invalid_utf8->data()->buffers[1]->Equals(*strings->data()->buffers[2]));
+
+ // ARROW-35901: check that casting with first buffer being a `nullptr`
works
+ auto fixed_array_null = ArrayFromJSON(from_type, "[]");
+ fixed_array_null->data()->buffers[0] = NULLPTR;
+ CheckCast(fixed_array_null, ArrayFromJSON(string_type, "[]"));
Review Comment:
It now passes with the patch and segfaults on main! The patch was doing the
check after an `offset` check. This only affected sliced `Buffers`.
--
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]