danny0405 commented on code in PR #13742:
URL: https://github.com/apache/hudi/pull/13742#discussion_r2302685967


##########
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieRecordMerger.java:
##########
@@ -63,8 +63,15 @@ public interface HoodieRecordMerger extends Serializable {
    * It'd be associative operation: f(a, f(b, c)) = f(f(a, b), c) (which we 
can translate as having 3 versions A, B, C
    * of the single record, both orders of operations applications have to 
yield the same result)
    * This method takes only full records for merging.
+   *
+   * @param older     Older record in terms of commit time ordering.
+   * @param oldSchema The schema of the older record.
+   * @param newer     Newer record in terms of commit time ordering.
+   * @param newSchema The schema of the newer record.
+   * @param props     The additional properties for the merging operation.
+   * @return The merged record and schema. The record is expected to be 
non-null. If the record represents a deletion, the operation must be set as 
{@link HoodieOperation#DELETE}.
    */
-  Option<Pair<HoodieRecord, Schema>> merge(HoodieRecord older, Schema 
oldSchema, HoodieRecord newer, Schema newSchema, TypedProperties props) throws 
IOException;
+  Pair<HoodieRecord, Schema> merge(HoodieRecord older, Schema oldSchema, 
HoodieRecord newer, Schema newSchema, TypedProperties props) throws IOException;

Review Comment:
   > there is no way to currently pass in the payload information to the 
HoodieAvroRecordMerger
   
   We can, just let the T in BufferedRecord be the payload instance? For 
HoodieRecord, we did the similiar thing, the T can be eigher engine row or a 
payload instance. If we assume all the buffered records takes payload instance 
for payload based merging, it should work. It's just that we can not have a 
generic type T on the params `BufferedRecord`.



-- 
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]

Reply via email to