impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taras Bobrovytsky (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5014: Part 1: Round when casting string to decimal
Date Fri, 22 Dec 2017 00:14:37 GMT
Taras Bobrovytsky has posted comments on this change. (

Change subject: IMPALA-5014: Part 1: Round when casting string to decimal

Patch Set 3:


Thanks for the review, Zach!
File be/src/exec/
PS3, Line 145:   auto ret = StringToDecimal4(s, len, type_precision, type_scale, false, result);
> Will we ever want to implement rounding in the scanner?
The plan is to not implement rounding in the scanner because it should never be necessary.
We do not expect decimals in text files to have more digits after the dot than the scale of
the decimal data type. If this is detected (which is an underflow), the scanner errors out.
File be/src/util/string-parser.h:
PS3, Line 243:         // There are a maximum number of digits to the left of the dot. We
round by
> I finally understand this comment.
Nice :)

To view, visit
To unsubscribe, visit

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Icd8b92727fb384e6ff2d145e4aab7ae5d27db26d
Gerrit-Change-Number: 8774
Gerrit-PatchSet: 3
Gerrit-Owner: Taras Bobrovytsky <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Taras Bobrovytsky <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-Reviewer: Zach Amsden <>
Gerrit-Comment-Date: Fri, 22 Dec 2017 00:14:37 +0000
Gerrit-HasComments: Yes

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