Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.10.0
-
None
-
Incompatible change, Reviewed
-
The change makes the return type of round function be the same type as that of the first argument (assuming that it is integer, double, or decimal). This means that for an integer argument, the result is an integer (no decimal places).
Description
Chen Chun pointed out on the hive-user mailing list that round() in Hive 0.10 returns
select round(cast(1234560 as BIGINT)), round(cast(12345670 as BIGINT)) from test limit 1; //hive 0.10 1234560.0 1.234567E7
This is not consistent with MySQL(http://dev.mysql.com/doc/refman/5.1/en/mathematical-functions.html#function_round)
which quotes
The return type is the same type as that of the first argument (assuming that it is integer, double, or decimal). This means that for an integer argument, the result is an integer (no decimal places)
Attachments
Attachments
Issue Links
- is related to
-
HIVE-3675 NaN does not work correctly for round(n)
- Closed