Abhishek Chennaka has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/20061 )

Change subject: [server] KUDU-1945 Auto_incrementing column Upsert support
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/20061/1/src/kudu/common/row_operations.cc
File src/kudu/common/row_operations.cc:

http://gerrit.cloudera.org:8080/#/c/20061/1/src/kudu/common/row_operations.cc@478
PS1, Line 478: op->type == RowOperationsPB_Type_UPSERT ||
             :               op->type == RowOperationsPB_Type_UPSERT_IGNORE
> RowOperationsPB_Type_UPSERT means RowOperationsPB_Type_INSERT or RowOperati
At this stage Upsert is still treated as a separate op. Later down the write 
process this upsert is changed into update or insert depending on the data 
being written.
https://github.com/apache/kudu/blob/master/src/kudu/tablet/tablet.cc#L848


http://gerrit.cloudera.org:8080/#/c/20061/1/src/kudu/common/row_operations.cc@489
PS1, Line 489:               if (counter < 0) {
> warning: The left operand of '<' is a garbage value [clang-analyzer-core.Un
Done


http://gerrit.cloudera.org:8080/#/c/20061/1/src/kudu/common/row_operations.cc@491
PS1, Line 491: "column value");
> nit: alignment
Done


http://gerrit.cloudera.org:8080/#/c/20061/1/src/kudu/common/row_operations.cc@495
PS1, Line 495:               // Check if the provided counter value is less 
than what is in memory
             :               // and update the counter in memory.
> This auto-incrementing counter is set by the user at client?
For the upsert operation we need the user to present the auto-incrementing 
column value.
Smaller value is not ignored by the server but it doesn't update the in-memory 
counter on the server side. As long as the row is not present, the user 
provided row is written.



--
To view, visit http://gerrit.cloudera.org:8080/20061
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib5cc4d80f77c165452572948f68c76fc70394d47
Gerrit-Change-Number: 20061
Gerrit-PatchSet: 1
Gerrit-Owner: Abhishek Chennaka <[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: Tidy Bot (241)
Gerrit-Reviewer: Yuqi Du <[email protected]>
Gerrit-Comment-Date: Fri, 16 Jun 2023 03:55:58 +0000
Gerrit-HasComments: Yes

Reply via email to