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 2020/07/06 16:33:08 UTC

[GitHub] [hudi] vinothchandar commented on a change in pull request #1792: [HUDI-802] Fixing deletes for inserts in same batch in write path

vinothchandar commented on a change in pull request #1792:
URL: https://github.com/apache/hudi/pull/1792#discussion_r450343032



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/model/OverwriteWithLatestAvroPayload.java
##########
@@ -59,24 +59,28 @@ public OverwriteWithLatestAvroPayload preCombine(OverwriteWithLatestAvroPayload
 
   @Override
   public Option<IndexedRecord> combineAndGetUpdateValue(IndexedRecord currentValue, Schema schema) throws IOException {
+    return getInsertValue(schema);
+  }
 
-    Option<IndexedRecord> recordOption = getInsertValue(schema);
-    if (!recordOption.isPresent()) {
+  @Override
+  public Option<IndexedRecord> getInsertValue(Schema schema) throws IOException {

Review comment:
       Trying to understand what we are really fixing here... 
   If there were an insert and delete in the same batch, precombining favors delete, then we actually skip the record and not do the insert? 




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

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