codope commented on code in PR #12214:
URL: https://github.com/apache/hudi/pull/12214#discussion_r1832488430
##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieMetadataMergedLogRecordScanner.java:
##########
@@ -78,24 +78,27 @@ public Map<String, HoodieRecord> getRecords() {
@Override
public <T> void processNextRecord(HoodieRecord<T> newRecord) throws
IOException {
- // Merge the new record with the existing record in the map
- HoodieRecord<T> oldRecord = (HoodieRecord<T>)
records.get(newRecord.getRecordKey());
- if (oldRecord != null) {
- LOG.debug("Merging new record with existing record in the map. Key: {}",
newRecord.getRecordKey());
- recordMerger.fullOuterMerge(oldRecord, readerSchema, newRecord,
readerSchema, this.getPayloadProps()).forEach(
- mergedRecord -> {
- HoodieRecord<T> combinedRecord = mergedRecord.getLeft();
- if (combinedRecord.getData() != oldRecord.getData()) {
- HoodieRecord latestHoodieRecord =
getLatestHoodieRecord(newRecord, combinedRecord, newRecord.getRecordKey());
- records.put(newRecord.getRecordKey(), latestHoodieRecord.copy());
- }
- });
+ String key = newRecord.getRecordKey();
Review Comment:
I wanted to keep it simple for review. I can do it in this patch itself.
--
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]