Wenzhe Zhou has uploaded a new patch set (#11). ( http://gerrit.cloudera.org:8080/15123 )
Change subject: IMPALA-7002: Throw AuthorizationException when user accesses non-existent table/database in CTE without required privileges. ...................................................................... IMPALA-7002: Throw AuthorizationException when user accesses non-existent table/database in CTE without required privileges. Currently if a user without required privileges tries to access a non-existent database or table, then impala returns an analysis exception instead of authorization exception. This happens because during analysis of the with clause, the authorization request does not get registered due to analysis exception being thrown before it. This patch makes sure that those requests get registered regardless. Testing: - Manual test: - ran CTE with non-existent database/table in impala-shell without required privilege, verified that it results in AuthorizationException. - ran CTE with non-existent database/table in impala-shell with the required privilege, verified that it results in AnalysisException. - Added CTE test cases for non-existent database/table/column in AuthorizationStmtTest. - Passed all FE tests. - Passed all core tests. Change-Id: Ia6b657a7147a136198a9a97a679c9131ee814577 --- M fe/src/main/java/org/apache/impala/analysis/WithClause.java M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java 2 files changed, 43 insertions(+), 16 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/23/15123/11 -- To view, visit http://gerrit.cloudera.org:8080/15123 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia6b657a7147a136198a9a97a679c9131ee814577 Gerrit-Change-Number: 15123 Gerrit-PatchSet: 11 Gerrit-Owner: Wenzhe Zhou <wz...@cloudera.com> Gerrit-Reviewer: Bikramjeet Vig <bikramjeet....@cloudera.com> Gerrit-Reviewer: Fang-Yu Rao <fangyu....@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>