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