alamb commented on PR #7961:
URL: https://github.com/apache/arrow-rs/pull/7961#issuecomment-3090220267

   > I agree that whatever we do should not be merely physical byte 
comparisons... but what does logical equality even mean? As in, if two variant 
objects compare logically equal, what can I do with that newfound knowledge? 
What goes wrong if I treat two variant objects as "equal" when they are not? 
etc.
   
   
   In my mind, the biggest usecase for `eq` is unit tests -- when we want to 
assert that the content of two Variants is equal -- like encoding expected 
results from converting from JSON to variant
   
   > the variant spec defines a notion of [equivalence 
class](https://github.com/apache/parquet-format/blob/master/VariantEncoding.md#encoding-types)
 that would almost certainly consider logical equality as a "user expression":
   
   This is a good point, but I suggest we make any 'equivalence class' based 
comparison explicit (like `Variant::class_eq` or something when the need arises)
   
   > Short string -- The spec requires that
   
   Yes, let's do that
   
   > One could claim that two objects are the same if their field ids are the 
same. But that's only true if they both were encoded using the same metadata 
dictionary!
   
   I think this is a function of how we are defining equality -- I think I 
would probably try and define equality so it did not include the contents of 
the dictionary (aka does not rely on the actual values of the `field_ids`)


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to