Github user hsuanyi commented on a diff in the pull request:

    https://github.com/apache/drill/pull/461#discussion_r58751518
  
    --- Diff: 
contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/schema/HiveDatabaseSchema.java
 ---
    @@ -72,4 +80,56 @@ public String getTypeName() {
         return HiveStoragePluginConfig.NAME;
       }
     
    +  @Override
    +  public void visitTables(final RecordGenerator recordGenerator, final 
String schemaPath) {
    +    final List<String> tableNames = Lists.newArrayList(getTableNames());
    +    List<org.apache.hadoop.hive.metastore.api.Table> tables;
    +    // Retries once if the first call to fetch the metadata fails
    +    synchronized(mClient) {
    +      try {
    +        tables = mClient.getTableObjectsByName(getName(), tableNames);
    --- End diff --
    
    @vkorukanti  Thanks for pointing this out. Regardless of the permission, 
getTableObjectsByName will return the requested tables. Thus, as in [1], I used 
mClient.tableExists() to check the permission.
    
    
[1]https://github.com/apache/drill/pull/461/files#diff-bb5d8a385888df1dacc85fc011acd94bR93


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to