singh1203 commented on code in PR #46129:
URL: https://github.com/apache/arrow/pull/46129#discussion_r2235117300
##########
cpp/src/arrow/array/array_struct_test.cc:
##########
@@ -171,6 +171,20 @@ TEST(StructArray, FromFields) {
ASSERT_RAISES(Invalid, res);
}
+TEST(StructArray, ValidateFullNullable) {
+ auto type = struct_({field("a", int32(), /*nullable=*/false),
+ field("b", utf8(), /*nullable=*/false),
+ field("c", list(boolean()), /*nullable=*/false)});
+
+ auto struct_arr = ArrayFromJSON(
+ type, R"([1, "a", [null, false]], [null, "bc", []], [2, null, null]])");
+ auto struct_arr_nonull = ArrayFromJSON(
+ type, R"([[1, "a"], [true, false], [6, "bc", []], [2, "bcj", [true,
true]]])");
Review Comment:
Thanks! You were right — the brackets were unbalanced. I’ve corrected the
JSON by wrapping all rows in one outer array.
--
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]