Steve Carlin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/22716 )

Change subject: IMPALA-13011: Support authorization for Calcite in Impala
......................................................................


Patch Set 17:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/22716/17/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteAnalysisDriver.java
File 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteAnalysisDriver.java:

http://gerrit.cloudera.org:8080/#/c/22716/17/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteAnalysisDriver.java@143
PS17, Line 143:       registerTablePrivReqs(parsedStmt_.getTablesInQuery(/* 
loader */ null),
I still think we can make this a tad simpler...

In 3 of these 4 methods, we are doing "for" loops.  Not 100% positive, but I 
think we can narrow these 4 methods down to 3 and only have one of them with a 
"for" loop.

The "for" loop essentially just goes through all the tables in the current 
level.  So the first method can have a "for" loop on the outer layer.  It will 
always do the registration, just like line #246, which calls the second 
function, since it always does this whether it's a table or a view.  But if 
it's a view, we can do all the view things needed.

That first method with the for loop can contain the "shouldMaskPrivChecks" and 
the outer layer can pass in the appropriate value.

I think this will work?  But I could have missed something.  What do you think?



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9a7f7e4dc9a86a2da9e387832e552538e34029c1
Gerrit-Change-Number: 22716
Gerrit-PatchSet: 17
Gerrit-Owner: Fang-Yu Rao <fangyu....@cloudera.com>
Gerrit-Reviewer: Aman Sinha <amsi...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fangyu....@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <joemcdonn...@cloudera.com>
Gerrit-Reviewer: Michael Smith <michael.sm...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <riza.sumi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <scar...@cloudera.com>
Gerrit-Comment-Date: Sun, 10 Aug 2025 03:54:59 +0000
Gerrit-HasComments: Yes

Reply via email to