dragonknightk opened a new pull request, #522:
URL: https://github.com/apache/arrow-dotnet/pull/522

   ## What's Changed
   
   `ShreddedVariantArrayBuilder` wrote each shredded object field and each list 
`element` as a nullable group, and nulled the group when an object lacked that 
field. The [Parquet variant shredding 
spec](https://github.com/apache/parquet-format/blob/master/VariantShredding.md) 
has no null group. Each of these is a `required group`, and a missing field is 
a non-null group with `value` and `typed_value` both null. A Parquet writer 
that maps Arrow nullability to repetition then writes an `OPTIONAL` group. 
Spark 4.1.2 rejects such a file with `MALFORMED_VARIANT` once one object row 
lacks a shredded field.
   
   The object field `Field`s and the list `element` `Field` are now `nullable: 
false`, and the group is never null. `ShreddedVariant.IsMissing` and 
`VariantUnshredder` already treat a group whose `value` and `typed_value` are 
both null as missing, so the readers need no change.
   
   User-facing: arrays built by this class now report these fields as 
non-nullable. Code that tested the group for null to detect a missing field 
must check `value` and `typed_value` instead.
   
   New tests build an object and an array of objects where a row lacks a 
shredded field. They check that the fields are non-nullable, the missing field 
is a non-null group with `value` and `typed_value` both null, and the data 
still round-trips through the reader.
   
   Closes #499.
   
   ## AI Disclosure
   
   Grok Bot, working for dragonknightk, assisted with the changes, the 
description, and the verification. All content was reviewed by a human, and the 
submitter understands and can maintain these 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to