Reputation: 5800
Below is the issue which i want to address, in hive query itself, rather than taking data in POJO and then applying formatting (DefaultFormatter etc.) in my downstream program
hive> SELECT ROUND(0.605,2);
0.61
-- Result = 0.61
-- Expectation = 0.61
hive> SELECT ROUND(0.604, 2);
0.6
--- Result = 0.6
--- Expectation = 0.60
how to modify select construct in such a manner which returns decimals with 2 digits padded regardless of their value.
Upvotes: 1
Views: 405