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


##########
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:
   The thought also crossed my mind. I initially discarded it because it seemed 
bad to make those existing uses slower as well... but thinking more, the 
overheads will mostly hurt code that builds top-level primitive variant values 
-- once we get into complex types, there will be plenty of other overheads to 
hide this small one. 
   
   Given that this PR (unfortunately) penalizes that fastest-path case, it 
probably wouldn't hurt (much) to make the more complex slow-path cases use the 
same approach?



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