n3nash commented on issue #2637: URL: https://github.com/apache/hudi/issues/2637#issuecomment-796552639
@Sugamber The `HoodieRecordPayload` provides 2 API's to perform custom merges 1) preCombine 2) combineAndGetUpdateValue Each of these API's is a callback that provides you with the `other payload`. In case of preCombine this could be another payload while performing an in-memory reduce by key operation while for combineAndGetUpdateValue, the payload provided in the callback is the latest one in storage. See an example here -> https://github.com/apache/hudi/blob/master/hudi-common/src/main/java/org/apache/hudi/common/model/OverwriteWithLatestAvroPayload.java#L50 This payload simply takes the latest payload, you could just add custom logic in above 2 methods and achieve desired behavior. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
