nastra commented on code in PR #10929:
URL: https://github.com/apache/iceberg/pull/10929#discussion_r1757340312


##########
core/src/main/java/org/apache/iceberg/rest/RESTTableOperations.java:
##########
@@ -97,12 +102,14 @@ public TableMetadata current() {
 
   @Override
   public TableMetadata refresh() {
+    Endpoint.check(endpoints, Endpoint.V1_LOAD_TABLE);
     return updateCurrentMetadata(
         client.get(path, LoadTableResponse.class, headers, 
ErrorHandlers.tableErrorHandler()));
   }
 
   @Override
   public void commit(TableMetadata base, TableMetadata metadata) {
+    Endpoint.check(endpoints, Endpoint.V1_UPDATE_TABLE);

Review Comment:
   checking for `V1_UPDATE_TABLE` only is correct here, because we're only 
hitting the update-table endpoint in this method. I'm guessing this question is 
because of the potential usage of `UpdateType.CREATE`, which might indicate 
that the create-table endpoint is called. However, this is only used during 
staged table creation in 
https://github.com/apache/iceberg/blob/9ddd6d34bafad2abed19c089d7d8758aa6150268/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java#L826-L842
 and we're already checking against `V1_CREATE_TABLE` there.



-- 
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

Reply via email to