pitrou commented on code in PR #12706:
URL: https://github.com/apache/arrow/pull/12706#discussion_r891411396
##########
cpp/src/arrow/array/array_test.cc:
##########
@@ -78,6 +78,24 @@ class TestArray : public ::testing::Test {
MemoryPool* pool_;
};
+TEST_F(TestArray, ValidateFullNullableList) {
+ auto f1 = field("f1", int32(), /*nullable=*/false);
+ auto ty = list(f1);
+ auto array = ArrayFromJSON(ty, "[[0, 1, 2, null], null, [4, 5]]");
+ ASSERT_RAISES(Invalid, array->ValidateFull());
+}
+
+TEST_F(TestArray, ValidateFullNullableFixedSizeList) {
+ auto f0 = field("f0", int32(), /*nullable=*/false);
+ auto type = fixed_size_list(f0, 2);
+ auto array_nonull = ArrayFromJSON(type, "[[0, 1], [3,4], [2, 3]]");
+ auto array = ArrayFromJSON(type, "[[0, 1], null, [2, 5]]");
Review Comment:
Hmm... the fact that this doesn't validate is more due to an implementation
detail of `ArrayFromJSON`, I think.
--
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]