XJDKC commented on code in PR #14465:
URL: https://github.com/apache/iceberg/pull/14465#discussion_r2561734358


##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -1010,6 +1011,82 @@ private FileIO tableFileIO(
     return newFileIO(context, fullConf, storageCredentials);
   }
 
+  /**
+   * Create a new {@link RESTTableOperations} instance for simple table 
operations.
+   *
+   * <p>This method can be overridden in subclasses to provide custom table 
operations
+   * implementations.
+   *
+   * @param restClient the REST client to use for communicating with the 
catalog server
+   * @param path the REST path for the table
+   * @param headers a supplier for additional HTTP headers to include in 
requests
+   * @param fileIO the FileIO implementation for reading and writing table 
metadata and data files
+   * @param current the current table metadata
+   * @param supportedEndpoints the set of supported REST endpoints
+   * @return a new RESTTableOperations instance
+   */
+  protected RESTTableOperations newTableOps(

Review Comment:
   If someone decides to override this method, they're responsible for adapting 
to future changes. The Iceberg spec is continuously evolving, even if we define 
an API today, it doesn't mean it will remain unchanged.
   For example, there's another ongoing PR that adds encryption-related 
properties to `RESTTableOperations`. So it’s quite common for APIs in this area 
to evolve over time.
   
   But the benefits of just injecting a custom table operations is: if the new 
changes are not related to this method, we can upgrade smoothly.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to