Dimitris Tsirogiannis has posted comments on this change. Change subject: IMPALA-3711: Check privileges when necessary ......................................................................
Patch Set 6: (2 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 350: fe.getTableNames( : db.getName(), "*", tablePatternMatcher, user) > why? that way There will be a lot of duplicated code? we cannot call getTab I don't think there will be any duplicate code. getTableNames that takes as input a string for the pattern will simply create a new HivePatternMatcher and pass it to the second getTableNames function. Line 547: MetadataOpParams getDbsMetadataParams = MetadataOpParams.MetadataOpParamsBuilder() > if someone call this with tableName to be null, then we cannot differentiat ignoreAllColumns(true) is equivalent to hasColumnPattern(false). Irrespective of the actual pattern used (null, "", etc), we set the hasDbPattern and hasTablePattern to true by virtue of calling the equivalent set functions. So in the getDbsMetadata() you can check if you have a column pattern and if not, don't make any calls to Catalog.getColumns(). -- 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
