danny0405 commented on code in PR #17669:
URL: https://github.com/apache/hudi/pull/17669#discussion_r2641866950
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieCDCLogger.java:
##########
@@ -275,7 +275,20 @@ private CDCTransformer getTransformer() {
}
private GenericRecord removeCommitMetadata(GenericRecord record) {
- return record == null ? null :
HoodieAvroUtils.rewriteRecordWithNewSchema(record, dataSchema.toAvroSchema(),
Collections.emptyMap());
+ return record == null ? null : getRecordWithoutMetadata(record);
+ }
+
+ private GenericRecord getRecordWithoutMetadata(GenericRecord record) {
Review Comment:
yes, we can do this because there is prerequisite that no fields reordering
or renaming, maybe we should check all the usages of
`HoodieAvroUtils.rewriteRecordWithNewSchema` and replace it with this more
performant way if it is the similiar use case.
--
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]