Wenzhe Zhou has posted comments on this change. ( http://gerrit.cloudera.org:8080/19272 )
Change subject: Auto-Incrementing Column, C++ client part1 ...................................................................... Patch Set 1: (2 comments) http://gerrit.cloudera.org:8080/#/c/19272/1/src/kudu/client/scan_configuration.cc File src/kudu/client/scan_configuration.cc: http://gerrit.cloudera.org:8080/#/c/19272/1/src/kudu/client/scan_configuration.cc@66 PS1, Line 66: if (table->schema().schema_->has_auto_incrementing() && !include_auto_incrementing) { : auto ids = table->schema().schema_->column_ids(); : vector<int> projection_indexes; : for (auto id : ids) { : int idx = table->schema().schema_->find_column_by_id(id); : if (idx == table->schema().schema_->auto_incrementing_col_idx()) { : continue; : } : projection_indexes.push_back(idx); : } : #pragma GCC diagnostic push : #pragma GCC diagnostic ignored "-Wunused-result" : this->SetProjectedColumnIndexes(projection_indexes); : #pragma GCC diagnostic pop : } : } nit: indent http://gerrit.cloudera.org:8080/#/c/19272/1/src/kudu/client/schema.cc File src/kudu/client/schema.cc: http://gerrit.cloudera.org:8080/#/c/19272/1/src/kudu/client/schema.cc@582 PS1, Line 582: std::optional<vector<string>> non_unique_key_col_names; We don't need two vectors if we combine SetPrimaryKey() and SetNonUniquePrimaryKey(). A boolean variable is_non_unique can tell if the primary key is unique or not. This will simplify KuduSchemaBuilder::Build(). -- To view, visit http://gerrit.cloudera.org:8080/19272 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic133e3d44cc56c8351e33d95b523ed7b6b13617b Gerrit-Change-Number: 19272 Gerrit-PatchSet: 1 Gerrit-Owner: Marton Greber <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Wenzhe Zhou <[email protected]> Gerrit-Comment-Date: Fri, 25 Nov 2022 08:12:04 +0000 Gerrit-HasComments: Yes
