Quanlong Huang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/15854 )

Change subject: IMPALA-9597: Eliminate redundant Ranger audits when a query 
involves column masking
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/15854/1/fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java
File fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java:

http://gerrit.cloudera.org:8080/#/c/15854/1/fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java@423
PS1, Line 423:       clientRequest = queryCtx_.getClient_request();
             :       authzCtx = authzChecker.createAuthorizationContext(true,
             :           clientRequest.isSetRedacted_stmt() ?
             :               clientRequest.getRedacted_stmt() : 
clientRequest.getStmt(),
             :           queryCtx_.getSession(), Optional.of(timeline_));
We can move these out of the try-clause. So authzCtx won't be null at line 444. 
This requires that AuthorizationChecker.createAuthorizationContext() doesn't 
throw any exceptions. This is true since all its implementations don't need to 
throw the InternalException.


http://gerrit.cloudera.org:8080/#/c/15854/1/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
File 
fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java:

http://gerrit.cloudera.org:8080/#/c/15854/1/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java@320
PS1, Line 320:         assertEventEquals("@column", "select", 
"functional/alltypestiny/id", 1,
Could you add a comment somewhere that column masking introduces additional 
unused columns like "id" here and we'll fix it in IMPALA-9661?


http://gerrit.cloudera.org:8080/#/c/15854/1/fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java@361
PS1, Line 361:           "select * from iv", onTable("functional", 
"alltypestiny"));
Could you add one more test that requires query rewrites so the query is 
analyzed twice?



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I42d60130fba93d63fbc36949f2bf746b7ae2497d
Gerrit-Change-Number: 15854
Gerrit-PatchSet: 1
Gerrit-Owner: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Comment-Date: Wed, 06 May 2020 09:44:02 +0000
Gerrit-HasComments: Yes

Reply via email to