Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/18797 )
Change subject: [tool] Add gflag to control the display of hash info when show partition info. ...................................................................... Patch Set 2: (5 comments) http://gerrit.cloudera.org:8080/#/c/18797/2/src/kudu/common/partition-test.cc File src/kudu/common/partition-test.cc: http://gerrit.cloudera.org:8080/#/c/18797/2/src/kudu/common/partition-test.cc@576 PS2, Line 576: EXPECT_EQ("HASH (a) PARTITION 0, HASH (b) PARTITION 0, " : R"(RANGE (a, b, c) PARTITION VALUES < ("a1", "b1", "c1"))", : partition_schema.PartitionDebugString(partitions[0], schema)); nit: is there any specific reason not testing the output without hash partition info here? http://gerrit.cloudera.org:8080/#/c/18797/2/src/kudu/common/partition.h File src/kudu/common/partition.h: http://gerrit.cloudera.org:8080/#/c/18797/2/src/kudu/common/partition.h@390 PS2, Line 390: bool Could you please introduce a enumeration with names that reflect the essence of the change in behavior instead of just boolean parameter, please? It would help with code readability. For example: enum HashPartitionInfo { HIDE = 0, SHOW = 1, }; Then calling this method in C++11 code would be something auto partition_str = partition_schema.PartitionDebugString( partition, schema, HashPartitionInfo::HIDE); auto partition_str = partition_schema.PartitionDebugString( partition, schema, false); http://gerrit.cloudera.org:8080/#/c/18797/2/src/kudu/tools/kudu-admin-test.cc File src/kudu/tools/kudu-admin-test.cc: http://gerrit.cloudera.org:8080/#/c/18797/2/src/kudu/tools/kudu-admin-test.cc@2211 PS2, Line 2211: { Maybe, create a lambda parameterized by the show_hash_partition_info and call it with true/false argument instead of duplicating the code? http://gerrit.cloudera.org:8080/#/c/18797/2/src/kudu/tools/kudu-admin-test.cc@2233 PS2, Line 2233: nit: wrong indent http://gerrit.cloudera.org:8080/#/c/18797/2/src/kudu/tools/kudu-admin-test.cc@2270 PS2, Line 2270: nit: wrong indent -- To view, visit http://gerrit.cloudera.org:8080/18797 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8bba23740a8544ea40360b70e394c31d500f81c1 Gerrit-Change-Number: 18797 Gerrit-PatchSet: 2 Gerrit-Owner: KeDeng <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Fri, 29 Jul 2022 18:17:15 +0000 Gerrit-HasComments: Yes
