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


##########
parquet-variant-compute/src/variant_array_builder.rs:
##########
@@ -194,32 +197,23 @@ impl VariantArrayBuilder {
 ///
 /// See [`VariantArrayBuilder::variant_builder`] for an example
 pub struct VariantArrayVariantBuilder<'a> {
-    /// was finish called?
-    finished: bool,
-    /// starting offset in the variant_builder's `metadata` buffer
-    metadata_offset: usize,
-    /// starting offset in the variant_builder's `value` buffer
-    value_offset: usize,
-    /// Parent array builder that this variant builder writes to. Buffers
-    /// have been moved into the variant builder, and must be returned on
-    /// drop
-    array_builder: &'a mut VariantArrayBuilder,
-    /// Builder for the in progress variant value, temporarily owns the buffers
-    /// from `array_builder`
-    variant_builder: VariantBuilder,
+    parent_state: ParentState<'a>,

Review Comment:
   Anyway, the important thing is -- adding this `parent_state` here makes 
rollbacks reliable, and so it no longer matters whether the builder stores 
starting or ending offsets.



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to