You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Xuefu Zhang (JIRA)" <ji...@apache.org> on 2013/10/23 18:03:42 UTC

[jira] [Commented] (HIVE-4523) round() function with specified decimal places not consistent with mysql

    [ https://issues.apache.org/jira/browse/HIVE-4523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13802978#comment-13802978 ] 

Xuefu Zhang commented on HIVE-4523:
-----------------------------------

The problem (most of it) stated here will be addressed in decimal precision/scale initiative.

> 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
>            Assignee: Xuefu Zhang
>            Priority: Minor
>         Attachments: HIVE-4523.patch
>
>
> // 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 was sent by Atlassian JIRA
(v6.1#6144)