cdmikechen commented on issue #1073: [HUDI-377] Adding Delete() support to 
DeltaStreamer
URL: https://github.com/apache/incubator-hudi/pull/1073#issuecomment-568842868
 
 
   > > Is it also necessary to let `HoodieAvroPayload` support delete api too?
   > > 
https://github.com/apache/incubator-hudi/blob/8172197c353ff6cda491120c41b2d14b412ad709/hudi-common/src/main/java/org/apache/hudi/common/model/HoodieAvroPayload.java#L44
   > > 
   > > Maybe like this:
   > > ```java
   > >         Object deleteMarker = record.get().get("_hoodie_delete_marker");
   > >         if (deleteMarker instanceof Boolean && (boolean) deleteMarker) {
   > >           this.recordBytes = new byte[0];
   > >         } else {
   > >           this.recordBytes = HoodieAvroUtils.avroToBytes(record.get());
   > >         }
   > > ```
   > 
   > Don't think it is required. if I am not wrong, combineAndUpdate will make 
the payload empty.
   
   I ask your this question because I created a `MERGE_ON_READ` hudi table and 
found that hudi use `org.apache.hudi.common.model.HoodieAvroPayload` as payload 
class in `/.hoodie/hoodie.properties` and not `OverwriteWithLatestAvroPayload`.
   ```
   
hoodie.compaction.payload.class=org.apache.hudi.common.model.HoodieAvroPayload
   hoodie.table.name=brand_extension_areader
   hoodie.archivelog.folder=archived
   hoodie.table.type=MERGE_ON_READ
   hoodie.timeline.layout.version=1
   ```
    I remember in the old version (0.4.5? or older), hoodie use 
`HoodieAvroPayload` and didn't have `OverwriteWithLatestAvroPayload`. 
   So I think any class implements `HoodieRecordPayload` maybe support delete 
function. 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to