Tim Armstrong has posted comments on this change.

Change subject: IMPALA-5722: Fix string to decimal cast
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/7517/1/be/src/util/decimal-util.h
File be/src/util/decimal-util.h:

Line 63:       DCHECK_GE(result * 10, result);
> If T is signed, the compiler is permitted to turn this into a no-op: http:/
The generic integer overflow support wasn't added until gcc5 I believe. Agree 
that this isn't the ideal way to check for overflow though - maybe add a TODO 
indicating that the check is imperfect for this reason.


http://gerrit.cloudera.org:8080/#/c/7517/1/be/src/util/string-parser.h
File be/src/util/string-parser.h:

Line 221:         T divisor = DecimalUtil::GetScaleMultiplier<T>(shift);
> Look at decimal-util.h line 174, where -1 is returned. The function you wer
Thanks, that makes more sense.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1f5eb5b64a6924af2e8eb7f9a50da67015757efe
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Taras Bobrovytsky <[email protected]>
Gerrit-Reviewer: Jim Apple <[email protected]>
Gerrit-Reviewer: Taras Bobrovytsky <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-Reviewer: anujphadke <[email protected]>
Gerrit-HasComments: Yes

Reply via email to