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

Doug Cutting commented on AVRO-30:
----------------------------------

Currently we define classes and protocols with two separately specified parts, 
name and namespace, but we refer to them only with one, a name.

We should expand the reference to include both parts.  So one might define a 
field as
{code}
{"name": "foo", "type": "com.acme.Foo"}
{code}

Questions:
 # Should we also permit definitions with both parts?  E.g.
{"type": "record", "name":"com.acme.Foo"} instead of {"type": "record", "name": 
"Foo", "namespace":"com.acme"}
 # If so, should we eliminate the use of "namespace" altogether?

Regardless, unqualified names would always be in the namespace (if any) defined 
by their containing definition.  So usually, in a protocol, one need only 
specify the namespace in the top-level definition.  Note that this is 
include-friendly, since an included schema file should specify it's namespace 
in its top-level definition.

> name lookup should consider namespace
> -------------------------------------
>
>                 Key: AVRO-30
>                 URL: https://issues.apache.org/jira/browse/AVRO-30
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>            Reporter: Doug Cutting
>             Fix For: 1.0
>
>
> When a record schema is referred to by name, Avro will currently return any 
> known record definition with that name, regardless of its namespace.  
> Instead, unqualified references should refer to names in the current 
> namespace, and namespace-qualfied names should look for a record in the given 
> namespace.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to