This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 324565f45f [rest] Remove useless loadTableToken in RESTCatalog
324565f45f is described below

commit 324565f45f2297d36c2447b5811ee7d9b2622d46
Author: JingsongLi <[email protected]>
AuthorDate: Wed Oct 22 10:05:10 2025 +0800

    [rest] Remove useless loadTableToken in RESTCatalog
---
 .../src/main/java/org/apache/paimon/rest/RESTCatalog.java    | 12 ------------
 .../test/java/org/apache/paimon/rest/RESTCatalogTest.java    |  2 +-
 2 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java 
b/paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java
index 58f85a48cc..58df61e659 100644
--- a/paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java
+++ b/paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java
@@ -45,7 +45,6 @@ import org.apache.paimon.rest.responses.ErrorResponse;
 import org.apache.paimon.rest.responses.GetDatabaseResponse;
 import org.apache.paimon.rest.responses.GetFunctionResponse;
 import org.apache.paimon.rest.responses.GetTableResponse;
-import org.apache.paimon.rest.responses.GetTableTokenResponse;
 import org.apache.paimon.rest.responses.GetViewResponse;
 import org.apache.paimon.schema.Schema;
 import org.apache.paimon.schema.SchemaChange;
@@ -972,17 +971,6 @@ public class RESTCatalog implements Catalog {
         return api;
     }
 
-    protected GetTableTokenResponse loadTableToken(Identifier identifier)
-            throws TableNotExistException {
-        try {
-            return api.loadTableToken(identifier);
-        } catch (NoSuchResourceException e) {
-            throw new TableNotExistException(identifier);
-        } catch (ForbiddenException e) {
-            throw new TableNoPermissionException(identifier, e);
-        }
-    }
-
     private FileIO fileIOForData(Path path, Identifier identifier) {
         return dataTokenEnabled
                 ? new RESTTokenFileIO(context, api, identifier, path)
diff --git 
a/paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogTest.java 
b/paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogTest.java
index c551568af1..abe054087f 100644
--- a/paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogTest.java
+++ b/paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogTest.java
@@ -308,7 +308,7 @@ public abstract class RESTCatalogTest extends 
CatalogTestBase {
                 () -> restCatalog.fastForward(identifier, "test_branch"));
         assertThrows(
                 Catalog.TableNoPermissionException.class,
-                () -> restCatalog.loadTableToken(identifier));
+                () -> restCatalog.api().loadTableToken(identifier));
         assertThrows(
                 Catalog.TableNoPermissionException.class,
                 () -> restCatalog.loadSnapshot(identifier));

Reply via email to