rdblue commented on a change in pull request #2276:
URL: https://github.com/apache/iceberg/pull/2276#discussion_r588808187



##########
File path: 
spark3/src/main/java/org/apache/iceberg/spark/source/SparkBatchQueryScan.java
##########
@@ -106,26 +105,42 @@
         }
       }
 
-      if (splitSize != null) {
-        scan = scan.option(TableProperties.SPLIT_SIZE, splitSize.toString());
-      }
-
-      if (splitLookback != null) {
-        scan = scan.option(TableProperties.SPLIT_LOOKBACK, 
splitLookback.toString());
-      }
-
-      if (splitOpenFileCost != null) {
-        scan = scan.option(TableProperties.SPLIT_OPEN_FILE_COST, 
splitOpenFileCost.toString());
-      }
+      scan = scan.option(TableProperties.SPLIT_SIZE, 
String.valueOf(splitSize(scan)));
+      scan = scan.option(TableProperties.SPLIT_LOOKBACK, 
String.valueOf(splitLookback()));
+      scan = scan.option(TableProperties.SPLIT_OPEN_FILE_COST, 
String.valueOf(splitOpenFileCost()));
 
       for (Expression filter : filterExpressions()) {
         scan = scan.filter(filter);
       }
 
-      try (CloseableIterable<CombinedScanTask> tasksIterable = 
scan.planTasks()) {

Review comment:
       Configuring this seems fundamental to the scan, so I would probably make 
it first class in the scan API. I think you may also want to configure the 
partition fields or table columns that should be kept separate. That way you'd 
be able to set `preservePartitionsFor("id")` or something.




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

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