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


##########
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(
+      RESTClient restClient,
+      String path,
+      Supplier<Map<String, String>> headers,
+      FileIO fileIO,
+      TableMetadata current,
+      Set<Endpoint> supportedEndpoints) {
+    return new RESTTableOperations(restClient, path, headers, fileIO, current, 
supportedEndpoints);
+  }
+
+  /**
+   * Create a new {@link RESTTableOperations} instance for transaction-based 
operations (create or
+   * replace).
+   *
+   * <p>This method can be overridden in subclasses to provide custom table 
operations
+   * implementations for transaction-based operations.
+   *
+   * @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 updateType the type of update being performed (CREATE, REPLACE, or 
SIMPLE)
+   * @param createChanges the list of metadata updates to apply during table 
creation or replacement
+   * @param current the current table metadata (may be null for CREATE 
operations)
+   * @param supportedEndpoints the set of supported REST endpoints
+   * @return a new RESTTableOperations instance
+   */
+  protected RESTTableOperations newTableOpsForTransaction(
+      RESTClient restClient,
+      String path,
+      Supplier<Map<String, String>> headers,
+      FileIO fileIO,
+      RESTTableOperations.UpdateType updateType,
+      List<MetadataUpdate> createChanges,
+      TableMetadata current,
+      Set<Endpoint> supportedEndpoints) {
+    return new RESTTableOperations(
+        restClient, path, headers, fileIO, updateType, createChanges, current, 
supportedEndpoints);
+  }
+
+  /**
+   * Create a new {@link RESTViewOperations} instance.
+   *
+   * <p>This method can be overridden in subclasses to provide custom view 
operations
+   * implementations.
+   *
+   * @param restClient the REST client to use for communicating with the 
catalog server
+   * @param path the REST path for the view
+   * @param headers a supplier for additional HTTP headers to include in 
requests
+   * @param current the current view metadata
+   * @param supportedEndpoints the set of supported REST endpoints
+   * @return a new RESTViewOperations instance
+   */
+  protected RESTViewOperations newViewOps(
+      RESTClient restClient,
+      String path,
+      Supplier<Map<String, String>> headers,
+      ViewMetadata current,

Review Comment:
   ```suggestion
         ViewMetadata metadata,
   ```



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