impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Hecht (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-4939, IMPALA-4939: Decimal V2 multiplication
Date Sat, 15 Jul 2017 01:07:14 GMT
Dan Hecht has posted comments on this change.

Change subject: IMPALA-4939, IMPALA-4939: Decimal V2 multiplication
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7438/1/fe/src/main/java/org/apache/impala/analysis/TypesUtil.java
File fe/src/main/java/org/apache/impala/analysis/TypesUtil.java:

PS1, Line 261:        if (resultPrecision > 38) {
             :           int minScale = Math.min(resultScale, ScalarType.MIN_ADJUSTED_SCALE);
             :           // How low would the scale need to be in the ideal case, in order
to be able to
             :           // store all the digits to the LEFT of the dot. This number may be
negative.
             :           int idealScale = resultScale - (resultPrecision - ScalarType.MAX_PRECISION);
             :           resultScale = Math.max(idealScale, minScale);
             :           resultPrecision = 38;
             :         }
doesn't the call to ScalarType.createAdjustedDecimalType() on line 277 do that?


-- 
To view, visit http://gerrit.cloudera.org:8080/7438
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I37ad6232d7953bd75c18dc86e665b2b501a1ebe1
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Taras Bobrovytsky <tbobrovytsky@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Michael Ho <kwho@cloudera.com>
Gerrit-Reviewer: Zach Amsden <zamsden@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message