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


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieMergedLogRecordReader.java:
##########
@@ -230,6 +242,34 @@ public void processNextRecord(T record, Map<String, 
Object> metadata) throws IOE
     }
   }
 
+  @Override
+  public void processNextRecordWithPosition(T record,
+                                            Map<String, Object> metadata,
+                                            int sequenceNo,
+                                            List<Integer> positions) throws 
IOException {
+    String key = (String) 
metadata.get(HoodieReaderContext.INTERNAL_META_RECORD_KEY);
+    int position = positions.get(sequenceNo);
+    // No position information is found for this record.
+    if (position < 0) {
+      throw new IOException("No position information is found for the record " 
+ key);
+    }
+
+    Pair<Option<T>, Map<String, Object>> existingRecordMetadataPair = 
positionToRecords.get(position);
+    if (existingRecordMetadataPair != null) {
+      HoodieRecord<T> combinedRecord = (HoodieRecord<T>) recordMerger.merge(
+          readerContext.constructHoodieRecord(Option.of(record), metadata, 
readerSchema),
+          readerSchema,
+          
readerContext.constructHoodieRecord(existingRecordMetadataPair.getLeft(), 
existingRecordMetadataPair.getRight(), readerSchema),
+          readerSchema,
+          this.getPayloadProps()).get().getLeft();

Review Comment:
   Is there any possibility we have inconsistency for payload event time 
handling and the `useEventOrdering` ? Can you elabirate the usage of flag 
`useEventOrdering` ?



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