Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/18582 )
Change subject: KUDU-2671 refactor PartitionSchema::CreatePartitions() ...................................................................... Patch Set 5: (4 comments) http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/common/partition.h File src/kudu/common/partition.h: http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/common/partition.h@332 PS5, Line 332: 'ranges_with_hash_schemas > nit: add last underscore so 'ranges_with_hash_schemas_'. Maybe add somethin Done http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/common/partition.cc File src/kudu/common/partition.cc: http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/common/partition.cc@531 PS5, Line 531: hash_schema_} > Should we make a similar change in EncodeRangeBounds for the ranges without Good point. Done. http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/master/catalog_manager.cc File src/kudu/master/catalog_manager.cc: http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/master/catalog_manager.cc@1931 PS5, Line 1931: const auto ranges_with_hash_schemas_size = : partition_schema.ranges_with_hash_schemas().size() > nit: Any reason why this isn't outside of the if condition? I understand th It's not used outside of the condition, so I wanted to keep it only in the scope. C++17 allows for that, so why not? http://gerrit.cloudera.org:8080/#/c/18582/5/src/kudu/master/catalog_manager.cc@2670 PS5, Line 2670: RETURN_NOT_OK(partition_schema.CreatePartitions( : {}, {{ *ops[0].split_row, *ops[1].split_row }}, schema, &partitions)); > How does adding a range with a custom hash schema work now? It's unclear ho It's a good question, but that's out of the scope of this changelist, I guess. That should be addressed by https://gerrit.cloudera.org/#/c/18515/ or other corresponding changelist. A couple of options: (a) add PartitionSchema::FromPB() overload to take a parameter of the AlterTableRequestPB type, and then call PartitionSchema::CreatePartitions(const Schema&, std::vector<Partition>*). (b) add an extra overload for PartitionSchema::CreatePartitions() which takes range and its custom schema as input. -- To view, visit http://gerrit.cloudera.org:8080/18582 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5bac1f8ee349577e2f912530a28776415ed0a5b0 Gerrit-Change-Number: 18582 Gerrit-PatchSet: 5 Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Attila Bukor <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mahesh Reddy <[email protected]> Gerrit-Reviewer: Tidy Bot (241) Gerrit-Comment-Date: Sat, 04 Jun 2022 01:18:12 +0000 Gerrit-HasComments: Yes
