Huaisi Xu has posted comments on this change.

Change subject: IMPALA-3711: Check privileges when necessary
......................................................................


Patch Set 6:

(9 comments)

http://gerrit.cloudera.org:8080/#/c/3371/6/fe/src/main/java/com/cloudera/impala/service/MetadataOp.java
File fe/src/main/java/com/cloudera/impala/service/MetadataOp.java:

PS6, Line 229: catalogName
> private member should end with a '_'.
Done


PS6, Line 230: private boolean ignoreAllDbs;
             :     private boolean ignoreAllTables;
             :     private boolean ignoreAllColumns;
             :     private boolean ignoreAllFunctions;
> Instead of having the ignore* members, wouldn't be simpler if you had has[d
I think we must have this see example at line547


PS6, Line 246: this.
> No need for 'this'. Plz remove.
Done


PS6, Line 316: getDbsMetadataParams
> I think we can just name it metadataParams for simplicity
Done


Line 327:     PatternMatcher schemaPatternMatcher = 
getDbsMetadataParams.ignoreAllDbs
> I should use accesser.
Done


PS6, Line 342: functionName != null
> Why don't you just check if fnPatternMatcher is not null and remove L326?
see comment above.


PS6, Line 350: fe.getTableNames(
             :             db.getName(), "*", tablePatternMatcher, user)
> I thought the interface would be:
why? that way There will be a lot of duplicated code? we cannot call 
getTableNames(String dbName, String pattern, Sring user); in 
getTableNames(String dbName, PatternMatcher matcher, String user). we have to 
use most of the code in one another?


Line 360: 
> Also, why can't we check here if we have a non-null columnPatternMatcher an
will do


Line 547:     MetadataOpParams getDbsMetadataParams = 
MetadataOpParams.MetadataOpParamsBuilder()
if someone call this with tableName to be null, then we cannot differentiate 
that after we call getDbsMetadata if we do not explicit has those ignore*s.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I17d8c5b9fb12483e4b01b819fba48b6849311a14
Gerrit-PatchSet: 6
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Huaisi Xu <[email protected]>
Gerrit-Reviewer: Dimitris Tsirogiannis <[email protected]>
Gerrit-Reviewer: Huaisi Xu <[email protected]>
Gerrit-HasComments: Yes

Reply via email to