Is it legal avro schema to have a name tie to different type in different record

2014-09-14 Thread Patrick Nip
Hi All, Is the following legal schema: { { metadata : { schema : { family : search, version : v1, attrs : [ srch ] } } }{ metadata : { schema : { family : UDB, version : v1, attrs : [ login, reg ] } } } } Note the

How to update an union field genericly

2014-09-14 Thread Patrick Nip
I am trying to use the c++ generic interface to update the following record: { type: record, namespace: com.abc.v1, name: “def, fields: [ { name: id, type: [ null, bytes ] } ] }

Re: How to update an union field genericly

2014-09-14 Thread Patrick Nip
Completed code sample: #include attributes.hh #include avro/Encoder.hh #include avro/Decoder.hh #include boost/algorithm/string.hpp #include boost/typeof/typeof.hpp #include iomanip #include vector #include fstream #include avro/Compiler.hh #include avro/Generic.hh #include