Hello Kudu Jenkins,

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


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

Change subject: [WIP] [No-Review] KUDU-861 Support changing default, storage 

[WIP] [No-Review] KUDU-861 Support changing default, storage attributes

This patch adds support for adding, changing, or removing column defaults.
It adds support for these operations to the wire protocol, master, and
C++ client, and folds column renaming into the same PB message as alter
column more generally. It is not backwards-compatible.

Some thorny things remain. The column's type isn't checked (or necessarily
known) client-side, the server just receives some bytes for the default
value, and, since the client stores 64-bit integer values as defaults for
all integer-backed types, the value might be too large. We'll be ok, we
just truncate. This is actually how it works for regular add column and
create table, but there the type of the column is known, so the truncation
is backed up by column type-checking, and it can't be the case that there's
too few bytes.

Possible solutions:
1. Leave it as it is. It works and shouldn't break, but users may have a
weird experience like setting an integer column to have default value "aaaa",
getting no error, and ending up with a default of 24929 = 0x61616161.
2. Put a discriminated union type structure in the PB message so some type
checking can be done, i.e. INT vs FLOAT not INT32 vs. INT16.
3. Change KuduValue to require more type information + 2 above.

Changing type and nullability of a column is still unsupported (doing so
is much more complicated than this).

Change-Id: I457d99ba2188ef6e439df47c0d94f2dc1a62ea6c
M java/kudu-client/src/main/java/org/apache/kudu/client/AlterTableOptions.java
M java/kudu-client/src/main/java/org/apache/kudu/client/ProtobufHelper.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduTable.java
M src/kudu/client/client-test.cc
M src/kudu/client/schema.cc
M src/kudu/client/schema.h
M src/kudu/client/table_alterer-internal.cc
M src/kudu/client/value-internal.h
M src/kudu/client/value.cc
M src/kudu/common/schema.cc
M src/kudu/common/schema.h
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master.proto
14 files changed, 712 insertions(+), 38 deletions(-)

  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/10/4310/4
To view, visit http://gerrit.cloudera.org:8080/4310
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I457d99ba2188ef6e439df47c0d94f2dc1a62ea6c
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Will Berkeley <wdberke...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: Will Berkeley <wdberke...@gmail.com>

Reply via email to