[jira] [Updated] (AVRO-1360) C++ Resolving decoder is not working when reader schema has more fields than writer schema
[ https://issues.apache.org/jira/browse/AVRO-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ramana Suvarapu updated AVRO-1360: -- Status: Open (was: Patch Available) This patch can't be applied to latest trunk. Lot of changes were introduced since creation of this patch. Also this JIRA can be closed as new JIRA is created to track this issue AVRO-1474 C++ resolvind decoder doesn't work when reader schema has more fields than writer schema > C++ Resolving decoder is not working when reader schema has more fields than > writer schema > -- > > Key: AVRO-1360 > URL: https://issues.apache.org/jira/browse/AVRO-1360 > Project: Avro > Issue Type: Bug > Components: c++ >Affects Versions: 1.7.4 >Reporter: Ramana Suvarapu >Assignee: Thiruvalluvan M. G. > Attachments: AVRO-1360-2.patch, AVRO-1360-3.patch, AVRO-1360-4.patch, > AVRO-1360-5.patch, AVRO-1360.patch, AVRO-RD.patch, callstack.txt, model.avsc, > testreader, testreader-1, testreader.hh, testwriter, testwriter-1, > testwriter.hh > > > 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. > > Can you please let us know if there are any other limitations with c++ > implementation of ResolvingDecoder? We are planning to use it in our project > and we want to make sure it works as per avro specification. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (AVRO-1360) C++ Resolving decoder is not working when reader schema has more fields than writer schema
[ https://issues.apache.org/jira/browse/AVRO-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ramana Suvarapu updated AVRO-1360: -- Attachment: model.avsc > C++ Resolving decoder is not working when reader schema has more fields than > writer schema > -- > > Key: AVRO-1360 > URL: https://issues.apache.org/jira/browse/AVRO-1360 > Project: Avro > Issue Type: Bug > Components: c++ >Affects Versions: 1.7.4 >Reporter: Ramana Suvarapu >Assignee: Thiruvalluvan M. G. > Attachments: AVRO-1360-2.patch, AVRO-1360-3.patch, AVRO-1360-4.patch, > AVRO-1360-5.patch, AVRO-1360.patch, AVRO-RD.patch, callstack.txt, model.avsc, > testreader, testreader-1, testreader.hh, testwriter, testwriter-1, > testwriter.hh > > > 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. > > Can you please let us know if there are any other limitations with c++ > implementation of ResolvingDecoder? We are planning to use it in our project > and we want to make sure it works as per avro specification. -- This message was sent by Atlassian JIRA (v6.1.4#6159)
[jira] [Updated] (AVRO-1360) C++ Resolving decoder is not working when reader schema has more fields than writer schema
[ https://issues.apache.org/jira/browse/AVRO-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thiruvalluvan M. G. updated AVRO-1360: -- Attachment: AVRO-1360-5.patch This patch fixes a typo and a related bug > C++ Resolving decoder is not working when reader schema has more fields than > writer schema > -- > > Key: AVRO-1360 > URL: https://issues.apache.org/jira/browse/AVRO-1360 > Project: Avro > Issue Type: Bug > Components: c++ >Affects Versions: 1.7.4 >Reporter: Ramana Suvarapu >Assignee: Thiruvalluvan M. G. > Attachments: AVRO-1360-2.patch, AVRO-1360-3.patch, AVRO-1360-4.patch, > AVRO-1360-5.patch, AVRO-1360.patch, AVRO-RD.patch, callstack.txt, testreader, > testreader-1, testreader.hh, testwriter, testwriter-1, testwriter.hh > > > 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. > > Can you please let us know if there are any other limitations with c++ > implementation of ResolvingDecoder? We are planning to use it in our project > and we want to make sure it works as per avro specification. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (AVRO-1360) C++ Resolving decoder is not working when reader schema has more fields than writer schema
[ https://issues.apache.org/jira/browse/AVRO-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thiruvalluvan M. G. updated AVRO-1360: -- Attachment: AVRO-1360-4.patch Ramana, I think the current patch fixes the problems you have been encountering. It caches most of its work. So a lot of repeated resolutions within a single schema should be fast. Please let us know whether you still have slowness issues. Thanks > C++ Resolving decoder is not working when reader schema has more fields than > writer schema > -- > > Key: AVRO-1360 > URL: https://issues.apache.org/jira/browse/AVRO-1360 > Project: Avro > Issue Type: Bug > Components: c++ >Affects Versions: 1.7.4 >Reporter: Ramana Suvarapu >Assignee: Thiruvalluvan M. G. > Attachments: AVRO-1360-2.patch, AVRO-1360-3.patch, AVRO-1360-4.patch, > AVRO-1360.patch, AVRO-RD.patch, callstack.txt, testreader, testreader-1, > testreader.hh, testwriter, testwriter-1, testwriter.hh > > > 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. > > Can you please let us know if there are any other limitations with c++ > implementation of ResolvingDecoder? We are planning to use it in our project > and we want to make sure it works as per avro specification. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (AVRO-1360) C++ Resolving decoder is not working when reader schema has more fields than writer schema
[ https://issues.apache.org/jira/browse/AVRO-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ramana Suvarapu updated AVRO-1360: -- Attachment: callstack.txt AVRO-RD.patch > C++ Resolving decoder is not working when reader schema has more fields than > writer schema > -- > > Key: AVRO-1360 > URL: https://issues.apache.org/jira/browse/AVRO-1360 > Project: Avro > Issue Type: Bug > Components: c++ >Affects Versions: 1.7.4 >Reporter: Ramana Suvarapu >Assignee: Thiruvalluvan M. G. > Attachments: AVRO-1360-2.patch, AVRO-1360-3.patch, AVRO-1360.patch, > AVRO-RD.patch, callstack.txt, testreader, testreader-1, testreader.hh, > testwriter, testwriter-1, testwriter.hh > > > 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. > > Can you please let us know if there are any other limitations with c++ > implementation of ResolvingDecoder? We are planning to use it in our project > and we want to make sure it works as per avro specification. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (AVRO-1360) C++ Resolving decoder is not working when reader schema has more fields than writer schema
[ https://issues.apache.org/jira/browse/AVRO-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thiruvalluvan M. G. updated AVRO-1360: -- Attachment: AVRO-1360-3.patch > C++ Resolving decoder is not working when reader schema has more fields than > writer schema > -- > > Key: AVRO-1360 > URL: https://issues.apache.org/jira/browse/AVRO-1360 > Project: Avro > Issue Type: Bug > Components: c++ >Affects Versions: 1.7.4 >Reporter: Ramana Suvarapu >Assignee: Thiruvalluvan M. G. > Attachments: AVRO-1360-2.patch, AVRO-1360-3.patch, AVRO-1360.patch, > testreader, testreader-1, testreader.hh, testwriter, testwriter-1, > testwriter.hh > > > 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. > > Can you please let us know if there are any other limitations with c++ > implementation of ResolvingDecoder? We are planning to use it in our project > and we want to make sure it works as per avro specification. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-1360) C++ Resolving decoder is not working when reader schema has more fields than writer schema
[ https://issues.apache.org/jira/browse/AVRO-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ramana Suvarapu updated AVRO-1360: -- Attachment: testwriter-1 > C++ Resolving decoder is not working when reader schema has more fields than > writer schema > -- > > Key: AVRO-1360 > URL: https://issues.apache.org/jira/browse/AVRO-1360 > Project: Avro > Issue Type: Bug > Components: c++ >Affects Versions: 1.7.4 >Reporter: Ramana Suvarapu >Assignee: Thiruvalluvan M. G. > Attachments: AVRO-1360-2.patch, AVRO-1360.patch, testreader, > testreader-1, testreader.hh, testwriter, testwriter-1, testwriter.hh > > > 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. > > Can you please let us know if there are any other limitations with c++ > implementation of ResolvingDecoder? We are planning to use it in our project > and we want to make sure it works as per avro specification. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-1360) C++ Resolving decoder is not working when reader schema has more fields than writer schema
[ https://issues.apache.org/jira/browse/AVRO-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ramana Suvarapu updated AVRO-1360: -- Attachment: testreader-1 > C++ Resolving decoder is not working when reader schema has more fields than > writer schema > -- > > Key: AVRO-1360 > URL: https://issues.apache.org/jira/browse/AVRO-1360 > Project: Avro > Issue Type: Bug > Components: c++ >Affects Versions: 1.7.4 >Reporter: Ramana Suvarapu >Assignee: Thiruvalluvan M. G. > Attachments: AVRO-1360-2.patch, AVRO-1360.patch, testreader, > testreader-1, testreader.hh, testwriter, testwriter.hh > > > 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. > > Can you please let us know if there are any other limitations with c++ > implementation of ResolvingDecoder? We are planning to use it in our project > and we want to make sure it works as per avro specification. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-1360) C++ Resolving decoder is not working when reader schema has more fields than writer schema
[ https://issues.apache.org/jira/browse/AVRO-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ramana Suvarapu updated AVRO-1360: -- Attachment: (was: reader.json) > C++ Resolving decoder is not working when reader schema has more fields than > writer schema > -- > > Key: AVRO-1360 > URL: https://issues.apache.org/jira/browse/AVRO-1360 > Project: Avro > Issue Type: Bug > Components: c++ >Affects Versions: 1.7.4 >Reporter: Ramana Suvarapu >Assignee: Thiruvalluvan M. G. > Attachments: AVRO-1360-2.patch, AVRO-1360.patch, testreader, > testreader.hh, testwriter, testwriter.hh > > > 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. > > Can you please let us know if there are any other limitations with c++ > implementation of ResolvingDecoder? We are planning to use it in our project > and we want to make sure it works as per avro specification. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-1360) C++ Resolving decoder is not working when reader schema has more fields than writer schema
[ https://issues.apache.org/jira/browse/AVRO-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ramana Suvarapu updated AVRO-1360: -- Attachment: (was: writer.json) > C++ Resolving decoder is not working when reader schema has more fields than > writer schema > -- > > Key: AVRO-1360 > URL: https://issues.apache.org/jira/browse/AVRO-1360 > Project: Avro > Issue Type: Bug > Components: c++ >Affects Versions: 1.7.4 >Reporter: Ramana Suvarapu >Assignee: Thiruvalluvan M. G. > Attachments: AVRO-1360-2.patch, AVRO-1360.patch, testreader, > testreader.hh, testwriter, testwriter.hh > > > 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. > > Can you please let us know if there are any other limitations with c++ > implementation of ResolvingDecoder? We are planning to use it in our project > and we want to make sure it works as per avro specification. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-1360) C++ Resolving decoder is not working when reader schema has more fields than writer schema
[ https://issues.apache.org/jira/browse/AVRO-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thiruvalluvan M. G. updated AVRO-1360: -- Attachment: AVRO-1360-2.patch Ramana, Great catch. The trouble was not in the resolver, but in the code generator. While resolving the user of {{ResolvingDecoder}} must adjust itself for field ordering. The generated code was not doing that. The new patch fixes it. Unfortunately, the generated code now becomes even larger than then the previous one. Thank you for testing it. > C++ Resolving decoder is not working when reader schema has more fields than > writer schema > -- > > Key: AVRO-1360 > URL: https://issues.apache.org/jira/browse/AVRO-1360 > Project: Avro > Issue Type: Bug > Components: c++ >Affects Versions: 1.7.4 >Reporter: Ramana Suvarapu >Assignee: Thiruvalluvan M. G. > Attachments: AVRO-1360-2.patch, AVRO-1360.patch, reader.json, > testreader, testreader.hh, testwriter, testwriter.hh, writer.json > > > 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. > > Can you please let us know if there are any other limitations with c++ > implementation of ResolvingDecoder? We are planning to use it in our project > and we want to make sure it works as per avro specification. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-1360) C++ Resolving decoder is not working when reader schema has more fields than writer schema
[ https://issues.apache.org/jira/browse/AVRO-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ramana Suvarapu updated AVRO-1360: -- Attachment: testwriter testreader testwriter.hh testreader.hh > C++ Resolving decoder is not working when reader schema has more fields than > writer schema > -- > > Key: AVRO-1360 > URL: https://issues.apache.org/jira/browse/AVRO-1360 > Project: Avro > Issue Type: Bug > Components: c++ >Affects Versions: 1.7.4 >Reporter: Ramana Suvarapu >Assignee: Thiruvalluvan M. G. > Attachments: AVRO-1360.patch, reader.json, testreader, testreader.hh, > testwriter, testwriter.hh, writer.json > > > 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. > > Can you please let us know if there are any other limitations with c++ > implementation of ResolvingDecoder? We are planning to use it in our project > and we want to make sure it works as per avro specification. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-1360) C++ Resolving decoder is not working when reader schema has more fields than writer schema
[ https://issues.apache.org/jira/browse/AVRO-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thiruvalluvan M. G. updated AVRO-1360: -- Status: Patch Available (was: Open) > C++ Resolving decoder is not working when reader schema has more fields than > writer schema > -- > > Key: AVRO-1360 > URL: https://issues.apache.org/jira/browse/AVRO-1360 > Project: Avro > Issue Type: Bug > Components: c++ >Affects Versions: 1.7.4 >Reporter: Ramana Suvarapu >Assignee: Thiruvalluvan M. G. > Attachments: AVRO-1360.patch, reader.json, writer.json > > > 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. > > Can you please let us know if there are any other limitations with c++ > implementation of ResolvingDecoder? We are planning to use it in our project > and we want to make sure it works as per avro specification. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-1360) C++ Resolving decoder is not working when reader schema has more fields than writer schema
[ https://issues.apache.org/jira/browse/AVRO-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thiruvalluvan M. G. updated AVRO-1360: -- Attachment: AVRO-1360.patch This patch enables AVRO C++ to handle schema resolution. > C++ Resolving decoder is not working when reader schema has more fields than > writer schema > -- > > Key: AVRO-1360 > URL: https://issues.apache.org/jira/browse/AVRO-1360 > Project: Avro > Issue Type: Bug > Components: c++ >Affects Versions: 1.7.4 >Reporter: Ramana Suvarapu >Assignee: Thiruvalluvan M. G. > Attachments: AVRO-1360.patch, reader.json, writer.json > > > 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. > > Can you please let us know if there are any other limitations with c++ > implementation of ResolvingDecoder? We are planning to use it in our project > and we want to make sure it works as per avro specification. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-1360) C++ Resolving decoder is not working when reader schema has more fields than writer schema
[ https://issues.apache.org/jira/browse/AVRO-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ramana Suvarapu updated AVRO-1360: -- Attachment: writer.json reader.json > C++ Resolving decoder is not working when reader schema has more fields than > writer schema > -- > > Key: AVRO-1360 > URL: https://issues.apache.org/jira/browse/AVRO-1360 > Project: Avro > Issue Type: Bug > Components: c++ >Affects Versions: 1.7.4 >Reporter: Ramana Suvarapu > Attachments: reader.json, writer.json > > > 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. > > Can you please let us know if there are any other limitations with c++ > implementation of ResolvingDecoder? We are planning to use it in our project > and we want to make sure it works as per avro specification. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira