QuakeWang commented on PR #156:
URL: https://github.com/apache/paimon-rust/pull/156#issuecomment-4150198449

   > One noteworthy aspect is the equivalence comparison of Decimal. In Java, 
Decimal uses `compareTo` to achieve equivalence, which can maintain equality 
even at different scales.
   
   Good catch! I have fixed this.
   
   `Datum` now has a manual `PartialEq` impl instead of `derive(PartialEq)`. 
The `Decimal` variant normalizes both sides to a common scale before comparing 
unscaled values, matching Java `Decimal.equals()` which delegates to 
`compareTo() == 0`
   
   For example, `Decimal(unscaled=10, scale=1)` and `Decimal(unscaled=100, 
scale=2)` are now considered equal since both represent `1.0`.
   


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