Bikramjeet Vig has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/15123 )

Change subject: IMPALA-7002: Throw AuthorizationException when user accessing 
non-existent table/database in CTE without any privilege.
......................................................................


Patch Set 4:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/15123/4/fe/src/main/java/org/apache/impala/analysis/WithClause.java
File fe/src/main/java/org/apache/impala/analysis/WithClause.java:

http://gerrit.cloudera.org:8080/#/c/15123/4/fe/src/main/java/org/apache/impala/analysis/WithClause.java@94
PS4, Line 94:  } catch (AnalysisException e) {
            :       throw e;
nit: we dont need the catch block if you are only returning the exception here


http://gerrit.cloudera.org:8080/#/c/15123/4/fe/src/main/java/org/apache/impala/analysis/WithClause.java@98
PS4, Line 98:       // withClauseAnalyzer is local variable. The privilege 
requests registered
            :       // on it have to be re-registered to the root analyzer even 
when analyze
            :       // function throw AnalysisException since authorization 
check is required
            :       // for non existent database/table.
nit: this doesn't really tell me why they need to be re-registered.
Also, you used a specific example of when we need auth checks, is that the only 
case where exception can be thrown? If not, it might be worthwhile to 
investigate if it is ok to register auth checks in those other cases.
If you end up concluding that auth checks need to be registered in all cases 
then the method comment should be generic to encompass all cases.



--
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: comment
Gerrit-Change-Id: Ia6b657a7147a136198a9a97a679c9131ee814577
Gerrit-Change-Number: 15123
Gerrit-PatchSet: 4
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]>
Gerrit-Comment-Date: Mon, 03 Feb 2020 23:08:09 +0000
Gerrit-HasComments: Yes

Reply via email to