Wenzhe Zhou has uploaded a new patch set (#3). ( http://gerrit.cloudera.org:8080/15123 )
Change subject: IMPALA-7002: Throw AuthorizationException when user accessing non-existent table/database in CTE without any privilege. ...................................................................... IMPALA-7002: Throw AuthorizationException when user accessing non-existent table/database in CTE without any privilege. WithClause::analyze function use local variable withClauseAnalyzer to analyze the query statement and the privilege requests are registered on the global state of withClauseAnalyzer. Those privilege requests are re-registered to the root analyzer after analyzing the query successfully. For non existent table/dataabse, analyze function throw AnalysisException and the privilege requests are not registered to root analyzer, which cause authorization been skipped and results AnalysisException, instead of AuthorizationException. This patch register the privilege requests to root analyzer regardless of exception. Testing: - Manual test: ran CTE with non-existent table/database in impala-shell without privilege, verified that it results in AuthorizationException. - Added CTE test cases for non-existent table/database 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, 33 insertions(+), 17 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/23/15123/3 -- 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: 3 Gerrit-Owner: Wenzhe Zhou <[email protected]> Gerrit-Reviewer: Bikramjeet Vig <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Wenzhe Zhou <[email protected]>
