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


##########
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:
   It almost seems like there's actually no need for the third enum variant 
because an array element builder should never experience an `append_null` call 
in the first place? If so, we only could rely on that structural invariant to 
handle variant arrays, and we only need a boolean to control whether 
`append_null` causes `nulls.append_null` (top-level) vs. 
`nulls.append_non_null` (object field), with an unconditional 
`value_builder.append_null()`?
   
   But I wonder what the actual call stack/object hierarchy is in these various 
cases? Maybe I'm misunderstanding the layout and how the various builders 
relate to each other.



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