impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-2890: Support ALTER TABLE statements for Kudu tables
Date Tue, 22 Nov 2016 18:36:55 GMT
Alex Behm has posted comments on this change.

Change subject: IMPALA-2890: Support ALTER TABLE statements for Kudu tables
......................................................................


Patch Set 4:

(9 comments)

Last round, we're pretty much done.

http://gerrit.cloudera.org:8080/#/c/5136/4/common/thrift/JniCatalog.thrift
File common/thrift/JniCatalog.thrift:

Line 200:   // If true, an error is raised if an error occurs while adding/dropping a range
If false, errors while adding/dropping a range partition are ignored.


Line 202:   2: required bool throw_on_error
ignore_errors?

(throw_on_error is a little weird because that seems to be the conventional behavior)


http://gerrit.cloudera.org:8080/#/c/5136/4/fe/src/main/java/org/apache/impala/analysis/AlterTableAddDropRangePartitionStmt.java
File fe/src/main/java/org/apache/impala/analysis/AlterTableAddDropRangePartitionStmt.java:

Line 33:   private final boolean throwOnError_;
ignoreErrors_?


Line 91:     AlterTableStmt.analyzeAddDropRangePartition(rangePartitionSpec_, (KuduTable)
table,
move analyzeAddDropRangePartition() inside this class, might even just inline it here


http://gerrit.cloudera.org:8080/#/c/5136/2/fe/src/main/java/org/apache/impala/analysis/AlterTableAddReplaceColsStmt.java
File fe/src/main/java/org/apache/impala/analysis/AlterTableAddReplaceColsStmt.java:

Line 123:         if (c.hasEncoding() || c.hasCompression() || c.hasBlockSize()) {
> Unfortunately we can't do that in this case. There is no Kudu API call that
Makes sense. Do you know if there's a Kudu JIRA? We should file an Impala one to track making
Impala's behavior regarding handling of these options consistent.


http://gerrit.cloudera.org:8080/#/c/5136/4/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
File fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java:

Line 511:   private boolean altersKuduTable(TAlterTableType type) {
brief comment, something like:

Returns true if the given alteration type changes the underlying table stored in Kudu in addition
to the HMS table.


Line 556:     if (setResultSet) {
dead code block (no more alteration types that produce result sets)


http://gerrit.cloudera.org:8080/#/c/5136/4/testdata/workloads/functional-query/queries/QueryTest/kudu_alter.test
File testdata/workloads/functional-query/queries/QueryTest/kudu_alter.test:

Line 136: select count(*) from tbl_to_alter
let's also add a count(col) and two where-clause predicates, one that can be pushed to Kudu
and one that must be evaluated by Impala to make sure that works on empty tables


Line 184: # Insert a row that has nulls on non-nullable columns
non-nullable columns with default values


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I04bc87e04e05da5cc03edec79d13cedfd2012896
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message