etseidl commented on code in PR #6757:
URL: https://github.com/apache/arrow-rs/pull/6757#discussion_r1854200085


##########
parquet/src/arrow/schema/complex.rs:
##########
@@ -448,15 +448,21 @@ impl Visitor {
             };
         }
 
+        // test to see if the repeated field is a struct or one-tuple
         let items = repeated_field.get_fields();
         if items.len() != 1
-            || repeated_field.name() == "array"
-            || repeated_field.name() == format!("{}_tuple", list_type.name())
+            || (!repeated_field.is_list()
+                && !repeated_field.has_single_repeated_child()

Review Comment:
   I didn't do this because `repetition()` can theoretically panic, even though 
by this point in the schema every node should have a repetition. Perhaps 
panicking here is warranted if the schema is invalid. I'll change if you'd 
prefer the panic (or return an error à la #6738).



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