Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/8830 )
Change subject: KUDU-721: Support for Decimal type, Part 1 (Server, C++ Client) ...................................................................... Patch Set 20: (4 comments) http://gerrit.cloudera.org:8080/#/c/8830/20/src/kudu/common/partial_row-test.cc File src/kudu/common/partial_row-test.cc: http://gerrit.cloudera.org:8080/#/c/8830/20/src/kudu/common/partial_row-test.cc@227 PS20, Line 227: EXPECT_EQ("Invalid argument: value 1000000 out of range for decimal column 'decimal_val'", This error message may be clearer if it printed the scaled value instead of the unscaled value (10000.00 vs 1000000). http://gerrit.cloudera.org:8080/#/c/8830/20/src/kudu/util/decimal_util.h File src/kudu/util/decimal_util.h: http://gerrit.cloudera.org:8080/#/c/8830/20/src/kudu/util/decimal_util.h@63 PS20, Line 63: std::string DecimalToString(int128_t value, int8_t scale = kDefaultDecimalScale); Is having a default scale a benefit here? I'd expect that if the scale is unknown the caller should use int128 stringification instead. http://gerrit.cloudera.org:8080/#/c/8830/20/src/kudu/util/decimal_util.cc File src/kudu/util/decimal_util.cc: http://gerrit.cloudera.org:8080/#/c/8830/20/src/kudu/util/decimal_util.cc@28 PS20, Line 28: int128_t MaxUnscaledDecimal(int8_t precision) { Needs test http://gerrit.cloudera.org:8080/#/c/8830/20/src/kudu/util/decimal_util.cc@32 PS20, Line 32: while (precision) { I think a for loop would be more idiomatic here. for (; precision > 0; precision--) -- To view, visit http://gerrit.cloudera.org:8080/8830 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3b06142f43c66973f36376bd2c88ca6f8d9f7632 Gerrit-Change-Number: 8830 Gerrit-PatchSet: 20 Gerrit-Owner: Grant Henke <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Comment-Date: Tue, 30 Jan 2018 22:34:57 +0000 Gerrit-HasComments: Yes
