alamb commented on code in PR #8891:
URL: https://github.com/apache/arrow-rs/pull/8891#discussion_r2612064007


##########
arrow-schema/src/fields.rs:
##########
@@ -339,19 +339,212 @@ impl UnionFields {
     ///
     /// See <https://arrow.apache.org/docs/format/Columnar.html#union-layout>
     ///
+    /// # Errors
+    ///
+    /// This function returns an error if:
+    /// - Any type_id appears more than once (duplicate type ids)
+    /// - The number of type_ids doesn't match the number of fields

Review Comment:
   I didn't see this check either -- i did see a check that the type ids are 
not duplicated
   ```suggestion
       /// - The type_ids are duplicated
   
   ```



##########
arrow-schema/src/field.rs:
##########
@@ -342,6 +342,14 @@ impl Field {
     /// - `type_ids`: the union type ids
     /// - `fields`: the union fields
     /// - `mode`: the union mode
+    ///
+    /// # Panics
+    ///
+    /// Panics if:
+    /// - any type ID is negative
+    /// - type IDs contain duplicates
+    /// - fields contain duplicates

Review Comment:
   I think this is no longer true
   
   ```suggestion
   ```



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