alexeykudinkin commented on code in PR #7021:
URL: https://github.com/apache/hudi/pull/7021#discussion_r1024783255
##########
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieAvroRecord.java:
##########
@@ -133,23 +143,29 @@ public HoodieRecord updateMetadataValues(Schema
recordSchema, Properties props,
}
});
- return new HoodieAvroRecord<>(getKey(), new
RewriteAvroPayload(avroRecordPayload), getOperation());
+ return new HoodieAvroRecord<>(getKey(), new
RewriteAvroPayload(avroRecordPayload), getOperation(), this.currentLocation,
this.newLocation);
}
@Override
public HoodieRecord truncateRecordKey(Schema recordSchema, Properties props,
String keyFieldName) throws IOException {
GenericRecord avroRecordPayload = (GenericRecord)
getData().getInsertValue(recordSchema, props).get();
avroRecordPayload.put(keyFieldName, StringUtils.EMPTY_STRING);
- return new HoodieAvroRecord<>(getKey(), new
RewriteAvroPayload(avroRecordPayload), getOperation());
+ return new HoodieAvroRecord<>(getKey(), new
RewriteAvroPayload(avroRecordPayload), getOperation(), this.currentLocation,
this.newLocation);
}
@Override
public boolean isDelete(Schema recordSchema, Properties props) throws
IOException {
+ if (!(data instanceof HoodieAvroInsertValuePayload) && !(data instanceof
RewriteAvroPayload)) {
+ throw new HoodieException("We should deserialization before calling
isDelete");
Review Comment:
Why do we want to enforce 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]