c-thiel opened a new pull request, #2880:
URL: https://github.com/apache/iceberg-rust/pull/2880

   ## What changes are included in this PR?
   
   Project variant columns on read by mapping their metadata/value leaves 
(which carry no field id — only the enclosing group does) to the variant's 
field id, mirroring Java's PruneColumns: the whole group is projected with no 
type-promotion check. Shredded variants (typed_value present) are rejected 
until we can reconstruct them.
   
   collect_variant_leaves numbers leaves exactly like Fields::filter_leaves, 
including its Dictionary/RunEndEncoded unwrapping and Union descent, so a 
sibling of those kinds can't shift a variant's leaves onto the wrong column. 
The pruned schema used for the type-promotion check includes variant leaves 
too, keeping map<_, variant> a well-formed two-field map.
   
   Variant identity is recovered from the Iceberg schema: fields the table 
schema declares as variants are tagged with the arrow.parquet.variant extension 
so arrow_schema_to_schema folds the storage struct back into Type::Variant. 
This mirrors iceberg-java's TypeWithSchemaVisitor, which recognizes a variant 
by the Parquet annotation OR the Iceberg type, and avoids depending on the 
Parquet variant annotation being present.
   
   ## Are these changes tested?
   yes
   
   -----
   Based on https://github.com/apache/iceberg-rust/pull/2188 and 
https://github.com/apache/iceberg-rust/pull/2840 and 


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to