Fang-Yu Rao has uploaded this change for review. ( http://gerrit.cloudera.org:8080/22716
Change subject: IMPALA-13011: [WIP] Support authorization for Calcite in Impala ...................................................................... IMPALA-13011: [WIP] Support authorization for Calcite in Impala Based on https://gerrit.cloudera.org/c/22319/18, this patch supports authorization for the Calcite planner in Impala. Specifically, this patch focuses on the authorization of table-level and column-level privilege requests. The issue reported in IMPALA-13767 is also taken care of. To avoid registering privilege requests for common table expressions (CTEs) in the WITH clauses in a query, we collect the names of such CTEs when visiting the SqlNode representing the query and make sure we don't register privilege requests for those CTEs in the WITH clauses because those CTEs are not actual tables. Moreover, we register the VIEW_METADATA privilege for each function involved in the given query. We hardcode the database associated with the function to '_impala_builtins', which is a bit hacky. We should not be doing this once each function is associated with a database when we are using the Calcite planner. Change-Id: I9a7f7e4dc9a86a2da9e387832e552538e34029c1 --- M java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteAnalysisDriver.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteMetadataHandler.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteParsedStatement.java A java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaPrivilegeRequestsRegistrar.java 4 files changed, 224 insertions(+), 3 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/16/22716/1 -- 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: newchange Gerrit-Change-Id: I9a7f7e4dc9a86a2da9e387832e552538e34029c1 Gerrit-Change-Number: 22716 Gerrit-PatchSet: 1 Gerrit-Owner: Fang-Yu Rao <[email protected]>
