Wenzhe Zhou has posted comments on this change. ( http://gerrit.cloudera.org:8080/19272 )
Change subject: KUDU-1945 Auto-Incrementing Column, C++ client ...................................................................... Patch Set 20: (7 comments) http://gerrit.cloudera.org:8080/#/c/19272/20/src/kudu/client/client.cc File src/kudu/client/client.cc: http://gerrit.cloudera.org:8080/#/c/19272/20/src/kudu/client/client.cc@1542 PS20, Line 1542: if (name == Schema::GetAutoIncrementingColumnName()) { : data_->status_ = Status::InvalidArgument(Substitute( : "can't add reserved name $0 column", Schema::GetAutoIncrementingColumnName())); : } Not sure if we should return "spec" or null? Where "spec" is released in case of error? http://gerrit.cloudera.org:8080/#/c/19272/20/src/kudu/client/client.cc@1554 PS20, Line 1554: if (name == Schema::GetAutoIncrementingColumnName()) { Not sure if we should disable altering all properties of auto-incrementing column? Java client don't allow user to alter column name, type, immutable, default value, etc. But allow user to alter compression algorithm, block size, encoding, comment. http://gerrit.cloudera.org:8080/#/c/19272/20/src/kudu/client/schema.cc File src/kudu/client/schema.cc: http://gerrit.cloudera.org:8080/#/c/19272/20/src/kudu/client/schema.cc@566 PS20, Line 566: Data() : : key_cols_unique(true) nit: don't need to split as two lines, one extra space after ":" http://gerrit.cloudera.org:8080/#/c/19272/20/src/kudu/client/session-internal.cc File src/kudu/client/session-internal.cc: http://gerrit.cloudera.org:8080/#/c/19272/20/src/kudu/client/session-internal.cc@373 PS20, Line 373: const auto auto_incrementing_col_idx = op.row().schema()->auto_incrementing_col_idx(); : if (auto_incrementing_col_idx != Schema::kColumnNotFound) nit: call op.row().schema()->has_auto_incrementing() instead http://gerrit.cloudera.org:8080/#/c/19272/20/src/kudu/client/session-internal.cc@376 PS20, Line 376: with non-unique primary key nit: Should we change to "table with auto-incrementing column"? http://gerrit.cloudera.org:8080/#/c/19272/20/src/kudu/client/session-internal.cc@376 PS20, Line 376: write operation nit: log the WriteOperation type in the message http://gerrit.cloudera.org:8080/#/c/19272/20/src/kudu/common/schema.h File src/kudu/common/schema.h: http://gerrit.cloudera.org:8080/#/c/19272/20/src/kudu/common/schema.h@1048 PS20, Line 1048: kAutoIncColName nit: it's better to name variable in the same style as other variables in this class -- 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: 20 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: Marton Greber <[email protected]> Gerrit-Reviewer: Wenzhe Zhou <[email protected]> Gerrit-Comment-Date: Fri, 20 Jan 2023 23:59:59 +0000 Gerrit-HasComments: Yes
