diff --git a/paimon-core/src/main/java/org/apache/paimon/operation/LocalOrphanFilesClean.java b/paimon-core/src/main/java/org/apache/paimon/operation/LocalOrphanFilesClean.java index 6a4276662468..1bf2e359303b 100644 --- a/paimon-core/src/main/java/org/apache/paimon/operation/LocalOrphanFilesClean.java +++ b/paimon-core/src/main/java/org/apache/paimon/operation/LocalOrphanFilesClean.java @@ -212,7 +212,8 @@ public static List createOrphanFilesCleans( long olderThanMillis, SerializableConsumer fileCleaner, @Nullable Integer parallelism) - throws Catalog.DatabaseNotExistException, Catalog.TableNotExistException { + throws Catalog.DatabaseNotExistException, Catalog.TableNotExistException, + Catalog.TableNoPermissionException { List tableNames = Collections.singletonList(tableName); if (tableName == null || "*".equals(tableName)) { tableNames = catalog.listTables(databaseName); @@ -253,7 +254,8 @@ public static CleanOrphanFilesResult executeDatabaseOrphanFiles( long olderThanMillis, SerializableConsumer fileCleaner, @Nullable Integer parallelism) - throws Catalog.DatabaseNotExistException, Catalog.TableNotExistException { + throws Catalog.DatabaseNotExistException, Catalog.TableNotExistException, + Catalog.TableNoPermissionException { List tableCleans = createOrphanFilesCleans( catalog,