lasdf1234 commented on code in PR #11219:
URL: https://github.com/apache/gravitino/pull/11219#discussion_r3322746158


##########
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/CatalogWrapperForREST.java:
##########
@@ -454,62 +454,26 @@ public PlanTableScanResponse planTableScan(
         return cachedResponse.get();
       }
 
-      List<String> planTasks = new ArrayList<>();
-      Map<Integer, PartitionSpec> specsById = new HashMap<>();
-      List<DeleteFile> deleteFiles = new ArrayList<>();
+      List<FileScanTask> fileScanTasksList = new ArrayList<>();
 
       try (CloseableIterable<FileScanTask> fileScanTasks =
           createFilePlanScanTasks(table, tableIdentifier, scanRequest)) {
         for (FileScanTask fileScanTask : fileScanTasks) {
-          try {
-            String taskString = ScanTaskParser.toJson(fileScanTask);
-            planTasks.add(taskString);
-
-            int specId = fileScanTask.spec().specId();
-            if (!specsById.containsKey(specId)) {
-              specsById.put(specId, fileScanTask.spec());
-            }
-
-            if (!fileScanTask.deletes().isEmpty()) {
-              deleteFiles.addAll(fileScanTask.deletes());
-            }
-          } catch (Exception e) {
-            throw new RuntimeException(
-                String.format(
-                    "Failed to serialize scan task for table: %s. Error: %s",
-                    tableIdentifier, e.getMessage()),
-                e);
-          }
+          fileScanTasksList.add(fileScanTask);

Review Comment:
   Got, use fileScanTasks and scanTasks instead of old vairable names.



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

Reply via email to