impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Hecht (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-2020: Add rounding for decimal casts
Date Wed, 15 Feb 2017 04:43:28 GMT
Dan Hecht has posted comments on this change.

Change subject: IMPALA-2020: Add rounding for decimal casts

Patch Set 9:

File be/src/exprs/

PS9, Line 303: round
> Otherwise this is a behavior change.  dv.ToInt detects overflow.  to_type(d
Yeah, I got that.  What I'm saying is why not remove the 'round' paramter since we can't use
it anyway?  I originally suggested adding that parameter assuming it would eliminate the need
for the else-clause, but since that's not the case, why keep the  dead (and untested) code?
File be/src/exprs/

Line 1503:      { true, 0, 3, 0 }}},
> due to scaling, we get coverage anyway as 0.45 ends in 5.  I can add it, bu
okay.  i missed that the scale=1 case covers that.
File be/src/runtime/decimal-value.inline.h:

PS9, Line 43: precise
> Well, there aren't enough bits in the floating point multiplier to fully re
sure, fixing in a separate change sounds fine.  If there's no jira for that, can you open
one and note the number in the todo?

PS9, Line 119: DCHECK
> Couldn't do this.  DCHECK_EQ doesn't know how to print int128_t and larger 
ah, okay.
File be/src/runtime/decimal-value.inline.h:

Line 113:   if (divisor == 1) {
what's this for? is it an optimization for scale==0 case?

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I2daf186b4770a022f9cb349d512067a1dd624810
Gerrit-PatchSet: 9
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Zach Amsden <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Michael Ho
Gerrit-Reviewer: Zach Amsden <>
Gerrit-HasComments: Yes

View raw message