Marton Greber has uploaded this change for review. ( http://gerrit.cloudera.org:8080/19272
Change subject: Auto-Incrementing Column, C++ client part1 ...................................................................... Auto-Incrementing Column, C++ client part1 This patch adds the first part of the cpp client side changes to the auto incrementing column feature. A new KuduColumnSpec called NonUniquePrimaryKey is added. Semantically it behaves similarly like PrimaryKey: - only one column spec can be specified, - if it exists, it must be defined in the first place, - compound keys are defined through a set function. Functionally non-unique primary keys doesn't need to fulfill the uniqueness constraint. An auto incrementing column is added in the background automatically once a non-unique primary key is specified. The non-unique keys and the auto incrementing columns together form the effective primary key. A new bool argument is added to KuduScanner's constructor: include_auto_incrementing. By default, it is true, scan results will contain the auto incrementing column. Setting this variable to false in will add a default projection in the constructor to hide away the auto incrementing column. --------------------------to be removed--------------------------------- This patch will be rebased on top of two other patches. The end git log should look something like: Auto-Incrementing Column, C++ client part1 <this patch's review link> KUDU-1945 Auto-Incrementing Column https://gerrit.cloudera.org/#/c/19097/ KUDU-1945 [client] Add UINT64 support to cpp client https://gerrit.cloudera.org/#/c/19267/ Part2 would be an additional feature to enable schema creation without any primary or non-unique primary keys. First we should add the auto incrementing column. Then the partition columns in KuduTableCreator could be used to make the compound key together with the auto incrementing column. However, this requires KuduTableCreator to modify the schema. As of now neither KuduTableCreator nor KuduTable have the schema as mutable object. I'm going to submit a WIP patch for this soon, and we can discuss this further. ------------------------------------------------------------------------ Change-Id: Ic133e3d44cc56c8351e33d95b523ed7b6b13617b --- M src/kudu/client/client-test.cc M src/kudu/client/client-unittest.cc M src/kudu/client/client.cc M src/kudu/client/client.h M src/kudu/client/scan_configuration.cc M src/kudu/client/scan_configuration.h M src/kudu/client/scanner-internal.cc M src/kudu/client/scanner-internal.h M src/kudu/client/schema-internal.h M src/kudu/client/schema.cc M src/kudu/client/schema.h M src/kudu/client/session-internal.cc M src/kudu/common/partial_row.cc M src/kudu/common/partial_row.h M src/kudu/common/schema-test.cc M src/kudu/common/schema.cc M src/kudu/common/schema.h 17 files changed, 397 insertions(+), 89 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/72/19272/1 -- 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: newchange Gerrit-Change-Id: Ic133e3d44cc56c8351e33d95b523ed7b6b13617b Gerrit-Change-Number: 19272 Gerrit-PatchSet: 1 Gerrit-Owner: Marton Greber <[email protected]>
