Bharath Vissapragada has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/12959 )

Change subject: IMPALA-6718: Add support for column-level permissions on views
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/12959/3/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java
File fe/src/main/java/org/apache/impala/analysis/SelectStmt.java:

http://gerrit.cloudera.org:8080/#/c/12959/3/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java@545
PS3, Line 545:  private void registerViewColumnPrivileges() {
             :       for (TableRef tableRef: fromClause_.getTableRefs()) {
             :         if (!(tableRef instanceof InlineViewRef)) continue;
             :         InlineViewRef inlineViewRef = (InlineViewRef) tableRef;
             :         FeView view = inlineViewRef.getView();
             :         boolean isCatalogView = view != null && 
!view.isLocalView();
             :         if (!isCatalogView) continue;
             :         for (Expr expr : getResultExprs()) {
             :           if (!(expr instanceof SlotRef)) continue;
             :           SlotRef slotRef = (SlotRef) expr;
             :           analyzer_.registerPrivReq(builder -> builder
             :               .allOf(Privilege.SELECT)
             :               .onColumn(view.getDb().getName(), view.getName(),
             :                   slotRef.getDesc().getLabel())
             :               .build());
             :         }
             :       }
             :     }
Had a chat with Fredy offline. We were discussing if there is a more cleaner 
way to do it in the InlineViewRef analysis. We could mark the view slots as 
materialized and add column privileges just like how we do for table columns.



--
To view, visit http://gerrit.cloudera.org:8080/12959
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If81e683212cba22cc0fa5fc091ec3c799fa33e14
Gerrit-Change-Number: 12959
Gerrit-PatchSet: 3
Gerrit-Owner: Fredy Wijaya <fwij...@cloudera.com>
Gerrit-Reviewer: Austin Nobis <ano...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bhara...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fwij...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-Comment-Date: Tue, 09 Apr 2019 00:28:25 +0000
Gerrit-HasComments: Yes

Reply via email to