Davis-Zhang-Onehouse opened a new pull request, #12829:
URL: https://github.com/apache/hudi/pull/12829
### Change Logs
#### Issue 1
Previously for CommitMetadataSerDeV2 to handle the deserialization logic
this is how it works:
avro binary array
-> deserialize to hoodie commit metadata object of Avro auto generated
class, org.apache.hudi.avro.model.HoodieReplaceCommitMetadata
-> serialize to json binary
-> deserialize to commit metadata java pojo class object,
org.apache.hudi.common.model.HoodieCommitMetadata
conversion from Java POJO
It can be avoided as com.fasterxml.jackson.databind.ObjectMapper provides
API for direct conversion from Avro class to Java pojo class.
#### Issue 2
As we wrote comprehensive unit test, we found that the Avro class
definitions miss a few data members that are presented in the POJO class
definition. As a result, the value of those data members are lost at
serialization-deserialization process. Misleading the consumer to wrong
behavior.
The PR added those data members with documentations making it clear about
this POJO class definiton and Avro schema definition invariant.
### Impact
SerDe is more correct
### Risk level (write none, low medium or high below)
none
### Documentation Update
NA
### Contributor's checklist
- [ ] Read through [contributor's
guide](https://hudi.apache.org/contribute/how-to-contribute)
- [ ] Change Logs and Impact were stated clearly
- [ ] Adequate tests were added if applicable
- [ ] CI passed
--
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]