impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zach Amsden (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-4370: Divide and modulo result types for DECIMAL version V2
Date Tue, 14 Feb 2017 01:56:57 GMT
Zach Amsden has posted comments on this change.

Change subject: IMPALA-4370: Divide and modulo result types for DECIMAL version V2
......................................................................


Patch Set 11:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/5952/8/be/src/runtime/decimal-value.inline.h
File be/src/runtime/decimal-value.inline.h:

Line 236:   }
Please fix this comment - "We need to scale x up by the result scale and then do an integer
divide."

The transposition of scale and precision is quite confusing here.


http://gerrit.cloudera.org:8080/#/c/5952/11/be/src/runtime/decimal-value.inline.h
File be/src/runtime/decimal-value.inline.h:

Line 237:   // We need to scale x up by the result precision and then do an integer divide.
Please fix this comment - "We need to scale x up by the result scale and then do an integer
divide."

The transposition of precision and scale is quite confusing here.


Line 238:   // This truncates the result to the output precision.
ditto


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

Line 253:         resultPrecision = p1 - s1 + s2 + resultScale;
Looks correct


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I83e7f7787edfa4b4bddc25945090542a0e90881b
Gerrit-PatchSet: 11
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <marcel@cloudera.com>
Gerrit-Reviewer: Michael Ho <kwho@cloudera.com>
Gerrit-Reviewer: Zach Amsden <zamsden@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message