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

Sharad Agarwal commented on AVRO-30:
------------------------------------

bq. Should we also permit definitions with both parts?
+1
bq.  If so, should we eliminate the use of "namespace" altogether?
+1. Removing only from type definitions. Top level we will still keep. Right?

On a related note, should we consider schema and protocol definitions within 
the same file ? Not directly related to this issue, but I thought to bring it 
up at this point. On rethinking I thought we can combine two into one, with 
extension say ".avro". This will also allow to have multiple types defined in 
single file, which is currently possible only in protocol definition. The 
format could look like:
{code}
{"namespace": "org.apache.avro.test",

 "types": [
     {"name": "TestRecord", "type": "record",
      "fields": [
          {"name": "name", "type": "string"}
      ]
     },
     {"name": "TestError", "type": "error", "fields": [
         {"name": "message", "type": "string"}
      ]
     }
 ],

 "messages": { "protocol": "Test",
     "hello": {
         "request": [{"name": "greeting", "type": "string"}],
         "response": "string"
     }
 }
}
{code}
Note I have just moved the protocol name under "messages" . Rest of the 
structure remains same.


> 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