nastra commented on code in PR #7106:
URL: https://github.com/apache/iceberg/pull/7106#discussion_r1136891849
##########
spark/v3.3/spark/src/test/java/org/apache/iceberg/spark/TestFileRewriteCoordinator.java:
##########
@@ -97,7 +97,7 @@ public void testBinPackRewrite() throws NoSuchTableException,
IOException {
FileRewriteCoordinator rewriteCoordinator = FileRewriteCoordinator.get();
Set<DataFile> rewrittenFiles =
taskSetManager.fetchTasks(table, fileSetID).stream()
- .map(FileScanTask::file)
+ .map(t -> ((FileScanTask) t).file())
Review Comment:
```suggestion
.map(t -> t.asFileScanTask().file())
```
##########
spark/v3.3/spark/src/test/java/org/apache/iceberg/spark/TestFileRewriteCoordinator.java:
##########
@@ -243,7 +243,7 @@ public void testCommitMultipleRewrites() throws
NoSuchTableException, IOExceptio
Set<DataFile> rewrittenFiles =
fileSetIDs.stream()
.flatMap(fileSetID -> taskSetManager.fetchTasks(table,
fileSetID).stream())
- .map(FileScanTask::file)
+ .map(t -> ((FileScanTask) t).file())
Review Comment:
same as above
##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/SparkFilesScan.java:
##########
@@ -54,7 +54,7 @@ class SparkFilesScan extends SparkScan {
@Override
protected List<CombinedScanTask> taskGroups() {
if (tasks == null) {
- FileScanTaskSetManager taskSetManager = FileScanTaskSetManager.get();
Review Comment:
I agree that this PR should only be merged once 1.2.0 is officially out.
Also would be great to delete `FileScanTaskSetManager` as part of this PR
##########
spark/v3.3/spark/src/test/java/org/apache/iceberg/spark/TestFileRewriteCoordinator.java:
##########
@@ -167,7 +167,7 @@ public void testSortRewrite() throws NoSuchTableException,
IOException {
FileRewriteCoordinator rewriteCoordinator = FileRewriteCoordinator.get();
Set<DataFile> rewrittenFiles =
taskSetManager.fetchTasks(table, fileSetID).stream()
- .map(FileScanTask::file)
+ .map(t -> ((FileScanTask) t).file())
Review Comment:
```suggestion
.map(t -> t.asFileScanTask().file())
```
--
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]