From cdd4061db4b43393aab6fc5b2ce2c13ed34c69f3 Mon Sep 17 00:00:00 2001 From: xleoken Date: Thu, 28 Nov 2024 14:31:01 +0800 Subject: [PATCH] [core] Improve the performance of show tables with hive metastore (#4605) --- .../src/main/java/org/apache/paimon/hive/HiveCatalog.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 0ecc78469e15..9a90995f282d 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 @@ -1017,10 +1017,8 @@ public Table getHmsTable(Identifier identifier) throws TableNotExistException { private boolean isPaimonTable(Identifier identifier, Table table) { return isPaimonTable(table) - && tableSchemaInFileSystem( - getTableLocation(identifier, table), - identifier.getBranchNameOrDefault()) - .isPresent(); + && tableExistsInFileSystem( + getTableLocation(identifier, table), identifier.getBranchNameOrDefault()); } private static boolean isPaimonTable(Table table) {