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


##########
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:
   Since `DataType::equals_datatype` 
https://github.com/apache/arrow-rs/blob/08dcc0b8c552e81d612b53bc0ab2a0007bfe20a1/arrow-schema/src/datatype.rs#L676-L688
 explicitly avoids the metadata eq check, I will elect to do the same here



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