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


##########
arrow-schema/src/fields.rs:
##########
@@ -329,6 +329,28 @@ impl std::fmt::Debug for UnionFields {
     }
 }
 
+impl PartialEq for UnionFields {
+    fn eq(&self, other: &Self) -> bool {
+        self.len() == other.len()
+            && self.iter().all(|a| {
+                other.iter().any(|b| {
+                    a.0 == b.0
+                        && a.1.is_nullable() == b.1.is_nullable()
+                        && a.1.data_type().equals_datatype(b.1.data_type())

Review Comment:
   How about the metadata?
   
   (it might be more consistent to compare `a.1 == b.1` )



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