You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "yihua (via GitHub)" <gi...@apache.org> on 2023/05/12 21:05:21 UTC

[GitHub] [hudi] yihua commented on a diff in pull request #8690: [WIP][HUDI-6199] Fix deletes with custom payload implementation

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


##########
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:
   Some payload may not want to leverage _hoodie_is_deleted.  Your code example will not allow this.



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org