Copilot commented on code in PR #51108:
URL: https://github.com/apache/arrow/pull/51108#discussion_r3897272636
##########
cpp/src/arrow/json/parser_test.cc:
##########
@@ -267,6 +267,14 @@ TEST(BlockParser, Null) {
R"([{"plain": null}, {"plain": null}])"});
}
+TEST(BlockParser, NullsInList) {
+ auto options = ParseOptions::Defaults();
+ options.unexpected_field_behavior = UnexpectedFieldBehavior::InferType;
+ AssertParseColumns(options, R"({"a": [null, null], "b": [null, "hi",
null]})",
+ {field("a", list(null())), field("b", list(utf8()))},
+ {"[[null, null]]", R"([[null, "hi", null]])"});
+}
Review Comment:
The new regression test exercises the inferred-schema path (InferType) but
doesn’t cover the explicit schema modes mentioned in the PR description (e.g.,
`unexpected_field_behavior` Error/Ignore with `explicit_schema` set). Adding
explicit-schema assertions would better guard against future divergence between
inference and schema-driven parsing for null-typed lists.
--
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]