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


##########
parquet-variant-compute/src/variant_to_arrow.rs:
##########
@@ -941,7 +942,14 @@ where
         match value {
             Variant::List(list) => {
                 for element in list.iter() {
-                    self.element_builder.append_value(element)?;
+                    match element {

Review Comment:
   Not sure I understand. We already _know_ we're dealing with an array 
element, so what goes wrong if we just write `Variant::Null`? That would append 
the value and mark it as non-null, which _seems_ to be exactly what 
[append_to_null_row](https://github.com/apache/arrow-rs/pull/9599/changes#diff-fd0ec8577d0f6349176a0dfa6a1d201b79823a965c45b6b63400c5fe360e348cR127-R131)
 does for `ANM::ArrayElement` case?
   ```rust
           match self {
               Self::TopLevelVariant => nulls.append_null(),
   =>          Self::ObjectField | Self::ArrayElement => 
nulls.append_non_null(),
           }
           match self {
               Self::TopLevelVariant | Self::ObjectField => 
value_builder.append_null(),
   =>          Self::ArrayElement => value_builder.append_value(Variant::Null),
           }



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