hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt McCline (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HIVE-16311) Improve the performance for FastHiveDecimalImpl.fastDivide
Date Thu, 06 Apr 2017 12:48:41 GMT

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

Matt McCline edited comment on HIVE-16311 at 4/6/17 12:48 PM:
--------------------------------------------------------------

Fundamental to the OldHiveDecimal and new HiveDecimal is the idea of a floating scale during
from various calculations (and without any trailing fractional zeroes) and the use of enforcePrecisionScale
afterwards.  So, trying to "remember" the original number of trailing zeroes is not going
to work and not part of the current design.  (See HiveDecimal's header comments).


was (Author: mmccline):
Fundamental to the OldHiveDecimal and new HiveDecimal is the idea of a floating during from
various calculations and use of enforcePrecisionScale afterwards.  So, trying to "remember"
the original number of trailing zeroes is not going to work.  (See HiveDecimal's header comments).

> Improve the performance for FastHiveDecimalImpl.fastDivide
> ----------------------------------------------------------
>
>                 Key: HIVE-16311
>                 URL: https://issues.apache.org/jira/browse/HIVE-16311
>             Project: Hive
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Colin Ma
>            Assignee: Colin Ma
>             Fix For: 3.0.0
>
>         Attachments: HIVE-16311.001.patch, HIVE-16311.002.patch, HIVE-16311.003.patch,
HIVE-16311.004.patch, HIVE-16311.005.patch, HIVE-16311.withTrailingZero.patch
>
>
> FastHiveDecimalImpl.fastDivide is poor performance when evaluate the expression as 12345.67/123.45
> There are 2 points can be improved:
> 1. Don't always use HiveDecimal.MAX_SCALE as scale when do the BigDecimal.divide.
> 2. Get the precision for BigInteger in a fast way if possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message