You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/04/13 06:55:43 UTC

[GitHub] [hudi] yihua commented on a diff in pull request #4243: [HUDI-2952] Fixing metadata table for non-partitioned dataset

yihua commented on code in PR #4243:
URL: https://github.com/apache/hudi/pull/4243#discussion_r849140057


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -282,20 +284,22 @@ private static void processRollbackMetadata(HoodieActiveTimeline metadataTableTi
     List<HoodieRecord> records = new LinkedList<>();
     int[] fileChangeCount = {0, 0}; // deletes, appends
 
-    partitionToDeletedFiles.forEach((partition, deletedFiles) -> {
+    partitionToDeletedFiles.forEach((partitionName, deletedFiles) -> {
       fileChangeCount[0] += deletedFiles.size();
+      final String partition = partitionName.equals(EMPTY_PARTITION_NAME) ? NON_PARTITIONED_NAME : partitionName;

Review Comment:
   This has already been refactored into a util method.



-- 
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: commits-unsubscribe@hudi.apache.org

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