nsivabalan commented on issue #6552: URL: https://github.com/apache/hudi/issues/6552#issuecomment-1240113529
yeah. Udit pointed out the right commit. here is the fix that worked out for me locally. ``` diff --git a/hudi-common/src/main/java/org/apache/hudi/common/model/AWSDmsAvroPayload.java b/hudi-common/src/main/java/org/apache/hudi/common/model/AWSDmsAvroPayload.java index 20a20fb629..a3c6dde99e 100644 --- a/hudi-common/src/main/java/org/apache/hudi/common/model/AWSDmsAvroPayload.java +++ b/hudi-common/src/main/java/org/apache/hudi/common/model/AWSDmsAvroPayload.java @@ -69,21 +69,21 @@ public class AWSDmsAvroPayload extends OverwriteWithLatestAvroPayload { @Override public Option<IndexedRecord> getInsertValue(Schema schema, Properties properties) throws IOException { - IndexedRecord insertValue = super.getInsertValue(schema, properties).get(); - return handleDeleteOperation(insertValue); + Option<IndexedRecord> insertValue = super.getInsertValue(schema, properties); + return insertValue.isPresent() ? handleDeleteOperation(insertValue.get()) : insertValue; } @Override public Option<IndexedRecord> getInsertValue(Schema schema) throws IOException { - IndexedRecord insertValue = super.getInsertValue(schema).get(); - return handleDeleteOperation(insertValue); + Option<IndexedRecord> insertValue = super.getInsertValue(schema); + return insertValue.isPresent() ? handleDeleteOperation(insertValue.get()) : insertValue; } @Override public Option<IndexedRecord> combineAndGetUpdateValue(IndexedRecord currentValue, Schema schema, Properties properties) throws IOException { - IndexedRecord insertValue = super.getInsertValue(schema, properties).get(); - return handleDeleteOperation(insertValue); + Option<IndexedRecord> insertValue = super.getInsertValue(schema, properties); + return insertValue.isPresent() ? handleDeleteOperation(insertValue.get()) : insertValue; } ``` -- 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-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org