HyukjinKwon commented on PR #59159:
URL: https://github.com/apache/spark/pull/59159#issuecomment-5976635444

   Thanks for the ping, @dwsmith1983 -- took a look. The compact-decimal fast 
path writes the same minimal big-endian two's-complement bytes as the previous 
`BigInteger.toByteArray()` encoding into the already-zeroed 16-byte slot, so 
the `UnsafeRow` layout, hashing and equality are unchanged, and `getDecimal` 
returns a compact `Decimal` only within `createUnsafe`'s compact bounds 
(`|unscaled| < 10^18`, `0 <= scale <= 18`), falling back to the previous 
BigDecimal-backed result otherwise. The 
`roundToInt`/`roundToShort`/`roundToByte` change moves BigDecimal-backed values 
to exact truncation like `roundToLong`.
   
   <!-- SPARK_DEV_REVIEW_REPLY 
{"feedback_id":"conversation:5966671397","thread_id":"conversation:5966671397","verdict_sha256":"9b8c74256d66529770bb4a247f1aec374aea5ba1c136aad5e74b307febae9899"}
 -->


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to