Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/23383 )
Change subject: IMPALA-14295: [WIP] Support table masking for the Calcite planner ...................................................................... Patch Set 5: (1 comment) http://gerrit.cloudera.org:8080/#/c/23383/5/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/23383/5/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java@351 PS5, Line 351: CalciteMetadataHandler.TableVisitor tableVisitor = : new CalciteMetadataHandler.TableVisitor(/* currentDb */ "default"); : parsedSqlNode.accept(tableVisitor); : return validate(parsedSqlNode); validate(parsedSqlNode) does not register the table-level privilege requests in the SqlNode representing the table masking. But the classic frontend does it, so we should retrieve the referenced tables in the SqlNode representing the table masking via 'tableVisitor.tableNames_' as we do in the constructor of https://github.com/apache/impala/blob/master/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteParsedStatement.java. We may reuse registerPrivReqsInTables() in https://github.com/apache/impala/blob/master/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteAnalysisDriver.java but we need to figure out what to do if the referenced tables in table masks are regular views. -- To view, visit http://gerrit.cloudera.org:8080/23383 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3d9cf028078762f78cf0f82b817bdc1ee37e180b Gerrit-Change-Number: 23383 Gerrit-PatchSet: 5 Gerrit-Owner: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Comment-Date: Sat, 08 Nov 2025 00:06:34 +0000 Gerrit-HasComments: Yes
