linliu-code commented on code in PR #12597:
URL: https://github.com/apache/hudi/pull/12597#discussion_r1931356013


##########
hudi-common/src/main/java/org/apache/hudi/common/model/OverwriteWithLatestMerger.java:
##########
@@ -31,9 +31,17 @@
  * Avro Merger that always chooses the newer record
  */
 public class OverwriteWithLatestMerger implements HoodieRecordMerger {
+  public static final OverwriteWithLatestMerger INSTANCE = new 
OverwriteWithLatestMerger();
 
   @Override
-  public Option<Pair<HoodieRecord, Schema>> merge(HoodieRecord older, Schema 
oldSchema, HoodieRecord newer, Schema newSchema, TypedProperties props) throws 
IOException {
+  public Option<Pair<HoodieRecord, Schema>> merge(HoodieRecord older,
+                                                  Schema oldSchema,
+                                                  HoodieRecord newer,
+                                                  Schema newSchema,
+                                                  TypedProperties props) 
throws IOException {
+    if (newer.isDelete(newSchema, props)) {

Review Comment:
   Because when I created the tests, without these changes, these tests could 
produce "unexpected result". E.g., without this, custom deleted records would 
be output, which contradicts with our intuition.



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