Tim Armstrong has posted comments on this change. ( http://gerrit.cloudera.org:8080/8329 )
Change subject: IMPALA-4964: Fix Decimal modulo overflow ...................................................................... Patch Set 2: (2 comments) Looks good, just a couple of things that could be clarified. http://gerrit.cloudera.org:8080/#/c/8329/1/be/src/exprs/expr-test.cc File be/src/exprs/expr-test.cc: http://gerrit.cloudera.org:8080/#/c/8329/1/be/src/exprs/expr-test.cc@2286 PS1, Line 2286: // Test modulo operator It would be helpful to comment that (-x) % y == -(x % y) to make it easier to understand the results (I was initially confused about how negative modulo should be handled). (I found this explanation helpful: https://stackoverflow.com/a/1907723) I find negative numbers on the RHS of the modulo even more confusing so it might help to have a similar clarification. http://gerrit.cloudera.org:8080/#/c/8329/2/be/src/runtime/decimal-value.inline.h File be/src/runtime/decimal-value.inline.h: http://gerrit.cloudera.org:8080/#/c/8329/2/be/src/runtime/decimal-value.inline.h@505 PS2, Line 505: // inputs to int256_t. Maybe briefly mention that we want to avoid int256_t is very slow - it's obvious to us now but might help a future reader of the code. -- To view, visit http://gerrit.cloudera.org:8080/8329 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5420201d4440d421e33e443df005cdcc16b8a6cd Gerrit-Change-Number: 8329 Gerrit-PatchSet: 2 Gerrit-Owner: Taras Bobrovytsky <[email protected]> Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Taras Bobrovytsky <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Reviewer: Zach Amsden <[email protected]> Gerrit-Reviewer: anujphadke <[email protected]> Gerrit-Comment-Date: Tue, 24 Oct 2017 00:13:21 +0000 Gerrit-HasComments: Yes
