stevenzwu commented on code in PR #4744:
URL: https://github.com/apache/iceberg/pull/4744#discussion_r872932403


##########
api/src/main/java/org/apache/iceberg/Scan.java:
##########
@@ -114,4 +133,19 @@
    * @return an Iterable of tasks for this scan
    */
   CloseableIterable<CombinedScanTask> planTasks();
+
+  /**
+   * Returns the target split size for this scan.
+   */
+  long targetSplitSize();

Review Comment:
   I moved those 3 split methods so that we can share the implementations in 
`BaseScan` class. 
   
   Alternatively, we can move them into a static util class. Would love to get 
some feedback here.
   ```
   public class ScanUtil {
     public static long targetSplitSize(TableOperations ops, TableScanContext 
context) {
       long tableValue = ops.current().propertyAsLong(
           TableProperties.SPLIT_SIZE,
           TableProperties.SPLIT_SIZE_DEFAULT);
       return PropertyUtil.propertyAsLong(context.options(), 
TableProperties.SPLIT_SIZE, tableValue);
     }
   }
   ```



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