You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/04/22 05:52:06 UTC

[GitHub] [incubator-hudi] pratyakshsharma commented on a change in pull request #1538: [HUDI-803]: added more test cases in TestHoodieAvroUtils.class

pratyakshsharma commented on a change in pull request #1538:
URL: https://github.com/apache/incubator-hudi/pull/1538#discussion_r412689006



##########
File path: hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java
##########
@@ -214,7 +215,11 @@ private static GenericRecord rewrite(GenericRecord record, LinkedHashSet<Field>
     GenericRecord newRecord = new GenericData.Record(newSchema);
     for (Schema.Field f : fieldsToWrite) {
       if (record.get(f.name()) == null) {
-        newRecord.put(f.name(), f.defaultVal());
+        if (f.defaultVal() instanceof JsonProperties.Null) {

Review comment:
       This code change is exactly what @afilipchik did in his PR :) 
   
   I have just added some more test cases to be sure nothing breaks around default values. 




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org