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 12: (3 comments) http://gerrit.cloudera.org:8080/#/c/22716/12/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/12/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java@74 PS12, Line 74: FeDb db = catalog.getDb(tableName.getDb()); Small optional nit: I think the code would look slightly better if there was only one registerPrivReq call. We can do this by having a function FeTable getFeTable(tableName, catalog) If this method returns null, it runs registerPrivReq, else it runs registerAuthAndAuditEvent Within this method, we can check if catalog.getDb() returns non-null and db.getTable() returns null. I think it becomes slightly cleaner...what do you think? http://gerrit.cloudera.org:8080/#/c/22716/12/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java@110 PS12, Line 110: FeTable feTable = db.getTable(tableName.getTbl()); The FeTable getFeTable(tableName, catalog) method I mentioned above would be applicable here too, I think. http://gerrit.cloudera.org:8080/#/c/22716/12/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java@170 PS12, Line 170: validate(parsedSqlNode); For my understanding: this is only validating the query within the view. So this isn't any extra validation. Is that correct? -- 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: 12 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: Thu, 31 Jul 2025 17:10:01 +0000 Gerrit-HasComments: Yes
