Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/17643 )
Change subject: [pruning] KUDU-2671: Pruning compatible with custom hash schemas. ...................................................................... Patch Set 6: (4 comments) http://gerrit.cloudera.org:8080/#/c/17643/3/src/kudu/common/partition_pruner-test.cc File src/kudu/common/partition_pruner-test.cc: http://gerrit.cloudera.org:8080/#/c/17643/3/src/kudu/common/partition_pruner-test.cc@1366 PS3, Line 1366: > Bad asserts result in the test being marked as failed, while a CHECK failur Yep, I agree that ASSERT_OK() is a better choice here. AFAIK, the only case where resorting to CHECK_OK() is a good option is if ASSERT_OK() isn't working as expected if the code is run by other than the main test thread. http://gerrit.cloudera.org:8080/#/c/17643/6/src/kudu/common/partition_pruner.h File src/kudu/common/partition_pruner.h: http://gerrit.cloudera.org:8080/#/c/17643/6/src/kudu/common/partition_pruner.h@46 PS6, Line 46: LowerUpperRangeBounds nit: why not just RangeBounds -- could there be any other than lower and upper bounds for a range? http://gerrit.cloudera.org:8080/#/c/17643/6/src/kudu/common/partition_pruner.h@48 PS6, Line 48: std::pair What is semantic significance of using std::pair instead of struct here? Does the first pair's component somehow complements the second and vice versa? http://gerrit.cloudera.org:8080/#/c/17643/6/src/kudu/common/partition_pruner.h@71 PS6, Line 71: size_t num_ranges = 0; : for (const auto& range: partition_key_ranges_) { : num_ranges += range.second.size(); : } : return num_ranges; I see this method is indirectly called in NextPartitionKey() method, and that would result in n^2 complexity while building, scan tokens. Is it possible to compute this once in Init() method and then use the pre-computed result elsewhere? -- To view, visit http://gerrit.cloudera.org:8080/17643 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I05c37495430f61a2c6f6012c72251138aee465b7 Gerrit-Change-Number: 17643 Gerrit-PatchSet: 6 Gerrit-Owner: Mahesh Reddy <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mahesh Reddy <[email protected]> Gerrit-Reviewer: Tidy Bot (241) Gerrit-Comment-Date: Sat, 31 Jul 2021 01:18:04 +0000 Gerrit-HasComments: Yes
