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 2: (2 comments) http://gerrit.cloudera.org:8080/#/c/19272/2/src/kudu/client/schema.h File src/kudu/client/schema.h: http://gerrit.cloudera.org:8080/#/c/19272/2/src/kudu/client/schema.h@493 PS2, Line 493: Set the column to be a non-unique primary key of the table. In current implementation, an error will be returned if both PrimaryKey() and NonUniquePrimaryKey() are called. It's better to change the behavior as a call to these two methods override any previous calls to these two methods, like the behaviors of KuduScanner::SetProjectedColumnNames() and KuduScanner::SetProjectedColumnIndexes(). In this way, the column will be key if one of PrimaryKey() and NonUniquePrimaryKey() is called. We could define another variable to distinguish is the key is unique or not. It also simplify the change for KuduSchemaBuilder::Build(). http://gerrit.cloudera.org:8080/#/c/19272/2/src/kudu/client/schema.h@638 PS2, Line 638: Set the non-unique primary key Same comments as KuduColumnSpec::NonUniquePrimaryKey(), a call to SetNonUniquePrimaryKey() or SetPrimaryKey() override a previous call to SetNonUniquePrimaryKey() or SetPrimaryKey() -- 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: 2 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: Sun, 04 Dec 2022 19:02:09 +0000 Gerrit-HasComments: Yes
