avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Hunt <ph...@apache.org>
Subject Re: Why do named schemas have namespaces?
Date Mon, 16 Nov 2009 19:51:07 GMT
Re 153 - last night I noticed that if you spec a record/enum/etc... with 
a name that starts with lower case it fails to compile in Java:

* start with [A-Za-z_]

Add this to 153 or a new JIRA?


Doug Cutting wrote:
> Jeff Hammerbacher wrote:
>> In the Avro spec, namespaces are defined for protocols, but not for named
>> schemas. Yet in both the Java and Python codebases, it appears that 
>> schemas
>> can have a namespace. Should the code be removed, or the spec be updated?
> The spec should be updated.  Schemas can specify a namespace.  If 
> they're nested in another schema or protocol then the namespace defaults 
> to the namespace of the containing schema or protocol.
> Another thing that should be updated in the spec is that a name can be 
> namespace-qualified.  This is useful to refer to types in a different 
> namespace, e.g., a field like:
>   {"name": "foo", "type": "org.apache.hadoop.util.MD5"}
> This is related to https://issues.apache.org/jira/browse/AVRO-153.
> The spec currently prohibits dots in identifiers.  We should clarify 
> that dots are permitted in namespaces, and that, if present in a name, 
> the last dot separates the name from the namespace.
> Doug

View raw message