hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajesh Balamohan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-15511) Provide an option in months_between UDF to disable rounding-off
Date Mon, 26 Dec 2016 05:03:58 GMT

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

Rajesh Balamohan updated HIVE-15511:
------------------------------------
    Attachment: HIVE-15511.1.patch

Sample query: select distinct CAST(MONTHS_BETWEEN(l_shipdate, l_commitdate) / 12 AS INT) from
lineitem_date limit 10;

l_shipdate, l_commitdate are date columns in the table.  This was run on a medium scale cluster
with 1 TB tpch dataset (HIVE-15501 is included which enables vectorization for months_between
udf).

||Iteration||with rounding off (default))||Without round off||
|Run 1|92.60 s|61.22 s|
|Run 2|87.39 s|59.45 s|
|Run 3|87.90 s|59.22 s|


> Provide an option in months_between UDF to disable rounding-off
> ---------------------------------------------------------------
>
>                 Key: HIVE-15511
>                 URL: https://issues.apache.org/jira/browse/HIVE-15511
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Rajesh Balamohan
>            Priority: Minor
>         Attachments: HIVE-15511.1.patch
>
>
> Rounding off was added in {{GenericUDFMonthsBetween}} so that it can be compatible with
systems like oracle. However, there are places where rounding off is not needed. 
> E.g "CAST(MONTHS_BETWEEN(l_shipdate, l_commitdate) / 12 AS INT)" may not need rounding
off via BigDecimal which is compute intensive.



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

Mime
View raw message