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

Chinna Rao Lalam updated HIVE-14582:
------------------------------------
    Attachment: HIVE-14582.1.patch

Hi [~ashutoshc], Please take a look at patch.

Now trunc() will accept date or number type arguments and it will behave as 
below

trunc(date, fmt) / trunc(N,D) - Returns 

If input is date returns date with the time portion of the day truncated to the 
unit specified by the format model fmt. 
If you omit fmt, then date is truncated to "the nearest day. It now only 
supports 'MONTH'/'MON'/'MM' and 'YEAR'/'YYYY'/'YY' as format.

If input is a number group returns N truncated to D decimal places. If D is 
omitted, then N is truncated to 0 places.
D can be negative to truncate (make zero) D digits left of the decimal point.

> Add trunc(numeric) udf
> ----------------------
>
>                 Key: HIVE-14582
>                 URL: https://issues.apache.org/jira/browse/HIVE-14582
>             Project: Hive
>          Issue Type: Sub-task
>          Components: SQL
>            Reporter: Ashutosh Chauhan
>            Assignee: Chinna Rao Lalam
>         Attachments: HIVE-14582.1.patch, HIVE-14582.patch
>
>
> https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions200.htm



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

Reply via email to