Yifan Zhang has posted comments on this change. ( http://gerrit.cloudera.org:8080/15784 )
Change subject: [www] convert human-readable int to int when compare numeric strings ...................................................................... Patch Set 2: (3 comments) http://gerrit.cloudera.org:8080/#/c/15784/1/www/kudu.js File www/kudu.js: http://gerrit.cloudera.org:8080/#/c/15784/1/www/kudu.js@56 PS1, Line 56: val = parseFloat(humanReadableNum); > Don't we need to substring this like we do above? If value < 1000 or value > 1E15, the numeric string doesn't end up with a special charactor that we need to exclude. http://gerrit.cloudera.org:8080/#/c/15784/1/www/kudu.js@60 PS1, Line 60: if (end == 'k') { > Nit: consider a switch like in toNumBytes()? If use switch, there would be too many cases, like: case '0': case '1': ... case '9': break; http://gerrit.cloudera.org:8080/#/c/15784/1/www/kudu.js@68 PS1, Line 68: } else if (isNaN(end)) { > Nit: could you comment why we are stopping here, rather than going above wi Here I borrowed from HumanReadableInt::ToInt64, it reverses HumanReadableInt::ToString, which we used for webUI. In HumanReadableInt::ToString, number bigger than 1E15 use scientific notation. -- To view, visit http://gerrit.cloudera.org:8080/15784 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic7e832beb0dfdf5c2162bf0e9faeb3d0d0d737cd Gerrit-Change-Number: 15784 Gerrit-PatchSet: 2 Gerrit-Owner: Yifan Zhang <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Bankim Bhavsar <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Yifan Zhang <[email protected]> Gerrit-Comment-Date: Thu, 23 Apr 2020 07:30:28 +0000 Gerrit-HasComments: Yes
