rdblue commented on code in PR #8907: URL: https://github.com/apache/iceberg/pull/8907#discussion_r1414715080
########## hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java: ########## @@ -115,42 +126,17 @@ public void initialize(String inputName, Map<String, String> properties) { @Override public List<TableIdentifier> listTables(Namespace namespace) { - Preconditions.checkArgument( - isValidateNamespace(namespace), "Missing database in namespace: %s", namespace); - String database = namespace.level(0); try { - List<String> tableNames = clients.run(client -> client.getAllTables(database)); List<TableIdentifier> tableIdentifiers; - if (listAllTables) { - tableIdentifiers = - tableNames.stream() - .map(t -> TableIdentifier.of(namespace, t)) - .collect(Collectors.toList()); + tableIdentifiers = listAllTables(namespace); } else { - List<Table> tableObjects = - clients.run(client -> client.getTableObjectsByName(database, tableNames)); - tableIdentifiers = - tableObjects.stream() - .filter( - table -> - table.getParameters() != null - && BaseMetastoreTableOperations.ICEBERG_TABLE_TYPE_VALUE - .equalsIgnoreCase( - table - .getParameters() - .get(BaseMetastoreTableOperations.TABLE_TYPE_PROP))) - .map(table -> TableIdentifier.of(namespace, table.getTableName())) - .collect(Collectors.toList()); + tableIdentifiers = listTablesByType(namespace, TableType.EXTERNAL_TABLE.name()); } - LOG.debug( - "Listing of namespace: {} resulted in the following tables: {}", - namespace, - tableIdentifiers); + "Listing of namespace: {} resulted in the following: {}", namespace, tableIdentifiers); return tableIdentifiers; - Review Comment: Unnecessary whitespace change. -- 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. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org