Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/25078 )
Change subject: IMPALA-15500, IMPALA-15533: Register column-level privilege requests in USING ...................................................................... Patch Set 5: (1 comment) http://gerrit.cloudera.org:8080/#/c/25078/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/25078/5/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java@226 PS5, Line 226: SqlValidatorTable sqlValidatorTable = namespace.getTable(); > With `a(id,k)` and `b(k)`, this still misses the privilege request for `a.i Good catch Aleksandr! You are correct. In your example, we should have registered the privilege requests for both a.id and b.id, since these 2 columns participate in the join with the temporary table c as well. I briefly checked and found that the classic Impala planner also registers the privilege requests for these 2 columns. It looks like we could add the following to the beginning of this method to recurse if the given SqlNode 'leftOrRight' is an instance of SqlJoin. I briefly checked and verified that after the recursion, we will be able to register the privilege requests for a.id and b.id. if (leftOrRight instanceof SqlJoin) { registerColumnPrivilegeInUsing(identifier, ((SqlJoin) leftOrRight).getLeft()); registerColumnPrivilegeInUsing(identifier, ((SqlJoin) leftOrRight).getRight()); } I will make this change and add an additional test case in the next patch. -- To view, visit http://gerrit.cloudera.org:8080/25078 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia49fc01fc45408649b36441c436038921dbb9451 Gerrit-Change-Number: 25078 Gerrit-PatchSet: 5 Gerrit-Owner: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Aleksandr Efimov <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]> Gerrit-Comment-Date: Tue, 20 Oct 2026 21:48:33 +0000 Gerrit-HasComments: Yes
