[
https://issues.apache.org/jira/browse/HIVE-22315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16949766#comment-16949766
]
Gopal Vijayaraghavan commented on HIVE-22315:
---------------------------------------------
{code}
+ public long roundingDivision(long divident, long divisor, long valueHalf) {
+ return ((divident > 0) ^ (divisor > 0)) ?
+ (-Math.abs(divident) - Math.abs(valueHalf) + 1) / Math.abs(divisor) :
+ (Math.abs(divident) + Math.abs(valueHalf) - 1) / Math.abs(divisor);
+ }
{code}
needs some documentation, I know I'm going to forget this by next week.
> Support Decimal64 column division with decimal64 scalar
> -------------------------------------------------------
>
> Key: HIVE-22315
> URL: https://issues.apache.org/jira/browse/HIVE-22315
> Project: Hive
> Issue Type: Bug
> Reporter: Ramesh Kumar Thangarajan
> Assignee: Ramesh Kumar Thangarajan
> Priority: Major
> Attachments: HIVE-22315.1.patch, HIVE-22315.2.patch
>
>
> Currently division operation is not supported for Decimal64 column. This Jira
> will take care of supporting decimal64 column division with a decimal64
> scalar.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)