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


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieMergedLogRecordScanner.java:
##########
@@ -110,6 +123,17 @@ protected <T> void processNextRecord(HoodieRecord<T> 
newRecord) throws IOExcepti
     }
   }
 
+  /**
+   * Processing time based delete is found when
+   * 1. The current record's metadata contains the flag: 
PROCESSING_TIME_BASED_DELETE_FOUND, or
+   * 2. The current record is a delete whose orderingVal is default value.
+   */
+  private <T> boolean hasProcessingTimeBasedDelete(HoodieRecord<T> record) 
throws IOException {
+    return (record.getMetadata().isPresent() && 
record.getMetaDataInfo(DELETE_FOUND_WITHOUT_ORDERING_VALUE).isPresent())
+        || (record.isDelete(readerSchema, getPayloadProps())
+        && record.getOrderingValue(readerSchema, 
getPayloadProps()).equals(orderingFieldDefault));
+  }

Review Comment:
   Similar here on making this into the merger or payload implementation.



##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieFileSliceReader.java:
##########
@@ -76,7 +77,12 @@ private boolean hasNextInternal() {
           nextRecord = currentRecord;
           return true;
         }
-        Option<Pair<HoodieRecord, Schema>> mergedRecordOpt =  
merger.merge(currentRecord, schema, logRecord.get(), schema, payloadProps);
+        if 
(logRecord.get().getMetaDataInfo(HoodieReaderContext.DELETE_FOUND_WITHOUT_ORDERING_VALUE).isPresent()

Review Comment:
   Similar here on using the record merger implementation to handle this 
consistently.



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