You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Yingchun Lai (Code Review)" <ge...@cloudera.org> on 2022/08/11 06:58:07 UTC

[kudu-CR] WIP KUDU-3353 [schema] Add an immutable attribute on column schema

Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Andrew Wong, Todd Lipcon, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/18241

to look at the new patch set (#21).

Change subject: WIP KUDU-3353 [schema] Add an immutable attribute on column schema
......................................................................

WIP KUDU-3353 [schema] Add an immutable attribute on column schema

1. Add a column attribute to define a column as IMMUTABLE, means
   the column cell value can not be updated after been written.
2. Use UPDATE_IGNORE and add UPSERT_IGNORE, for UPDATE and UPSERT
   ops but ignore update-errors on IMMUTABLE columns.
3. Since the column is immutable, we restrict it must be 'NOT NULL'.
   Otherwise, you can't update the NULL value after the initial insertion.
4. It's able to add such a column with a default value. All the old column
   data in the table has the default immutable value, new insertion can
   specify a cell value on the column or not, if not, default value will be
   used.

Change-Id: If80ebca7d3ab14db1591c14201f6d561155526cd
---
M java/kudu-client/src/main/java/org/apache/kudu/ColumnSchema.java
M java/kudu-client/src/main/java/org/apache/kudu/client/KuduTable.java
M java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java
M java/kudu-client/src/main/java/org/apache/kudu/client/ProtobufHelper.java
M java/kudu-client/src/main/java/org/apache/kudu/client/Status.java
A java/kudu-client/src/main/java/org/apache/kudu/client/UpsertIgnore.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduSession.java
M java/kudu-spark/src/main/scala/org/apache/kudu/spark/kudu/DefaultSource.scala
M java/kudu-spark/src/main/scala/org/apache/kudu/spark/kudu/KuduContext.scala
M java/kudu-spark/src/main/scala/org/apache/kudu/spark/kudu/OperationType.scala
M java/kudu-test-utils/src/main/java/org/apache/kudu/test/ClientTestUtil.java
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/schema-internal.h
M src/kudu/client/schema.cc
M src/kudu/client/schema.h
M src/kudu/client/write_op.cc
M src/kudu/client/write_op.h
M src/kudu/common/row_changelist.cc
M src/kudu/common/schema.cc
M src/kudu/common/schema.h
M src/kudu/master/master.proto
25 files changed, 738 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/41/18241/21
-- 
To view, visit http://gerrit.cloudera.org:8080/18241
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If80ebca7d3ab14db1591c14201f6d561155526cd
Gerrit-Change-Number: 18241
Gerrit-PatchSet: 21
Gerrit-Owner: Yingchun Lai <ac...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@g.ucla.edu>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Yingchun Lai <ac...@gmail.com>