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 21: (4 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: return spec; : } : : Kud > Refactored a checks, such that I moved all the verification logic into: Kud Yes, the code change avoid this case. http://gerrit.cloudera.org:8080/#/c/19272/20/src/kudu/client/client.cc@1554 PS20, Line 1554: Data::Step s = { AlterTableRequestPB::DROP_COLUMN, > Yepp, as explained above, this checks are also moved into KuduTableAlterer: That's great. 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@376 PS20, Line 376: > My take is the following: As discussed in the meeting, server side will also disable upsert for table with auto-incrementing column. For Kudu server, it check auto-incrementing, not non unique primary key. We may keep error message consistent. http://gerrit.cloudera.org:8080/#/c/19272/21/src/kudu/client/table_alterer-internal.cc File src/kudu/client/table_alterer-internal.cc: http://gerrit.cloudera.org:8080/#/c/19272/21/src/kudu/client/table_alterer-internal.cc@116 PS21, Line 116: !s.spec->data_->auto_incrementing) { : return Status::AlreadyPresent("can't add reserved name", s.spec->data_->name Should we not allow user to add an auto-incrementing column in Alter Table API at all? If a table is created with unique primary key, so no auto-incrementing column is added to the table. User insert some rows. Then user call Alter Table API to add an auto-incrementing column to the table. Can server handle this case? Is the added auto-incrementing column set as key or not? -- 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: 21 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: Mon, 23 Jan 2023 18:56:23 +0000 Gerrit-HasComments: Yes
