JingsongLi commented on PR #8718:
URL: https://github.com/apache/paimon/pull/8718#issuecomment-5058702721

   There are still issues with high-precision serialization of `Decimal`. 
`to_unscaled_bytes` and `from_unscaled_bytes` perform `scaleb` with the default 
`Decimal` precision of 28, causing valid `DECIMAL(38, s)` values to be silently 
rounded. For example, `12345678901234567890123456789012345678` is encoded as 
`12345678901234567890123456790000000000`. The shortest two’s complement 
representation of negative numbers is also incompatible with Java: `-128` 
outputs `ff80`, whereas `BigInteger.toByteArray()` should return `80`.


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