danny0405 commented on code in PR #19749:
URL: https://github.com/apache/hudi/pull/19749#discussion_r3868235781
##########
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieAvroRecordMerger.java:
##########
@@ -71,10 +71,11 @@ public <T> BufferedRecord<T> merge(BufferedRecord<T> older,
BufferedRecord<T> ne
if (updatedRecord == previousAvroData || updatedRecord ==
HoodieRecord.SENTINEL) {
return older;
}
- if (updatedRecord == newerAvroRecord) {
- // simply return the newer record instead of creating a new record
- return newer;
- }
+ // Do not short-circuit to `newer` when updatedRecord ==
newerAvroRecord. Some payloads
+ // (e.g. PostgresDebeziumAvroPayload's TOAST backfill via
mergeToastedValuesIfPresent)
Review Comment:
can we fix the payload instead of the merger, the payload should be
immutable IMO. Always creates a new payload if needed.
--
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]