[ 
https://issues.apache.org/jira/browse/AVRO-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14047204#comment-14047204
 ] 

Hudson commented on AVRO-1474:
------------------------------

SUCCESS: Integrated in AvroJava #460 (See 
[https://builds.apache.org/job/AvroJava/460/])
AVRO-1474. C++ resolvind decoder doesn't work when reader schema has more 
fields than writer schema (thiru: rev 1606545)
* /avro/trunk/CHANGES.txt
* /avro/trunk/lang/c++/.gitignore
* /avro/trunk/lang/c++/CMakeLists.txt
* /avro/trunk/lang/c++/api/Generic.hh
* /avro/trunk/lang/c++/api/GenericDatum.hh
* /avro/trunk/lang/c++/api/Node.hh
* /avro/trunk/lang/c++/api/NodeImpl.hh
* /avro/trunk/lang/c++/api/Stream.hh
* /avro/trunk/lang/c++/build.sh
* /avro/trunk/lang/c++/examples/cpx.hh
* /avro/trunk/lang/c++/impl/Compiler.cc
* /avro/trunk/lang/c++/impl/Generic.cc
* /avro/trunk/lang/c++/impl/GenericDatum.cc
* /avro/trunk/lang/c++/impl/Stream.cc
* /avro/trunk/lang/c++/impl/avrogencpp.cc
* /avro/trunk/lang/c++/impl/parsing/ResolvingDecoder.cc
* /avro/trunk/lang/c++/impl/parsing/Symbol.cc
* /avro/trunk/lang/c++/impl/parsing/Symbol.hh
* /avro/trunk/lang/c++/impl/parsing/ValidatingCodec.cc
* /avro/trunk/lang/c++/jsonschemas/bigrecord
* /avro/trunk/lang/c++/jsonschemas/bigrecord_r
* /avro/trunk/lang/c++/test/AvrogencppTests.cc
* /avro/trunk/lang/c++/test/CodecTests.cc


> C++ resolvind decoder doesn't work when reader schema has more fields than 
> writer schema
> ----------------------------------------------------------------------------------------
>
>                 Key: AVRO-1474
>                 URL: https://issues.apache.org/jira/browse/AVRO-1474
>             Project: Avro
>          Issue Type: Bug
>          Components: c++
>    Affects Versions: 1.7.6
>            Reporter: Ramana Suvarapu
>            Assignee: Thiruvalluvan M. G.
>         Attachments: AVRO-1474-ENUM.patch, AVRO-1474-MAP.patch, 
> AVRO-1474-REUSE-RD.patch, AVRO-1474-ResolvingDecoder.patch, AVRO-1474.patch, 
> bigrecord, bigrecord_r, reader, writer
>
>
> When reader schema has more number of fields than writer schema, C++ 
> implementation of resolving decoder is throwing exception "throwing exception 
> "Don't know how to handle excess fields for reader.” with out checking 
> whether fields are optional or fields have default values.
> Attached are reader and writer schemas. Record in reader schema has 2 
> additional fields than writer schema. One field is required field but it has 
> default value and another one is optional field (union of null and string). 
> Since one has default value and another is optional both reader and writer 
> schemas are supposed to be compatible. 
>  
> {"name": "defaultField", "type": "string", "default": "DEFAULT", 
> "declared":"true"},     
> {"name": "optionalField", "type": ["string", "null"],"declared":"true"},
>  
> main()
> {
>   avro::ValidSchema readerSchema = load("reader.json");
>   avro::ValidSchema writerSchema = load("writer.json");
>   avro::DecoderPtr d = avro::resolvingDecoder(writerSchema, 
> readerSchema,avro::binaryDecoder());
> }
>  
> But when I tried to create resolving decoder, I am getting "Don't know how to 
> handle excess fields for reader.” But Java implementation works.  
> Also field ordering is not working. 
> The same issue is reported in AVRO-1360.



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

Reply via email to