You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Jason Dere (JIRA)" <ji...@apache.org> on 2014/12/01 23:56:12 UTC

[jira] [Updated] (HIVE-6421) abs() should preserve precision/scale of decimal input

     [ https://issues.apache.org/jira/browse/HIVE-6421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Dere updated HIVE-6421:
-----------------------------
       Resolution: Fixed
    Fix Version/s: 0.15.0
           Status: Resolved  (was: Patch Available)

Committed to trunk. Thanks for review Ashutosh

> abs() should preserve precision/scale of decimal input
> ------------------------------------------------------
>
>                 Key: HIVE-6421
>                 URL: https://issues.apache.org/jira/browse/HIVE-6421
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>            Reporter: Jason Dere
>            Assignee: Jason Dere
>             Fix For: 0.15.0
>
>         Attachments: HIVE-6421.1.txt, HIVE-6421.2.patch, HIVE-6421.3.patch
>
>
> {noformat}
> hive> describe dec1;
> OK
> c1                  	decimal(10,2)       	None 
> hive> explain select c1, abs(c1) from dec1;
>  ...
>             Select Operator
>               expressions: c1 (type: decimal(10,2)), abs(c1) (type: decimal(38,18))
> {noformat}
> Given that abs() is a GenericUDF it should be possible for the return type precision/scale to match the input precision/scale.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)