Internal Jenkins has submitted this change and it was merged.

Change subject: IMPALA-3269: Remove authz checks on default table location in 
CTAS queries
......................................................................


IMPALA-3269: Remove authz checks on default table location in CTAS queries

Bug: In CreateTableAsSelectStmt.analyze(), we set the default location
of table if the query doesn't explicitly set a table location. However
this is an issue with CTAS with subqueries as they follow a two pass
analysis with the second analyze() call failing with a authz error on
the URI added in the first pass.

Fix: We needn't set the default location explicitly. Metastore
automatically figures it out if it is not set.

Change-Id: I0451586d4994cf9fc8c3dd47c8f3a513067cb2ea
Reviewed-on: http://gerrit.cloudera.org:8080/2664
Reviewed-by: Bharath Vissapragada <[email protected]>
Tested-by: Internal Jenkins
---
M fe/src/main/java/com/cloudera/impala/analysis/CreateTableAsSelectStmt.java
M fe/src/main/java/com/cloudera/impala/analysis/CreateTableLikeFileStmt.java
M fe/src/main/java/com/cloudera/impala/analysis/ToSqlUtils.java
M fe/src/test/java/com/cloudera/impala/analysis/AuthorizationTest.java
M fe/src/test/java/com/cloudera/impala/analysis/ToSqlTest.java
5 files changed, 13 insertions(+), 16 deletions(-)

Approvals:
  Bharath Vissapragada: Looks good to me, approved
  Internal Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0451586d4994cf9fc8c3dd47c8f3a513067cb2ea
Gerrit-PatchSet: 5
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Bharath Vissapragada <[email protected]>
Gerrit-Reviewer: Alex Behm <[email protected]>
Gerrit-Reviewer: Bharath Vissapragada <[email protected]>
Gerrit-Reviewer: Internal Jenkins

Reply via email to