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 <[email protected]>
Gerrit-Reviewer: Dan Hecht <[email protected]>
Gerrit-Reviewer: Marcel Kornacker <[email protected]>
Gerrit-Reviewer: Michael Ho <[email protected]>
Gerrit-Reviewer: Zach Amsden <[email protected]>
Gerrit-HasComments: Yes

Reply via email to