alamb commented on code in PR #8324:
URL: https://github.com/apache/arrow-rs/pull/8324#discussion_r2341854191


##########
parquet-variant/src/builder.rs:
##########
@@ -709,6 +727,14 @@ pub enum ParentState<'a> {
         saved_fields_size: usize,
         finished: bool,
     },
+    Custom {
+        value_builder: &'a mut ValueBuilder,
+        saved_value_builder_offset: usize,
+        metadata_builder: &'a mut dyn MetadataBuilder,
+        saved_metadata_builder_dict_size: usize,
+        state: Box<dyn CustomParentState + 'a>,

Review Comment:
   👍  makes sense to me
   
   I wonder if we should go even farther and change parent state to *only* have 
a ` state: Box<dyn CustomParentState + 'a>,` (and not different variants for 
Variant, List, Object, etc)
   
   That might simplify things even more, however, it would have the downside of 
adding allocation / dispatch for everything 🤔 



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