avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From O. Reißig (JIRA) <j...@apache.org>
Subject [jira] [Created] (AVRO-1532) Field deletion not possible for ReflectData: NPE
Date Tue, 24 Jun 2014 06:58:29 GMT
O. Reißig created AVRO-1532:
-------------------------------

             Summary: Field deletion not possible for ReflectData: NPE
                 Key: AVRO-1532
                 URL: https://issues.apache.org/jira/browse/AVRO-1532
             Project: Avro
          Issue Type: Bug
          Components: java
    Affects Versions: 1.7.6
            Reporter: O. Reißig


*Actual behaviour:*
I have a field in my reflection-based schema like this:
{code}
@Nullable @AvroDefault('null')
Long someField
{code}

When removing this field, parsing the previous serialized blob yields NullPointerException:
{noformat}
Caused by: java.lang.NullPointerException
        at org.apache.avro.reflect.ReflectData.setField(ReflectData.java:128)
        at org.apache.avro.generic.GenericDatumReader.readField(GenericDatumReader.java:193)
        at org.apache.avro.reflect.ReflectDatumReader.readField(ReflectDatumReader.java:230)
        at org.apache.avro.generic.GenericDatumReader.readRecord(GenericDatumReader.java:183)
        at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:151)
        at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:155)
        at org.apache.avro.generic.GenericDatumReader.readMap(GenericDatumReader.java:256)
        at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:154)
        at org.apache.avro.generic.GenericDatumReader.readField(GenericDatumReader.java:193)
        at org.apache.avro.reflect.ReflectDatumReader.readField(ReflectDatumReader.java:230)
        at org.apache.avro.generic.GenericDatumReader.readRecord(GenericDatumReader.java:183)
        at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:151)
        at org.apache.avro.generic.GenericDatumReader.readMap(GenericDatumReader.java:256)
        at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:154)
        at org.apache.avro.generic.GenericDatumReader.readField(GenericDatumReader.java:193)
        at org.apache.avro.reflect.ReflectDatumReader.readField(ReflectDatumReader.java:230)
        at org.apache.avro.generic.GenericDatumReader.readRecord(GenericDatumReader.java:183)
        at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:151)
        at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:142)
        at org.apache.avro.file.DataFileStream.next(DataFileStream.java:233)
        at org.apache.avro.file.DataFileStream.next(DataFileStream.java:220)
{noformat}

*Expected behaviour:*
Field removal is crucial for schema evolution and must be possible with ReflectData.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message