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


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieMetadataPayload.java:
##########
@@ -277,14 +277,25 @@ public static HoodieRecord<HoodieMetadataPayload> 
createPartitionListRecord(Coll
   public static HoodieRecord<HoodieMetadataPayload> 
createPartitionFilesRecord(String partition,
                                                                                
Map<String, Long> filesAdded,
                                                                                
List<String> filesDeleted) {
+    return createPartitionFilesRecord(partition, filesAdded, filesDeleted, 
false);
+  }
+
+  public static HoodieRecord<HoodieMetadataPayload> 
createPartitionFilesRecord(String partition,
+                                                                               
Map<String, Long> filesAdded,
+                                                                               
List<String> filesDeleted,
+                                                                               
boolean isPartitionDeleted) {
     String partitionIdentifier = 
getPartitionIdentifierForFilesPartition(partition);
+    HoodieKey key = new HoodieKey(partitionIdentifier, 
MetadataPartitionType.FILES.getPartitionPath());
+    if (isPartitionDeleted) {
+      return new HoodieAvroRecord<>(key, new 
HoodieMetadataPayload(Option.empty()));
+    }

Review Comment:
   If the partition is deleted, we still need to add `filesDeleted` as -1s in 
the metadata payload so that they are deleted in the metadata table files 
partition?



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