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


##########
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:
   Based on the changes in the patch, using `HoodieRecord` brings in a lot of 
intricate changes in write merging, buffered record mergers and deletes 
handling in mergers themself, making the bar very high to make the behavior 
correct and consistent among multiple engine, that I prefer we have a "change 
record" abstraction here to simply the things, or just use `BufferedRecord` 
because it is a very near abstaction and it has been widely used in merging 
now(just to name it better as a developer/user API).



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