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-2020: Add rounding when casting from decimal to int
Date Fri, 10 Feb 2017 01:55:37 GMT
Zach Amsden has posted comments on this change.

Change subject: IMPALA-2020: Add rounding when casting from decimal to int
......................................................................


Patch Set 3:

(2 comments)

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

Line 84:   auto divisor = DecimalUtil::GetScaleMultiplier<T>(scale);
> doesn't round, of course.
Done.  Turns out you can do this without branching.  I think right now I have a branch but
I can get rid of it.


Line 88:     return RESULT_T::null();
> how about sticking with the convention used in the rest of this file where 
That's a good idea.  Should I still be returning raw UDF types (in which case I need to return
the null version of the type).


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2daf186b4770a022f9cb349d512067a1dd624810
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Zach Amsden <zamsden@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Zach Amsden <zamsden@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message