sdf-jkl commented on code in PR #10320:
URL: https://github.com/apache/arrow-rs/pull/10320#discussion_r3686636057


##########
parquet-variant-compute/src/unshred_variant.rs:
##########
@@ -82,19 +98,43 @@ pub fn unshred_variant(array: &VariantArray) -> 
Result<VariantArray> {
             })?;
             let metadata = VariantMetadata::try_new(metadata_bytes)?;
             let mut value_builder = value_builder.builder_ext(&metadata);
-            row_builder.append_row(&mut value_builder, &metadata, i)?;
+            if value_col.is_null(i) && typed_value_col.is_none_or(|tv| 
tv.is_null(i)) {

Review Comment:
   Thanks, added 
[here](https://github.com/apache/arrow-rs/pull/10320/commits/4184a5d896b75d280aa74606efa358887bffd043)
 but with a twist. These methods also cover the nested fields, and a missing 
object field must stay absent instead of becoming `Variant::Null` (otherwise 
`{"a": 3}` would unshred as `{"a": 3, "b": null}` under a partially shredded 
schema). So the substitution lives in a sink wrapper (`TopLevelRowSink`) that 
only the top level uses.



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