Atul Gupta created AVRO-2082: -------------------------------- Summary: org.apache.avro.file.DataFileWriter$AppendWriteException: org.apache.avro.UnresolvedUnionException: Not in union ["double","null"]: Key: AVRO-2082 URL: https://issues.apache.org/jira/browse/AVRO-2082 Project: Avro Issue Type: Bug Components: spec Environment: Avro , Spark , Eclipse Reporter: Atul Gupta
Please find below the procedure we followed to create avro file using spark. 1.Created JSON file for the schema available in table 2.Created List with JSON file 3.Created avro StructField by looping the above list using below code fields.add(DataTypes.createStructField(field.name().toLowerCase(),getDataTypeForAvro(field.schema()), true)); Issue: If the data type is numeric type(decimal or int) it is not accepting null value error message: Caused by: org.apache.avro.file.DataFileWriter$AppendWriteException: org.apache.avro.UnresolvedUnionException: Not in union ["double","null"]: -- This message was sent by Atlassian JIRA (v6.4.14#64029)