[
https://issues.apache.org/jira/browse/HUDI-8840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lin Liu updated HUDI-8840:
--------------------------
Status: Patch Available (was: In Progress)
> Support custom delete marker in EVENT_TIME_ORDERING merge mode
> --------------------------------------------------------------
>
> Key: HUDI-8840
> URL: https://issues.apache.org/jira/browse/HUDI-8840
> Project: Apache Hudi
> Issue Type: Sub-task
> Reporter: Y Ethan Guo
> Assignee: Lin Liu
> Priority: Blocker
> Labels: pull-request-available
> Fix For: 1.0.1
>
> Original Estimate: 16h
> Remaining Estimate: 16h
>
> Relevant logic of delete marker in DefaultHoodieRecordPayload
> {code:java}
> protected boolean isDeleteRecord(GenericRecord genericRecord, Properties
> properties) {
> final String deleteKey = properties.getProperty(DELETE_KEY);
> if (StringUtils.isNullOrEmpty(deleteKey)) {
> return isDeleteRecord(genericRecord);
> }
>
> ValidationUtils.checkArgument(!StringUtils.isNullOrEmpty(properties.getProperty(DELETE_MARKER)),
> () -> DELETE_MARKER + " should be configured with " + DELETE_KEY);
> // Modify to be compatible with new version Avro.
> // The new version Avro throws for GenericRecord.get if the field name
> // does not exist in the schema.
> if (genericRecord.getSchema().getField(deleteKey) == null) {
> return false;
> }
> Object deleteMarker = genericRecord.get(deleteKey);
> return deleteMarker != null &&
> properties.getProperty(DELETE_MARKER).equals(deleteMarker.toString());
> } {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)