danny0405 commented on code in PR #13115:
URL: https://github.com/apache/hudi/pull/13115#discussion_r2036435707
##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/FileGroupRecordBuffer.java:
##########
@@ -275,43 +274,47 @@ protected Option<Pair<Option<T>, Map<String, Object>>>
doProcessNextDataRecord(T
} else {
switch (recordMergeMode) {
case COMMIT_TIME_ORDERING:
- return Option.empty();
+ return Option.of(Pair.of(Option.ofNullable(record), metadata));
case EVENT_TIME_ORDERING:
- Comparable existingOrderingValue = readerContext.getOrderingValue(
- existingRecordMetadataPair.getLeft(),
existingRecordMetadataPair.getRight(),
- readerSchema, orderingFieldName);
- if
(isDeleteRecordWithNaturalOrder(existingRecordMetadataPair.getLeft(),
existingOrderingValue)) {
- return Option.empty();
- }
- Comparable incomingOrderingValue = readerContext.getOrderingValue(
- Option.of(record), metadata, readerSchema, orderingFieldName);
- if (incomingOrderingValue.compareTo(existingOrderingValue) > 0) {
+ if (shouldKeepNewerRecord(existingRecordMetadataPair.getLeft(),
existingRecordMetadataPair.getRight(), Option.ofNullable(record), metadata)) {
return Option.of(Pair.of(Option.of(record), metadata));
}
return Option.empty();
Review Comment:
yes, the incomg record is never empty for data block.
--
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]