Taras Bobrovytsky has posted comments on this change. ( http://gerrit.cloudera.org:8080/8774 )
Change subject: IMPALA-5014: Part 1: Round when casting string to decimal ...................................................................... Patch Set 3: (2 comments) Thanks for the review, Zach! http://gerrit.cloudera.org:8080/#/c/8774/3/be/src/exec/hdfs-scanner-ir.cc File be/src/exec/hdfs-scanner-ir.cc: http://gerrit.cloudera.org:8080/#/c/8774/3/be/src/exec/hdfs-scanner-ir.cc@145 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. http://gerrit.cloudera.org:8080/#/c/8774/3/be/src/util/string-parser.h File be/src/util/string-parser.h: http://gerrit.cloudera.org:8080/#/c/8774/3/be/src/util/string-parser.h@243 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 http://gerrit.cloudera.org:8080/8774 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings 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 <tbobrovyt...@cloudera.com> Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com> Gerrit-Reviewer: Taras Bobrovytsky <tbobrovyt...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Reviewer: Zach Amsden <zams...@cloudera.com> Gerrit-Comment-Date: Fri, 22 Dec 2017 00:14:37 +0000 Gerrit-HasComments: Yes