shenh062326 commented on pull request #1819: URL: https://github.com/apache/hudi/pull/1819#issuecomment-669627457
It seems there are two implementations. (a) If we add new methods like below to HoodieRecordPayload, since HoodieRecordPayload is an interface, it will incompatible will custom payload implementations. ``` public Option<IndexedRecord> combineAndGetUpdateValue(IndexedRecord currentValue, Schema schema, PayloadConfig payloadConfig) public Option<IndexedRecord> getInsertValue(Schema schema, PayloadConfig payloadConfig) ``` (b) If we add this method to OverwriteWithLatestAvroPayload, when we call HoodieRecordPayload.combineAndGetUpdateValue and HoodieRecordPayload.getInsertValue, we need to check whether it's OverwriteWithLatestAvroPayload or not, if it's OverwriteWithLatestAvroPayload, we need to call getInsertValue(Schema schema, PayloadConfig payloadConfig); if it's not OverwriteWithLatestAvroPayload, we need to call getInsertValue(Schema schema). But there are many places will call HoodieRecordPayload.getInsertValue. ---------------------------------------------------------------- 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: us...@infra.apache.org