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 16: (6 comments) Ok, this was the first time I did a full pass on the registration functions, so I think I've looked at all the code now. Sorry for some more changes here, but I think this is gonna cover most of it now. http://gerrit.cloudera.org:8080/#/c/22716/16/fe/src/main/java/org/apache/impala/analysis/StmtMetadataLoader.java File fe/src/main/java/org/apache/impala/analysis/StmtMetadataLoader.java: http://gerrit.cloudera.org:8080/#/c/22716/16/fe/src/main/java/org/apache/impala/analysis/StmtMetadataLoader.java@83 PS16, Line 83: private boolean needsAnyTableMasksInQuery_ = false; If I'm understanding correctly, this variable is only set because this feature is not supported in Calcite? If so, I think we should file a Jira for this, put it in a comment here, and mention that this variable should be removed once the Jira is fixed. http://gerrit.cloudera.org:8080/#/c/22716/16/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaViewTable.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaViewTable.java: http://gerrit.cloudera.org:8080/#/c/22716/16/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaViewTable.java@28 PS16, Line 28: private FeView table_; nit: final http://gerrit.cloudera.org:8080/#/c/22716/16/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java: http://gerrit.cloudera.org:8080/#/c/22716/16/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java@91 PS16, Line 91: public void registerPrivReqsInViews(Set<TableName> tableNamesInQuery, I'm thinking that having the register* functions here just pollutes the Validator space. Can we move these functions within CalciteAnalysisDriver? We can also use the same SqlValidator when we validate the view. http://gerrit.cloudera.org:8080/#/c/22716/16/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java@95 PS16, Line 95: if (feTable == null) { Nit: we don't need this if check anymore http://gerrit.cloudera.org:8080/#/c/22716/16/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java@124 PS16, Line 124: for (TableName tableInView : tableVisitor.tableNames_) { Can we just call registerTablePrivReqs rather than repeat this for loop or is there something different that I missed? http://gerrit.cloudera.org:8080/#/c/22716/16/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java@209 PS16, Line 209: // It's a bit hacky to assume each SqlFunction is associated with BuiltinsDb. Ideally Can we make reference to https://issues.apache.org/jira/browse/IMPALA-13095 here? -- 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: 16 Gerrit-Owner: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]> Gerrit-Comment-Date: Tue, 05 Aug 2025 15:20:31 +0000 Gerrit-HasComments: Yes
