deniskuzZ commented on code in PR #5328: URL: https://github.com/apache/hive/pull/5328#discussion_r1688268396
########## iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergOutputCommitter.java: ########## @@ -621,8 +617,13 @@ private void commitCompaction(Table table, long startTime, FilesForCommit result LOG.debug("Compacted full table with files {}", results); } else { // Single partition compaction - List<DataFile> existingDataFiles = IcebergTableUtil.getDataFiles(table, partitionSpecId, partitionPath); - List<DeleteFile> existingDeleteFiles = IcebergTableUtil.getDeleteFiles(table, partitionSpecId, partitionPath); + List<DataFile> existingDataFiles = partitionPath != null ? + IcebergTableUtil.getDataFiles(table, partitionSpecId, partitionPath) : + IcebergTableUtil.getDataFilesNotInSpec(table, partitionSpecId); + + List<DeleteFile> existingDeleteFiles = partitionPath != null ? + IcebergTableUtil.getDeleteFiles(table, partitionSpecId, partitionPath) : Review Comment: should we add extra param like `latestSpecOnly` in IcebergTableUtil.getDataFiles instead. of creating multiple methods? -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org