pitrou commented on code in PR #36266:
URL: https://github.com/apache/arrow/pull/36266#discussion_r1403415485
##########
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;
Review Comment:
Let's make sure that this is a valid array?
```suggestion
fixed_array_null->data()->buffers[0] = NULLPTR;
ASSERT_OK(fixed_array_null->ValidateFull());
```
--
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]