Fang-Yu Rao has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/15838 )

Change subject: IMPALA-9661: [WIP] Avoid introducing unused columns in table 
masking view
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/15838/2/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/15838/2/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java@266
PS2, Line 266: TableMask tableMask = new TableMask(authChecker, table, user);
The constructor of TableMask adds all columns in 'table' to 'requiredColumns', 
which is unnecessary.

Since SelectAnalyzer#analyzeSelectClause() is completed, we will be able to 
figure out the name and the type of a column that is needed in the output of 
the corresponding SelectStmt.

To be more precise, given a SelectListItem, the name of a column could be 
accessed via its 'expr_.label_'. The type of the column could be accessed via 
its 'expr_.label_.desc_.type_'.


http://gerrit.cloudera.org:8080/#/c/15838/2/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java@272
PS2, Line 272: createTableMaskView
We should revise createTableMaskView() since the current implementation adds 
all the columns involved in 'resolvedPath' when creating the InlineViewRef, 
which is not necessary.

The revised createTableMaskView() should take the SelectList of the SelectStmt 
as one of the input arguments so that the created InlineViewRef will not 
contain unnecessary/redundant columns.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iedc7f15347a50626a9f2aff549bc49338cf73831
Gerrit-Change-Number: 15838
Gerrit-PatchSet: 2
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, 06 Mar 2021 01:01:16 +0000
Gerrit-HasComments: Yes

Reply via email to