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/27 12:15:48 UTC

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

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


##########
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:
   @KnightChess  The partition path is created in the writeHandleFactory.create method. If the handle was created, an empty file has been created



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