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


##########
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieAvroRecordMerger.java:
##########
@@ -66,4 +87,23 @@ private Option<IndexedRecord> 
combineAndGetUpdateValue(HoodieRecord older, Hoodi
   public HoodieRecordMerger asPreCombiningMode() {
     return HoodiePreCombineAvroRecordMerger.INSTANCE;
   }
+
+  /**
+   * If a record is valid, it means it tells the merger something meaningful.
+   * Otherwise, nothing meaningful.
+   */
+  private boolean isValid(Option<HoodieRecord> record) {
+    return record.isPresent()
+        && record.get().getRecordType() == HoodieRecordType.AVRO;
+  }
+
+  /**
+   * Check if a DELETE operation is intended.
+   */
+  private boolean isDelete(Option<HoodieRecord> record, Schema schema, 
TypedProperties props) throws IOException {

Review Comment:
   When we add "insert" method in the interface, the logic of the merger will 
be as simple as before. So we don't need these checks at all. 



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