impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Hecht (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-4939, IMPALA-4940: Decimal V2 multiplication
Date Fri, 29 Sep 2017 23:23:02 GMT
Dan Hecht has posted comments on this change. ( http://gerrit.cloudera.org:8080/7438 )

Change subject: IMPALA-4939, IMPALA-4940: Decimal V2 multiplication
......................................................................


Patch Set 6:

(7 comments)

mostly just some questions.

http://gerrit.cloudera.org:8080/#/c/7438/6//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/7438/6//COMMIT_MSG@67
PS6, Line 67:   after:  126.17s
is it always the case that this regression is in cases that would have (incorrectly) returned
null before this change?


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

http://gerrit.cloudera.org:8080/#/c/7438/6/be/src/runtime/decimal-value.inline.h@a253
PS6, Line 253: 
great to see that go away


http://gerrit.cloudera.org:8080/#/c/7438/6/be/src/runtime/decimal-value.inline.h@245
PS6, Line 245: overflow
instead of saying "we will overflow", I think "we indicate overflow" or "return overflow"
or something like that. I was trying to figure out where the overflow occurs until I continued
reading.


http://gerrit.cloudera.org:8080/#/c/7438/6/be/src/runtime/decimal-value.inline.h@244
PS6, Line 244: If delta scale is 0, we need to do a more precise check if converting to 256
bits
             :       // is necessary
I don't understand that comment, given that line 240-241 says the first check was conservative.


http://gerrit.cloudera.org:8080/#/c/7438/6/be/src/runtime/decimal-value.inline.h@273
PS6, Line 273:       // with a delta_scale 39 does not fit into int128.
so normally the (38,38) * (38,38) case would be handled in the needs_int256 case, is that
right?  is this case just when the values are so small that they turn into 0?


http://gerrit.cloudera.org:8080/#/c/7438/6/be/src/runtime/decimal-value.inline.h@284
PS6, Line 284: 
nit: let's eliminate this blank line (and maybe others. this function already barely fits
on one screen which is important for readability.


http://gerrit.cloudera.org:8080/#/c/7438/6/be/src/util/bit-util.h
File be/src/util/bit-util.h:

http://gerrit.cloudera.org:8080/#/c/7438/6/be/src/util/bit-util.h@292
PS6, Line 292:     __int128 shifted = v >> 64;
             :     if (shifted > 0) {
given that 'v' is unsigned, won't the shift be unsigned, meaning 'shifted' will always get
zeros in the top 64, meaning shifted is always >= 0?  oh, so is this really just checking
"shifted != 0"?  If so, that seems clearer, especially since the else-clause only makes sense
for 0, not for negative.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I37ad6232d7953bd75c18dc86e665b2b501a1ebe1
Gerrit-Change-Number: 7438
Gerrit-PatchSet: 6
Gerrit-Owner: Taras Bobrovytsky <tbobrovytsky@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Jim Apple <jbapple-impala@apache.org>
Gerrit-Reviewer: Michael Ho <kwho@cloudera.com>
Gerrit-Reviewer: Taras Bobrovytsky <tbobrovytsky@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-Reviewer: Zach Amsden <zamsden@cloudera.com>
Gerrit-Comment-Date: Fri, 29 Sep 2017 23:23:02 +0000
Gerrit-HasComments: Yes

Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message