danny0405 commented on a change in pull request #3285:
URL: https://github.com/apache/hudi/pull/3285#discussion_r674454632
##########
File path:
hudi-flink/src/main/java/org/apache/hudi/table/format/mor/MergeOnReadInputFormat.java
##########
@@ -615,24 +621,25 @@ public boolean reachedEnd() throws IOException {
while (logKeysIterator.hasNext()) {
final String curKey = logKeysIterator.next();
if (!keyToSkip.contains(curKey)) {
- Option<IndexedRecord> insertAvroRecord = getInsetValue(curKey);
+ final HoodieRecord<?> record = logRecords.get(curKey);
+ Option<IndexedRecord> insertAvroRecord = getInsetValue(record);
if (insertAvroRecord.isPresent()) {
// the record is a DELETE if insertAvroRecord not present, skipping
- GenericRecord requiredAvroRecord = buildAvroRecordBySchema(
+ GenericRecord avroRecord = buildAvroRecordBySchema(
insertAvroRecord.get(),
requiredSchema,
requiredPos,
recordBuilder);
- this.currentRecord = (RowData)
avroToRowDataConverter.convert(requiredAvroRecord);
+ this.currentRecord = (RowData)
avroToRowDataConverter.convert(avroRecord);
+
this.currentRecord.setRowKind(FormatUtils.getRowKind(insertAvroRecord.get(),
this.operationPos));
return false;
}
}
}
return true;
}
- private Option<IndexedRecord> getInsetValue(String curKey) throws
IOException {
- final HoodieRecord<?> record = logRecords.get(curKey);
+ private Option<IndexedRecord> getInsetValue(HoodieRecord<?> record) throws
IOException {
Review comment:
Seems unnecessary change.
--
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]