impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zach Amsden (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4318: Kudu support for CREATE EXTERNAL TABLE AS SELECT
Date Thu, 30 Mar 2017 17:30:42 GMT
Hello Matthew Jacobs, Dan Hecht,

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

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

Change subject: IMPALA-4318:  Kudu support for CREATE EXTERNAL TABLE AS SELECT


Create external table can be used for two different operations,
creating a new table by selecting data from another, and importing
an existing unmanaged external table.  Previously, for Kudu tables,
it was only possible to issue CTAS for managed tables, and external
tables were assumed to be imports of already existing data.  This
change allows the creation of new, unmanaged (external) kudu tables
from SELECT statements.

In the catalog executor, we detect if a table creation is new by
inferring that from the presence of column definitions, not by whether
it is external / managed.  Front-end code is changed to allow this
through the parser.  This means any attempts to specify table metadata
for Kudu tables are now interpreted as a table creation.

Testing: Manual testing, expanded ParserTest and AnalyzeDDLTest
and added test cases to query_test to validate Kudu support.

Ran the folowing query:

create external table test2_name primary key(id) partition by hash(id)
partitions 10 stored as kudu as select * from test_name;

Which successfully created and inserted 3 rows of data.  Tried many
other things like changing primary keys and forms of partitioning.

Change-Id: I9aa82809a6c0c5e6386827314b7e5b520c1a6633
M fe/src/main/java/org/apache/impala/analysis/
M fe/src/main/java/org/apache/impala/analysis/
M fe/src/main/java/org/apache/impala/service/
M fe/src/main/java/org/apache/impala/service/
M fe/src/test/java/org/apache/impala/analysis/
M fe/src/test/java/org/apache/impala/analysis/
M tests/query_test/
7 files changed, 91 insertions(+), 32 deletions(-)

  git pull ssh:// refs/changes/61/6261/12
To view, visit
To unsubscribe, visit

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9aa82809a6c0c5e6386827314b7e5b520c1a6633
Gerrit-PatchSet: 12
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Zach Amsden <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Dimitris Tsirogiannis <>
Gerrit-Reviewer: Marcel Kornacker <>
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Thomas Tauber-Marshall <>
Gerrit-Reviewer: Zach Amsden <>

View raw message