nsivabalan commented on code in PR #8690:
URL: https://github.com/apache/hudi/pull/8690#discussion_r1192602586


##########
hudi-common/src/main/java/org/apache/hudi/common/model/debezium/AbstractDebeziumAvroPayload.java:
##########
@@ -91,4 +90,14 @@ private Option<IndexedRecord> 
handleDeleteOperation(IndexedRecord insertRecord)
   private Option<IndexedRecord> getInsertRecord(Schema schema) throws 
IOException {
     return super.getInsertValue(schema);
   }
+
+  @Override
+  protected boolean isDeleteRecord(GenericRecord record) {
+    return isDebeziumDeleteRecord(record) || super.isDeleteRecord(record);
+  }
+
+  private boolean isDebeziumDeleteRecord(GenericRecord record) {

Review Comment:
   should we introduce something like 
   ```
   isCustomDeleteRecord() 
   ```
   in BaseAbroPayload 
   which will by default return false. 
   
   And impl of IsDeleteRecord in BaseAvroPayload will be 
   ```
   protected boolean isDeleteRecord(GenericRecord record) {
       return isCustomDeleteRecord(record) || isDeleteRecordInternal(record);
     }
   ```
   
   I am just trying to avoid calling super.isDeleteRecord in every custom 
payload. 
   
   with this, every custom payload just needs to override isCustomDeleteRecord. 
   
   
   
   
   
   
   



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