aokolnychyi commented on code in PR #6924: URL: https://github.com/apache/iceberg/pull/6924#discussion_r1128931126
########## core/src/main/java/org/apache/iceberg/util/TableScanUtil.java: ########## @@ -79,6 +79,23 @@ public static CloseableIterable<FileScanTask> splitFiles( return CloseableIterable.combine(splitTasks, tasks); } + public static <T extends ScanTask> CloseableIterable<T> splitScanTasks( Review Comment: Instead of doing this, we should offer another method with the following signature. ``` public static <T extends ScanTask> List<ScanTaskGroup<T>> planTaskGroups( List<T> tasks, long splitSize, int lookback, long openFileCost) { ... } ``` This will work in the scan for staged tasks as well as for `SparkPartitioningAwareScan`. Under the hood, it will simply delegate to the existing `planTaskGroups` but will wrap list into `CloseableIterable`. We should try to use the new planning code with `ScanTaskGroup` wherever possible. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org