jorgecarleitao commented on pull request #8715:
URL: https://github.com/apache/arrow/pull/8715#issuecomment-731558992


   I agree with @alamb and @nevi-me. IMO we must not have a second comparison.
   
   Valid options for me:
   1. do nothing
   2. replace `Field` by `(nullable, DataType)`, so that we do not track the 
field's name on the `DataType` (`Field` is a trivial struct and also contains 
`dict_is_ordered` and `dict_id` that may not be applicable here)
   3. implement `PartialEq` to ignore the field's name (note, `PartialCmp` does 
not exist)
   
   Along with Hash, equality is one of the most important operations on a 
`struct` in Rust, and trying to create variations of it adds a lot of 
confusion. Like the example I gave, users can no longer assume that two arrays 
on a `RecordBatch` will have equal DataTypes and equal to the RecordBatch's 
Schema's DataType, which essentially makes a RecordBatch's schema kind of 
useless. Like @nevi-me's point, disregarding nullability breaks integration 
with C++.
   
   @ch-sc , what is your concern with updating `PartialEq`?


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to