deniskuzZ commented on code in PR #5052:
URL: https://github.com/apache/hive/pull/5052#discussion_r1562322335


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergTableUtil.java:
##########
@@ -328,4 +336,26 @@ public static PartitionData toPartitionData(StructLike 
key, Types.StructType key
     }
     return data;
   }
+
+  public static Pair<List<DataFile>, List<DeleteFile>> 
getDataAndDeleteFiles(Table table) {

Review Comment:
   you should be doing
   ````
       long startingSnapshotId = table.currentSnapshot().snapshotId();
       
       StructLikeMap<List<List<FileScanTask>>> fileGroupsByPartition =
       planFileGroups(startingSnapshotId);
   
       CloseableIterable<FileScanTask> fileScanTasks =
           table
               .newScan()
               .useSnapshot(startingSnapshotId)
               .filter(filter)
               .ignoreResiduals()
               .planFiles();
   ````
   see RewriteDataFilesSparkAction



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