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/20 16:03:15 UTC

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

pratyakshsharma commented on issue #1538:
URL: https://github.com/apache/incubator-hudi/pull/1538#issuecomment-616649362


   Few observations related to issues we have faced recently: 
   
   1. If we specify \"default\": null in string schema for a field or specify NullNode.getInstance() for default value when defining a field and then invoke field.defaultValue(), it returns a NullNode instance which in turn gives JsonProperties.Null instance when field.defaultVal() is invoked. 
   When we try to validate such a record in rewrite() function in HoodieAvroUtils class, the validate function internally tries to resolve a union type schema. At this point JsonProperties.Null type value is not handled. Rest of the data types are handled. 
   
   Rest all the cases, defaultVal() either returns proper data type or it comes as null i.e defaultValue variable of Field class is 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.

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