pvary commented on code in PR #14398:
URL: https://github.com/apache/iceberg/pull/14398#discussion_r2541394594


##########
core/src/main/java/org/apache/iceberg/rest/RESTCatalog.java:
##########
@@ -69,19 +72,39 @@ public RESTCatalog(Function<Map<String, String>, 
RESTClient> clientBuilder) {
   public RESTCatalog(
       SessionCatalog.SessionContext context,
       Function<Map<String, String>, RESTClient> clientBuilder) {
-    this.sessionCatalog = new RESTSessionCatalog(clientBuilder, null);
+    this(context, clientBuilder, null);
+  }
+
+  @VisibleForTesting
+  RESTCatalog(
+      SessionCatalog.SessionContext context,
+      Function<Map<String, String>, RESTClient> clientBuilder,
+      BiFunction<SessionCatalog.SessionContext, Map<String, String>, FileIO> 
ioBuilder) {
+    this.sessionCatalog = createSessionCatalog(clientBuilder, ioBuilder);
     this.delegate = sessionCatalog.asCatalog(context);
     this.nsDelegate = (SupportsNamespaces) delegate;
     this.context = context;
     this.viewSessionCatalog = sessionCatalog.asViewCatalog(context);
   }
 
+  @VisibleForTesting
+  RESTSessionCatalog createSessionCatalog(

Review Comment:
   The question is: Do we need to have 2 constructors for `RESTCatalog`, or 
creating a single constructor, and calling it with a bit more parameters is 
better



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