amogh-jahagirdar commented on code in PR #14480:
URL: https://github.com/apache/iceberg/pull/14480#discussion_r2517953546
##########
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:
Yeah it should just be a one time override. If you take a look at that PR to
your branch, we should be able to exercise all parts of the protocol (in your
existing tests) through this. If it ends up being more complicated, we can end
up adding a setter but for now I'd probably keep it as is until we know we need
it.
--
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]