Taras Bobrovytsky has posted comments on this change. ( http://gerrit.cloudera.org:8080/9339 )
Change subject: IMPALA-6405: Error when string to decimal cast overflows ...................................................................... Patch Set 2: (2 comments) http://gerrit.cloudera.org:8080/#/c/9339/2/be/src/exprs/decimal-operators-ir.cc File be/src/exprs/decimal-operators-ir.cc: http://gerrit.cloudera.org:8080/#/c/9339/2/be/src/exprs/decimal-operators-ir.cc@584 PS2, Line 584: ctx->AddWarning("String to Decimal cast underflowed"); > I guess this case can only happen with DECIMAL_V2=false? Because of: No, this does not happen only when decimal_v2 is false. (Take a look at the tests that I added). I don't think this would bee too loud and occur too frequently. I doubt that there are many cases where a user wants to convert a string with more digits after the dot than the scale of the decimal. My guess is in most cases when this warning happens, it means something went wrong, so issuing a warning is ok. http://gerrit.cloudera.org:8080/#/c/9339/2/testdata/workloads/functional-query/queries/QueryTest/decimal-exprs.test File testdata/workloads/functional-query/queries/QueryTest/decimal-exprs.test: http://gerrit.cloudera.org:8080/#/c/9339/2/testdata/workloads/functional-query/queries/QueryTest/decimal-exprs.test@459 PS2, Line 459: decimal_v2=0; > nit: existing cases use decimal_v2=false/true. Would be good to be consiste Done -- To view, visit http://gerrit.cloudera.org:8080/9339 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icffccac1c1c2361447ae4b0de9b6c2ec7de071db Gerrit-Change-Number: 9339 Gerrit-PatchSet: 2 Gerrit-Owner: Taras Bobrovytsky <tbobrovyt...@cloudera.com> Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com> Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com> Gerrit-Reviewer: Taras Bobrovytsky <tbobrovyt...@cloudera.com> Gerrit-Reviewer: Zach Amsden <zams...@cloudera.com> Gerrit-Comment-Date: Mon, 05 Mar 2018 22:57:54 +0000 Gerrit-HasComments: Yes