You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Atul Gupta (JIRA)" <ji...@apache.org> on 2017/09/26 08:17:00 UTC
[jira] [Created] (AVRO-2082)
org.apache.avro.file.DataFileWriter$AppendWriteException:
org.apache.avro.UnresolvedUnionException: Not in union ["double","null"]:
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)