singhpk234 commented on code in PR #14480:
URL: https://github.com/apache/iceberg/pull/14480#discussion_r2517935544


##########
core/src/test/java/org/apache/iceberg/rest/RESTCatalogAdapter.java:
##########
@@ -533,11 +577,32 @@ protected <T extends RESTResponse> T execute(
     throw new RESTException("Unhandled error: %s", error);
   }
 
+  /**
+   * Supplied interface to allow RESTCatalogAdapter implementations to have a 
mechanism to change
+   * how many file scan tasks get grouped in a plan task or under what 
conditions a table scan
+   * should be performed async. Primarily used in testing to allow overriding 
more deterministic
+   * ways of planning behavior.
+   */
+  public interface PlanningBehavior {
+    default int numberFileScanTasksPerPlanTask() {
+      return 100;
+    }
+
+    default boolean shouldPlanTableScanAsync(TableScan tableScan) {
+      return false;
+    }
+  }
+
+  protected PlanningBehavior planningBehavior() {
+    return new PlanningBehavior() {};
+  }

Review Comment:
   wouldn't we need to create `adapterForRESTServer` per planning behaviour 
override ? or do you envision this be like one time thing in createCatalog and 
create tests around what was configured ? 



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