the-other-tim-brown commented on code in PR #13444:
URL: https://github.com/apache/hudi/pull/13444#discussion_r2188532999
##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/FileGroupRecordBuffer.java:
##########
@@ -598,11 +638,13 @@ protected boolean hasNextLogRecord() {
while (logRecordIterator.hasNext()) {
BufferedRecord<T> nextRecordInfo = logRecordIterator.next();
if (!nextRecordInfo.isDelete()) {
- nextRecord = nextRecordInfo.getRecord();
+ BufferedRecord<T> convertedBufferedRecord =
applyOutputSchemaConversion(nextRecordInfo);
+ nextRecord = convertedBufferedRecord.getRecord();
+ callbackOption.ifPresent(callback ->
callback.onInsert(readerContext.constructHoodieRecord(convertedBufferedRecord)));
readStats.incrementNumInserts();
return true;
} else if (emitDelete) {
- nextRecord = readerContext.getDeleteRow(nextRecordInfo.getRecord(),
nextRecordInfo.getRecordKey());
+ nextRecord =
applyOutputSchemaConversion(readerContext.getDeleteRow(nextRecordInfo.getRecord(),
nextRecordInfo.getRecordKey()));
Review Comment:
The CDC only represents changes to the base file currently in Hudi. It does
not capture all the changes that happen so in the case of a delete that
happened only in the log files, we will have no changes to the base file and
don't need to output anything
--
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]