danny0405 commented on code in PR #13384:
URL: https://github.com/apache/hudi/pull/13384#discussion_r2127776892


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/FileGroupRecordBuffer.java:
##########
@@ -289,9 +289,11 @@ protected Option<BufferedRecord<T>> 
doProcessNextDataRecord(BufferedRecord<T> ne
                 if (combinedRecordData != existingRecord.getRecord()) {
                   Pair<HoodieRecord, Schema> combinedRecordAndSchema = 
combinedRecordAndSchemaOpt.get();
                   return 
Option.of(BufferedRecord.forRecordWithContext(combinedRecordData, 
combinedRecordAndSchema.getRight(), readerContext, orderingFieldName, false));
+                } else {
+                  return Option.empty();
                 }
               }
-              return Option.empty();
+              return 
Option.of(BufferedRecord.forDeleteRecord(newRecord.getRecordKey(), 
newRecord.getOrderingValue()));

Review Comment:
   The delete record is handled specially in line 273, so that the 
`combinedRecordAndSchemaOpt` should always be present, if it is not, please fix 
the payload class itself or the merger impl instead of here.



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