scovich commented on code in PR #8366: URL: https://github.com/apache/arrow-rs/pull/8366#discussion_r2357533455
########## parquet-variant-compute/src/variant_array.rs: ########## @@ -351,6 +351,32 @@ impl ShreddedVariantFieldArray { pub fn inner(&self) -> &StructArray { &self.inner } + + pub(crate) fn from_parts( + value: Option<BinaryViewArray>, + typed_value: Option<ArrayRef>, + nulls: Option<NullBuffer>, + ) -> Self { + let mut builder = StructArrayBuilder::new(); + if let Some(value) = value.clone() { + builder = builder.with_field("value", Arc::new(value), true); + } + if let Some(typed_value) = typed_value.clone() { + builder = builder.with_field("typed_value", typed_value, true); + } + if let Some(nulls) = nulls { + builder = builder.with_nulls(nulls); + } + + // This would be a lot simpler if ShreddingState were just a pair of Option... we already Review Comment: This should all be cleaned up now. -- 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