You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "subotac (via GitHub)" <gi...@apache.org> on 2026/07/29 08:11:03 UTC

[PR] fix(arrow-json): validate map value nullability [arrow-rs]

subotac opened a new pull request, #10475:
URL: https://github.com/apache/arrow-rs/pull/10475

   > AI disclosure: Codex assisted with issue analysis, implementation, and running local tests. The changes and this description were reviewed by the submitter.
   
   # Which issue does this PR close?
   
   - Closes #6391.
   
   # Rationale for this change
   
   The JSON map decoder constructed map entries with an unchecked `StructArray` constructor. This bypassed child field nullability validation and allowed a null value even when the map value field was non-nullable.
   
   # What changes are included in this PR?
   
   - Construct map entries with `StructArray::try_new_with_length` so existing schema validation rejects unmasked nulls.
   - Add a regression test for a null JSON map value with a non-nullable value field.
   
   # Are these changes tested?
   
   Yes:
   
   - `cargo +stable fmt --all -- --check`
   - `cargo test -p arrow-json --all-features`
   - `cargo clippy --workspace --all-targets --all-features -- -D warnings`
   - `git diff --check`
   
   # Are there any user-facing changes?
   
   Yes. Reading a null JSON map value against a non-nullable value field now returns an error instead of producing an array that violates its schema. There are no public API changes.
   


-- 
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


Re: [PR] fix(arrow-json): validate map value nullability [arrow-rs]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #10475:
URL: https://github.com/apache/arrow-rs/pull/10475#issuecomment-5125760596

   thanks @subotac 


-- 
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


Re: [PR] fix(arrow-json): validate map value nullability [arrow-rs]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey merged PR #10475:
URL: https://github.com/apache/arrow-rs/pull/10475


-- 
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