jonvex commented on code in PR #11893:
URL: https://github.com/apache/hudi/pull/11893#discussion_r1750648240


##########
hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java:
##########
@@ -951,24 +899,36 @@ 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();
+          if (skipMetadataFields && isMetadataField(fieldName)) {
+            if (field.defaultVal() instanceof JsonProperties.Null) {
+              newRecord.put(i, null);
+            } else {
+              newRecord.put(i, field.defaultVal());
+            }
+            continue;

Review Comment:
   Not sure what you mean. Just put the rest of the stuff into an else block to 
make it less confusing 



-- 
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]

Reply via email to