the-other-tim-brown commented on code in PR #13742:
URL: https://github.com/apache/hudi/pull/13742#discussion_r2302445172
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieWriteMergeHandle.java:
##########
@@ -236,19 +236,19 @@ public boolean isEmptyNewRecords() {
return keyToNewRecords.isEmpty();
}
- protected boolean writeUpdateRecord(HoodieRecord<T> newRecord,
HoodieRecord<T> oldRecord, Option<HoodieRecord> combineRecordOpt, Schema
writerSchema) throws IOException {
+ protected boolean writeUpdateRecord(HoodieRecord<T> newRecord,
HoodieRecord<T> oldRecord, HoodieRecord combineRecord, Schema writerSchema)
throws IOException {
boolean isDelete = false;
- if (combineRecordOpt.isPresent()) {
- if (oldRecord.getData() != combineRecordOpt.get().getData()) {
- // the incoming record is chosen
- isDelete = isDeleteRecord(newRecord);
- } else {
- // the incoming record is dropped
- return false;
+ if (oldRecord.getData() != combineRecord.getData()) {
+ // the incoming record is chosen
+ isDelete = isDeleteRecord(combineRecord);
+ if (!isDelete) {
+ updatedRecordsWritten++;
}
- updatedRecordsWritten++;
+ } else {
+ // the incoming record is dropped
Review Comment:
This is just copying the old functionality, I don't have the context on the
original design
--
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]