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

   # Which issue does this PR close?
   - Closes #11848
   
   # Rationale for this change
   `StructArray::try_new_with_length` materialises a null bitmap while 
validating a non-nullable `Null` field. At very large lengths, bitmap 
allocation panics before the constructor can return its validation error.
   
   # What changes are included in this PR?
   The constructor now checks `Null` fields from their semantics and parent 
null count, avoiding the allocation while preserving the case where the parent 
masks every row.
   
   # Are these changes tested?
   The regression failed before the fix with the allocation panic. `cargo test 
-p arrow-array` passed (748 unit tests and 208 doctests; one in each group was 
ignored). Formatting and targeted Clippy checks passed. Clippy reports an 
existing unknown-lint warning in unchanged `arrow-schema`/`arrow-buffer` 
configuration.
   
   # Are there any significant user-facing changes?
   No API change. Invalid input now returns the existing `ArrowError` instead 
of panicking.
   
   # AI usage
   AI assistance (Codex) was used to write the validation change and regression 
tests.
   


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

Reply via email to