[
https://issues.apache.org/jira/browse/HIVE-4523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Fred Desing updated HIVE-4523:
------------------------------
Description:
// hive
hive> select round(150.000, 2) from temp limit 1;
150.0
hive> select round(150, 2) from temp limit 1;
150.0
// mysql
mysql> select round(150.000, 2) from DUAL limit 1;
round(150.000, 2)
150.00
mysql> select round(150, 2) from DUAL limit 1;
round(150, 2)
150
http://dev.mysql.com/doc/refman/5.1/en/mathematical-functions.html#function_round
was:
// hive
hive> select round(150.00, 2) from temp limit 1;
150.0
hive> select round(150, 2) from temp limit 1;
150.0
// mysql
mysql> select round(150.00, 2) from DUAL limit 1;
round(150.00, 2)
150.00
mysql> select round(150, 2) from DUAL limit 1;
round(150, 2)
150
> round() function with specified decimal places not consistent with mysql
> -------------------------------------------------------------------------
>
> Key: HIVE-4523
> URL: https://issues.apache.org/jira/browse/HIVE-4523
> Project: Hive
> Issue Type: Improvement
> Components: UDF
> Affects Versions: 0.7.1
> Reporter: Fred Desing
> Priority: Minor
>
> // hive
> hive> select round(150.000, 2) from temp limit 1;
> 150.0
> hive> select round(150, 2) from temp limit 1;
> 150.0
> // mysql
> mysql> select round(150.000, 2) from DUAL limit 1;
> round(150.000, 2)
> 150.00
> mysql> select round(150, 2) from DUAL limit 1;
> round(150, 2)
> 150
> http://dev.mysql.com/doc/refman/5.1/en/mathematical-functions.html#function_round
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira