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


##########
arrow-schema/src/fields.rs:
##########
@@ -435,6 +435,11 @@ impl UnionFields {
                 }
             }
         }
+
+        // sort fields by type id to ensure deterministic ordering and 
consistent equality comparisons
+        out.sort_unstable_by_key(|&(i, _)| i);
+
+        return Ok(Self(out.into()));

Review Comment:
   > https://github.com/apache/arrow-rs/pull/8937#discussion_r2624620897
   
   It seems sorting the UnionFields upon construction lets everything else fall 
into place
   
   Note we can now `derive(PartialEq, Hash)`
   
   cc @alamb @tobixdev 



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