Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro >> mail # user >> Properties on union schema?


Copy link to this message
-
Re: Properties on union schema?
Hi Doug,

Thanks for the explanation.
How far back is it reasonable to maintain backward and/or forward
compatibility?

Assuming there is a limit to the forward compatibility requirement, could
we introduce the ability to read schemas with extended union descriptors,
without the ability to write such descriptors, and introduce the ability to
write after enough releases have passed?

Thanks,
C.
On Mon, Jul 15, 2013 at 11:25 AM, Doug Cutting <[EMAIL PROTECTED]> wrote:

> The reason is simply that the JSON syntax for union schemas doesn't
> permit properties.  To support properties we'd need to add an
> alternate syntax for unions, but I don't see how to do that
> compatibly, so that an old client seeing one of the new union schemas
> would still be able to process the data.
>
> For example, the syntax might be something like:
>
> {"type":"union", "branches":[...], "prop1":"val1", ...}
>
> But that would cause errors in every existing implementation.
>
> Doug
>
> On Sat, Jul 13, 2013 at 7:01 PM, Christophe Taton <[EMAIL PROTECTED]>
> wrote:
> > Hi,
> > I'm toying with a few changes to provide alternative representations of
> > union fields in Java (somewhat related to
> > https://issues.apache.org/jira/browse/AVRO-248).
> > To experiment with this, I'd like to set properties on union schemas, but
> > properties are currently disabled on unions.
> > Is there a particular reason for this, or is it a reasonable change to
> allow
> > properties on unions?
> > Thanks,
> > C.
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB