diff --git a/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java b/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java index a1950c374ab3..51c800e568c1 100644 --- a/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java +++ b/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java @@ -391,10 +391,14 @@ protected List listTablesImpl(String databaseName) { try { List allTables = clients.run(client -> client.getAllTables(databaseName)); List result = new ArrayList<>(allTables.size()); - for (String table : allTables) { + for (String t : allTables) { try { - getTable(new Identifier(databaseName, table)); - result.add(table); + Identifier identifier = new Identifier(databaseName, t); + Table table = getHmsTable(identifier); + if (isPaimonTable(identifier, table) + || (!formatTableDisabled() && isFormatTable(table))) { + result.add(t); + } } catch (TableNotExistException ignored) { } }