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/10/25 14:59:20 UTC

[GitHub] [hudi] YannByron commented on a diff in pull request #6983: [HUDI-5031]Hudi merge into creates empty partition files when the sou…

YannByron commented on code in PR #6983:
URL: https://github.com/apache/hudi/pull/6983#discussion_r1004604859


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/execution/CopyOnWriteInsertHandler.java:
##########
@@ -69,9 +73,16 @@ public CopyOnWriteInsertHandler(HoodieWriteConfig config, String instantTime,
 
   @Override
   public void consumeOneRecord(HoodieInsertValueGenResult<HoodieRecord> payload) {
-    final HoodieRecord insertPayload = payload.record;
+    final HoodieRecord<T> insertPayload = payload.record;
     String partitionPath = insertPayload.getPartitionPath();
     HoodieWriteHandle<?,?,?,?> handle = handles.get(partitionPath);
+
+    Option<IndexedRecord> insertRecord = payload.insertValue;
+    // just skip the ignored record,do not make partitions on fs
+    if (insertRecord.isPresent() && insertRecord.get().equals(IGNORE_RECORD)) {

Review Comment:
   another suggestion: For all `HoodieWriteHandle`'s sub-classes, improve their `close` method to return an empty List<WriteStatus> if no records are written.
   @xushiyan WDYH?



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