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

Rajesh Balamohan commented on HIVE-15511:
-----------------------------------------

Config option would not be needed. Patch does not change current behavior. For 
queries like "CAST(MONTHS_BETWEEN(l_shipdate, l_commitdate) / 12 AS INT)", user 
can add {{false}} as third argument to improve the response time.

> 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
>            Assignee: Rajesh Balamohan
>            Priority: Minor
>         Attachments: HIVE-15511.1.patch, HIVE-15511.2.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)

Reply via email to