You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "singh1203 (via GitHub)" <gi...@apache.org> on 2025/08/01 07:14:48 UTC
Re: [PR] GH-31387: [C++] Check nullability when validating fields on batches or struct arrays [arrow]
singh1203 commented on code in PR #46129:
URL: https://github.com/apache/arrow/pull/46129#discussion_r2247176852
##########
cpp/src/arrow/array/array_test.cc:
##########
@@ -100,6 +100,28 @@ void CheckDictionaryNullCount(const std::shared_ptr<DataType>& dict_type,
ASSERT_EQ(arr->data()->MayHaveLogicalNulls(), expected_may_have_logical_nulls);
}
+TEST_F(TestArray, TestValidateFullNullableList) {
+ auto f1 = field("f1", int32(), /*nullable=*/false);
+ auto type = list(f1);
+ auto array = ArrayFromJSON(type, "[[0, 1], null, [2, 5]]");
+ auto array_nested_null = ArrayFromJSON(type, "[[0, 1], [3, 4], [2, null]]");
+
+ ASSERT_RAISES(Invalid, array->ValidateFull());
+ ASSERT_RAISES(Invalid, array_nested_null->ValidateFull());
Review Comment:
@pitrou @lidavidm This unit test is failing, maybe due to the way the array is formed from `ArrayFromJSON()`. Any guidance will help me a lot.
Thank you
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org