Hao Hao has posted comments on this change. ( http://gerrit.cloudera.org:8080/8041 )
Change subject: KUDU-2055 [part 2]: Add util to construct sorted disjoint interval list ...................................................................... Patch Set 8: (6 comments) http://gerrit.cloudera.org:8080/#/c/8041/7/src/kudu/util/sorted_disjoint_interval_list-test.cc File src/kudu/util/sorted_disjoint_interval_list-test.cc: http://gerrit.cloudera.org:8080/#/c/8041/7/src/kudu/util/sorted_disjoint_interval_list-test.cc@45 PS7, Line 45: an > nit: "an" here and below Done http://gerrit.cloudera.org:8080/#/c/8041/7/src/kudu/util/sorted_disjoint_interval_list-test.cc@57 PS7, Line 57: an interval list with adjacent rang > nit: Since the input is unsorted, at first glance, it wasn't clear to me ho Done http://gerrit.cloudera.org:8080/#/c/8041/7/src/kudu/util/sorted_disjoint_interval_list.h File src/kudu/util/sorted_disjoint_interval_list.h: http://gerrit.cloudera.org:8080/#/c/8041/7/src/kudu/util/sorted_disjoint_interval_list.h@43 PS7, Line 43: [------2-------) [-----1-----) : // [--3--) [---5--) [----4----) : // : // The output sorted disjoint interval list: : // : // [----------1----------) [-----2-----) > [---) ? Done http://gerrit.cloudera.org:8080/#/c/8041/7/src/kudu/util/sorted_disjoint_interval_list.h@81 PS7, Line 81: // some intervals, 'head' and 'tail' will not be adjacent. If so, move 'tail' : // to the next 'head' to make sure we do not include any of the previously-coalesced : // intervals. > nit: maybe move this comment just above the "++head;" and reword it to desc Done http://gerrit.cloudera.org:8080/#/c/8041/7/src/kudu/util/sorted_disjoint_interval_list.h@85 PS7, Line 85: if (hea > nit: maybe pull this into the while loop condition? eg: Done http://gerrit.cloudera.org:8080/#/c/8041/6/src/kudu/util/sorted_disjoint_interval_list.h File src/kudu/util/sorted_disjoint_interval_list.h: http://gerrit.cloudera.org:8080/#/c/8041/6/src/kudu/util/sorted_disjoint_interval_list.h@95 PS6, Line 95: > Is this if check necessary? I would think vector::erase would check if it' Will remove the check. Right, I think vector::erase would not truncate if 'head == tail'. -- To view, visit http://gerrit.cloudera.org:8080/8041 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I61a813c047be4882f246eaf404598e7e18fcac87 Gerrit-Change-Number: 8041 Gerrit-PatchSet: 8 Gerrit-Owner: Hao Hao <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Hao Hao <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Comment-Date: Thu, 28 Sep 2017 04:30:45 +0000 Gerrit-HasComments: Yes
