You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Will Berkeley (Code Review)" <ge...@cloudera.org> on 2016/11/30 15:56:04 UTC

[kudu-CR] [java] KUDU-1746/KUDU-1747 Improve addColumn API

Hello Dimitris Tsirogiannis, Kudu Jenkins,

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

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

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

Change subject: [java] KUDU-1746/KUDU-1747 Improve addColumn API
......................................................................

[java] KUDU-1746/KUDU-1747 Improve addColumn API

Previously, the java client permitted adding

- a non-null column with a default
- a nullable column with no default

but did not allow adding

- a nullable column with a default

even though it should be allowed. This patch adds that capability
by adding a 'defaultVal' argument to an overloaded
AlterTableOptions.addNullableColumn.

It also adds a more general method to add a column based on a
ColumnSchema. This more advanced API should be easier to maintain
as more column options are added to Kudu. The other addColumn
variants are reimplemented in terms of this one.

Previous methods remain for backward-compatibility.

Additionally, a test was added to check behavior of the three
addColumn possibilities (which tests the new addColumn(ColumnSchema)
since they are implemented using it).

Finally, I fixed a checkstyle warning in AsyncKuduScanner.

Change-Id: I0706839a3dbe21532afd524e2d3fc020d31a9973
---
M java/kudu-client/src/main/java/org/apache/kudu/client/AlterTableOptions.java
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduScanner.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestAlterTable.java
3 files changed, 86 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/32/5132/2
-- 
To view, visit http://gerrit.cloudera.org:8080/5132
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0706839a3dbe21532afd524e2d3fc020d31a9973
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins