lokeshj1703 commented on code in PR #13696:
URL: https://github.com/apache/hudi/pull/13696#discussion_r2265893434
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/format/cdc/CdcInputFormat.java:
##########
@@ -431,7 +453,13 @@ public void close() {
@SuppressWarnings("unchecked")
private Option<HoodieRecord<RowData>>
mergeRowWithLog(HoodieRecord<RowData> historyRecord, HoodieRecord<RowData>
newRecord) {
try {
- return recordMerger.merge(historyRecord, tableSchema, newRecord,
tableSchema, payloadProps).map(Pair::getLeft);
+ BufferedRecord<RowData> historyBufferedRecord =
BufferedRecord.forRecordWithContext(historyRecord, tableSchema,
readerContext.getRecordContext(), props, orderingFields);
+ BufferedRecord<RowData> newBufferedRecord =
BufferedRecord.forRecordWithContext(newRecord, tableSchema,
readerContext.getRecordContext(), props, orderingFields);
+ MergeResult<RowData> mergeResult =
recordMerger.finalMerge(historyBufferedRecord, newBufferedRecord);
+ RowData mergedRecord = mergeResult.getMergedRecord();
+ BufferedRecord<RowData> resultingBufferedRecord =
BufferedRecord.forRecordWithContext(mergedRecord, tableSchema,
readerContext.getRecordContext(),
+ orderingFields, historyRecord.getRecordKey(), mergedRecord ==
null);
+ return
Option.ofNullable(readerContext.getRecordContext().constructHoodieRecord(resultingBufferedRecord,
historyRecord.getPartitionPath()));
Review Comment:
Updated the PR
--
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]