codope commented on code in PR #11893:
URL: https://github.com/apache/hudi/pull/11893#discussion_r1750653331
##########
hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java:
##########
@@ -951,28 +899,39 @@ private static Object
rewriteRecordWithNewSchemaInternal(Object oldRecord, Schem
for (int i = 0; i < fields.size(); i++) {
Schema.Field field = fields.get(i);
String fieldName = field.name();
- fieldNames.push(fieldName);
- Schema.Field oldField = oldSchema.getField(field.name());
- if (oldField != null && !renameCols.containsKey(field.name())) {
- newRecord.put(i,
rewriteRecordWithNewSchema(indexedRecord.get(oldField.pos()),
oldField.schema(), fields.get(i).schema(), renameCols, fieldNames, false));
+ if (skipMetadataFields && isMetadataField(fieldName)) {
Review Comment:
Why are we adding metadata field when `skipMetadataFields` is true?
--
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]