kasakrisz opened a new pull request #1676: URL: https://github.com/apache/hive/pull/1676
### What changes were proposed in this pull request? In some case Hive removes trailing zeros of constant decimal numbers ``` select cast(cast(1.1 as decimal(22, 2)) as string), cast(cast(sum(1.1) as decimal(22, 2)) as string) 1.1 1.10 ``` Postgres returns `1.10` for both expressions. ### Why are the changes needed? Padding decimal values with trailing zeros is not consistent. ### Does this PR introduce _any_ user-facing change? Yes. With this patch Hive will pad constant decimal values with trailing zeros up to the specified scale. ### How was this patch tested? 1.Run queries mentioned in the jira. 2. Added test case to `decimal_2.q` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org