[Iceberg]Fix identity and truncate transform on DecimalType column#21958
Conversation
|
Instead of |
|
@steveburnett Thanks for your reminder. Release note has been added! |
tdcmeehan
left a comment
There was a problem hiding this comment.
Thanks for this fix. A couple of questions.
There was a problem hiding this comment.
Does this preserve the precision?
There was a problem hiding this comment.
It didn't, and the precision would always be 0 in the result value of BigDecimal. But precision of 0 in BigDecimal is ok as it is not a strictly required parameter as scale. It could be gotten by function precision() if necessary.
There was a problem hiding this comment.
Perhaps add a preconditions check to ensure we don't return just the unscaled value of a LongDecimalType?
There was a problem hiding this comment.
Sure, good suggestion. Fixed!
bfe2493 to
c6cf611
Compare
presto-spi/src/main/java/com/facebook/presto/spi/InMemoryRecordSet.java
Outdated
Show resolved
Hide resolved
a7fb08e to
290b7ca
Compare
|
@tdcmeehan Fixed. Please take a look, thanks! |
5802e3f to
d2be45a
Compare
d2be45a to
100d430
Compare
Description
When we create partitions on DecimalType columns(using identity or truncate transform) in Iceberg, we will meet various problems because of the inappropriate handling for decimal data.
This PR fix the problems appears when using decimal as a partition column.
Test Plan
ShortDecimalTypetypeShortDecimalTypetypeLongDecimalTypetypeLongDecimalTypetypeContributor checklist
Release Notes