liamzwbao commented on code in PR #9631:
URL: https://github.com/apache/arrow-rs/pull/9631#discussion_r3016397085


##########
parquet-variant-compute/src/variant_to_arrow.rs:
##########
@@ -886,13 +894,45 @@ impl<'a> VariantToUuidArrowRowBuilder<'a> {
     }
 }
 
+/// Element builder for list variants, supporting both typed (for 
[`crate::variant_get()`])
+/// and shredded (for [`crate::shred_variant()`]) output modes.
+enum ListElementBuilder<'a> {
+    /// Produces the target array type directly.
+    Typed(Box<VariantToArrowRowBuilder<'a>>),
+    /// Produces a shredded struct with `value` and `typed_value` fields.
+    Shredded(Box<VariantToShreddedVariantRowBuilder<'a>>),

Review Comment:
   They need to be boxed because of a recursive type cycle:
   
   `ListElementBuilder::Typed → VariantToArrowRowBuilder → 
Array(ArrayVariantToArrowRowBuilder) → VariantToListArrowRowBuilder → 
ListElementBuilder`
   
   It would be infinitely sized without `Box`.
   
   



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