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


##########
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:
   Updated diagnosis: When storing starting offset, the extra bytes that failed 
to roll back were harmlessly "appended" to the previous row as padding after 
the "real" variant value. But when storing ending offset, the extra bytes were 
"prepended" to the _next_ row, whose own value was thus wrongly ignored as 
padding.



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