voonhous commented on code in PR #17581:
URL: https://github.com/apache/hudi/pull/17581#discussion_r2625662762
##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/utils/HiveAvroSerializer.java:
##########
@@ -493,12 +499,16 @@ private static void
copyOldValueOrSetDefault(GenericRecord oldRecord, GenericRec
Object newFieldValue;
if (fieldValue instanceof GenericRecord) {
GenericRecord record = (GenericRecord) fieldValue;
- newFieldValue = rewriteRecordIgnoreResultCheck(record,
AvroSchemaUtils.resolveUnionSchema(field.schema(),
record.getSchema().getFullName()));
+ HoodieSchema nonNullFieldSchema = field.schema().getNonNullType();
+ if (!Objects.equals(nonNullFieldSchema.getFullName(),
record.getSchema().getFullName())) {
Review Comment:
Moving this utility to HoodieSchemaUtils and adding tests.
--
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]