Handling trailing zeros of decimal constants
Learn about the change that ensures that decimal constants are padded with trailing zeros according to the specified scale.
Before upgrade to CDP 7.1.6
Hive removes trailing zeros of decimal constants in some cases. Padding decimal values with
trailing zeros is not consistent. For
example,
select cast(cast(1.1 as decimal(22, 2)) as string), cast(cast(sum(1.1) as decimal(22, 2)) as string)
Output:
1.1 1.10
After upgrade to CDP 7.1.6
HIVE-24389 provides the fix that pads constant decimal values with trailing zeros up to the specified scale.