You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "nastra (via GitHub)" <gi...@apache.org> on 2023/03/15 11:16:14 UTC

[GitHub] [iceberg] nastra commented on a diff in pull request #7106: Spark 3.3: Remove use of deprecated SparkFilesScan

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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org