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-2521: Add clustered hint to insert statements
Date Thu, 20 Oct 2016 05:53:07 GMT
Alex Behm has posted comments on this change.

Change subject: IMPALA-2521: Add clustered hint to insert statements

Patch Set 5:

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

Line 132:   private ArrayList<Expr> kuduKeyExprs_ = Lists.newArrayList();
how about primaryKeyExprs_?

Line 517:    * expressions. Result exprs for key columns of kudu tables are stored in kuduKeyExprs_.
Mention that as point 4

Line 601:       // Store exprs for kudu key columns.
Kudu (it's a proper noun)

Line 602:       if (matchFound && table_ instanceof KuduTable) {
You also need to substitute the kuduExprs_ in InsertStmt.substituteResultExprs().

You can try something like this (and add a test):

INSERT INTO kudu_table /*+ clustered */
SELECT * FROM (SELECT c1, c2, k1, k2) FROM src_table

Line 604:         for (String kuduKeyColumnName: kuduTable.getKuduKeyColumnNames()) {
add helper KuduTable.isPrimaryKeyColumn()
File fe/src/main/java/org/apache/impala/planner/

Line 499:    * (key columns for kudu tables), so that partitions can be written sequentially
in the
Kudu tables
File testdata/workloads/functional-planner/queries/PlannerTest/kudu.test:

Line 248: insert into table functional_kudu.alltypes /*+ clustered,shuffle */
shuffle/noshuffle don't do anything for Kudu tables, so I don't think this is necessary

they might do something in the future

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I412153bd8435d792bd61dea268d7a3b884048f14
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Lars Volker <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Lars Volker <>
Gerrit-Reviewer: Marcel Kornacker <>
Gerrit-HasComments: Yes

View raw message