impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-3725 Support Kudu UPSERT in Impala
Date Fri, 21 Oct 2016 00:21:36 GMT
Alex Behm has posted comments on this change.

Change subject: IMPALA-3725 Support Kudu UPSERT in Impala

Patch Set 9:

File fe/src/main/java/org/apache/impala/analysis/

Line 121:   // If this is an INSERT, will contain all columns of the target table, with NullLiterals
... will contain one Expr for all non-partition columns of the target table ...

Line 124:   // If this is an UPSERT, will contain only mentioned columns and referencedColumns_
will contain one Expr per mentioned column

Line 128:   // Position mapping of exprs in resultExprs_ to columns in the target table -
As discussed, please clarify the "if (value == NULL)" part in the BE kudu-table-sink by adding
DCHECKs and comments.

Line 131:   private final List<Integer> referencedColumns_ = Lists.newArrayList();

I know they are called differently in ModifyStmts, but those are kind of a misnomer, imo.
"Referenced" columns isn't really accurate because we are not necessarily referencing them
e.g. if the column permutation list is empty.

Line 664:     for (int col = 0; col < columns.size(); col++) {

Line 670:           if (isUpsert_) {
single line

Line 754:     if (isUpsert_) {
easier to add a Preconditions.checkState(isUpsert_ || referencedColumns_.isEmpty());
File testdata/workloads/functional-query/queries/QueryTest/kudu_crud.test:

Line 306: upsert into table tdata (valb, name, id)
> I assume that you're talking about how the query statement is optional for 
Ahh, thanks for clarifying!
File testdata/workloads/functional-query/queries/QueryTest/kudu_crud.test:

Line 307: select false as valb, 'he' as name, id from tdata where id < 2
let's also add an upsert test to see what happens when a PK column is NULL

I suppose we'll get something in ----ERROR?

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I8df5cea36b642e267f85ff6b163f3dd96b8386e9
Gerrit-PatchSet: 9
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Dimitris Tsirogiannis <>
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Thomas Tauber-Marshall <>
Gerrit-HasComments: Yes

View raw message