nsivabalan commented on code in PR #5030:
URL: https://github.com/apache/hudi/pull/5030#discussion_r1000139459


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieMergedLogRecordScanner.java:
##########
@@ -123,25 +133,24 @@ public long getNumMergedRecordsInLog() {
     return numMergedRecordsInLog;
   }
 
-  /**
-   * Returns the builder for {@code HoodieMergedLogRecordScanner}.
-   */
-  public static HoodieMergedLogRecordScanner.Builder newBuilder() {
-    return new Builder();
-  }
-
   @Override
   protected void processNextRecord(HoodieRecord<? extends HoodieRecordPayload> 
hoodieRecord) throws IOException {
     String key = hoodieRecord.getRecordKey();
     if (records.containsKey(key)) {
       // Merge and store the merged record. The HoodieRecordPayload 
implementation is free to decide what should be
       // done when a delete (empty payload) is encountered before or after an 
insert/update.
-
-      HoodieRecord<? extends HoodieRecordPayload> oldRecord = records.get(key);
-      HoodieRecordPayload oldValue = oldRecord.getData();
-      HoodieRecordPayload combinedValue = 
hoodieRecord.getData().preCombine(oldValue);
-      // If combinedValue is oldValue, no need rePut oldRecord
-      if (combinedValue != oldValue) {
+      HoodieRecord<? extends HoodieRecordPayload> storeRecord = 
records.get(key);
+      HoodieRecordPayload storeValue = storeRecord.getData();
+      HoodieRecordPayload combinedValue;
+      // If revertLogFile = false, storeRecord is the old record.
+      // If revertLogFile = true, incoming data (hoodieRecord) is the old 
record.
+      if (!revertLogFile) {

Review Comment:
   can we close the patch then since we can't generalize. 



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