[ 
https://issues.apache.org/jira/browse/HIVE-22486?focusedWorklogId=347459&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-347459
 ]

ASF GitHub Bot logged work on HIVE-22486:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Nov/19 15:32
            Start Date: 21/Nov/19 15:32
    Worklog Time Spent: 10m 
      Work Description: kgyrtkirk commented on pull request #848: HIVE-22486
URL: https://github.com/apache/hive/pull/848#discussion_r349153623
 
 

 ##########
 File path: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveRelFieldTrimmer.java
 ##########
 @@ -674,10 +677,14 @@ public TrimResult trimFields(Project project, 
ImmutableBitSet fieldsUsed,
     // set columnAccessInfo for ViewColumnAuthorization
     for (Ord<RexNode> ord : Ord.zip(project.getProjects())) {
       if (fieldsUsed.get(ord.i)) {
-        if (this.columnAccessInfo != null && this.viewProjectToTableSchema != 
null
-            && this.viewProjectToTableSchema.containsKey(project)) {
+        if (this.viewProjectToTableSchema != null && 
this.viewProjectToTableSchema.containsKey(project)) {
           Table tab = this.viewProjectToTableSchema.get(project);
-          this.columnAccessInfo.add(tab.getCompleteName(), 
tab.getAllCols().get(ord.i).getName());
+          if (this.directColumnAccessInfo != null) {
+            this.directColumnAccessInfo.add(tab.getCompleteName(), 
tab.getAllCols().get(ord.i).getName());
+          }
+          if (this.allColumnAccessInfo != null) {
+            this.allColumnAccessInfo.add(tab.getCompleteName(), 
tab.getAllCols().get(ord.i).getName());
+          }
 
 Review comment:
   or...I'm right now thinking about deciding whether to use the "usage aware" 
one or not beforehand - and use a specifically tailored `ColumnAccesInfo` 
implementation 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 347459)
    Time Spent: 0.5h  (was: 20m)

> Send only accessed columns for masking policies request
> -------------------------------------------------------
>
>                 Key: HIVE-22486
>                 URL: https://issues.apache.org/jira/browse/HIVE-22486
>             Project: Hive
>          Issue Type: Improvement
>          Components: CBO
>    Affects Versions: 4.0.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-22486.01.patch, HIVE-22486.02.patch, 
> HIVE-22486.03.patch, HIVE-22486.patch
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Currently, we send all columns for masking request, even if they are not 
> accessed by the given query. We could send only those columns for which the 
> masking policy will be necessary.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to