danny0405 commented on a change in pull request #2430:
URL: https://github.com/apache/hudi/pull/2430#discussion_r556393067
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/model/OverwriteWithLatestAvroPayload.java
##########
@@ -79,6 +79,11 @@ public OverwriteWithLatestAvroPayload
preCombine(OverwriteWithLatestAvroPayload
* @returns {@code true} if record represents a delete record. {@code false}
otherwise.
*/
protected boolean isDeleteRecord(GenericRecord genericRecord) {
+ final String isDeleteKey = "_hoodie_is_deleted";
+ // Modify to be compatible with old version Avro.
+ if (genericRecord.getSchema().getField(isDeleteKey) == null) {
+ return false;
+ }
Object deleteMarker = genericRecord.get("_hoodie_is_deleted");
Review comment:
We should fix the logic for Avro version that higher than 1.10, because
the higher version throws directly if the field name does not exist in the
schema.
----------------------------------------------------------------
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]