minihippo commented on code in PR #5629:
URL: https://github.com/apache/hudi/pull/5629#discussion_r903861647
##########
hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java:
##########
@@ -436,14 +444,18 @@ public static GenericRecord removeFields(GenericRecord
record, List<String> fiel
private static void copyOldValueOrSetDefault(GenericRecord oldRecord,
GenericRecord newRecord, Schema.Field field) {
Schema oldSchema = oldRecord.getSchema();
- Object fieldValue = oldSchema.getField(field.name()) == null ? null :
oldRecord.get(field.name());
+ Field oldSchemaField = oldSchema.getField(field.name());
+ Object fieldValue = oldSchemaField == null ? null :
oldRecord.get(field.name());
Review Comment:
final name = null?
--
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]