danny0405 commented on code in PR #13742:
URL: https://github.com/apache/hudi/pull/13742#discussion_r2299731466
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/BaseWriteHelper.java:
##########
@@ -161,8 +160,7 @@ protected static <T> HoodieRecord<T>
reduceRecords(TypedProperties props, Buffer
HoodieRecord<T> reducedRecord = merged.map(bufferedRecord ->
recordContext.constructHoodieRecord(bufferedRecord,
next.getPartitionPath())).orElse(previous);
boolean choosePrevious = merged.isEmpty();
HoodieKey reducedKey = choosePrevious ? previous.getKey() :
next.getKey();
- HoodieOperation operation = choosePrevious ? previous.getOperation() :
next.getOperation();
- return reducedRecord.newInstance(reducedKey, operation);
+ return reducedRecord.newInstance(reducedKey);
Review Comment:
The `recordContext.constructHoodieRecord(bufferedRecord,
next.getPartitionPath())` keeps the original operation of the hoodie record,
the operation is inferred from there which has the correct handling of
`isDelete`.
--
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]