Hello Kudu Jenkins,

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

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

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

Change subject: [WIP] KUDU-861 Support changing default, storage attributes
......................................................................

[WIP] 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).

Java client support is upcoming.

Change-Id: I457d99ba2188ef6e439df47c0d94f2dc1a62ea6c
---
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
11 files changed, 476 insertions(+), 47 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/10/4310/3
-- 
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: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Will Berkeley <wdberke...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins

Reply via email to