You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/11/30 02:07:20 UTC

[GitHub] [iceberg] zhangjun0x01 commented on a change in pull request #1835: only list iceberg tables for HiveCatalog listTables method

zhangjun0x01 commented on a change in pull request #1835:
URL: https://github.com/apache/iceberg/pull/1835#discussion_r532311481



##########
File path: hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java
##########
@@ -118,8 +119,11 @@ public HiveCatalog(
 
     try {
       List<String> tables = clients.run(client -> client.getAllTables(database));
-      List<TableIdentifier> tableIdentifiers = tables.stream()
-          .map(t -> TableIdentifier.of(namespace, t))
+      List<Table> tableObject = clients.run(client -> client.getTableObjectsByName(database, tables));
+      List<TableIdentifier> tableIdentifiers = tableObject.stream()
+          .filter(table -> BaseMetastoreTableOperations.ICEBERG_TABLE_TYPE_VALUE
+              .equalsIgnoreCase(table.getParameters().get(BaseMetastoreTableOperations.TABLE_TYPE_PROP)))

Review comment:
       Yes,I added the check




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org