Marton Greber has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19272 )

Change subject: KUDU-1945 Auto-Incrementing Column, C++ client
......................................................................


Patch Set 3:

(6 comments)

http://gerrit.cloudera.org:8080/#/c/19272/2/src/kudu/client/client-unittest.cc
File src/kudu/client/client-unittest.cc:

http://gerrit.cloudera.org:8080/#/c/19272/2/src/kudu/client/client-unittest.cc@163
PS2, Line 163:         "SetNonUniqueP
> Have another test setting this to primary key
Done


http://gerrit.cloudera.org:8080/#/c/19272/2/src/kudu/client/scan_token-internal.cc
File src/kudu/client/scan_token-internal.cc:

http://gerrit.cloudera.org:8080/#/c/19272/2/src/kudu/client/scan_token-internal.cc@207
PS2, Line 207: for (const int column_idx : message.projected_column_idx()) {
             :       column_indexes.push_back(column_idx);
             :     }
> If projected_column_idx are not set, all of columns including auto_incremen
Right now I would lean towards including the auto incrementing column as the 
default. Users can then use projection if they don't need the auto incrementing 
column. I added some notes, which describe this default behaviour in 
src/kudu/client/schema.h

In a previous comment I also asked how much 'quality of life' changes do we 
wanna create. (like adding a switches for showing/disabling auto incrementing 
etc.)
This patch is feature complete in a sense, that by using projections users can 
toggle the auto incrementing column. We can add more utility functions in a 
followup patch, if requested.


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() a
I changed the implementation to what you suggested. It really simplifies the 
builder's build function. I appreciate this suggestion!


http://gerrit.cloudera.org:8080/#/c/19272/2/src/kudu/client/schema.h@638
PS2, Line 638: This may be used to specify a
> Same comments as KuduColumnSpec::NonUniquePrimaryKey(), a call to SetNonUni
Done


http://gerrit.cloudera.org:8080/#/c/19272/2/src/kudu/client/schema.h@766
PS2, Line 766: assumption may not hold, so cal
> What's the return value if there is no auto_incrementing_column? -1?
Yes, it's -1.
To make this clear, I updated the return value's description.


http://gerrit.cloudera.org:8080/#/c/19272/2/src/kudu/client/schema.cc
File src/kudu/client/schema.cc:

http://gerrit.cloudera.org:8080/#/c/19272/2/src/kudu/client/schema.cc@757
PS2, Line 757:
> nit: Here and below missing space around the operators "+" and ","
Done



--
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: 3
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: Tue, 06 Dec 2022 17:21:02 +0000
Gerrit-HasComments: Yes

Reply via email to