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

Philip Zeyliger commented on AVRO-1296:
---------------------------------------

Jeremy,

Thanks for your contribution!  I've committed it to trunk.  Sorry 'bout the 
delay.

{code}
[0]cairn::avro-svn(480326)$svn commit
Sending        CHANGES.txt
Sending        lang/py/src/avro/protocol.py
Sending        lang/py/src/avro/schema.py
Sending        lang/py/test/test_protocol.py
Transmitting file data ....
Committed revision 1470635.
{code}
                
> Python: schemas retrieved from protocol types ignore namespace
> --------------------------------------------------------------
>
>                 Key: AVRO-1296
>                 URL: https://issues.apache.org/jira/browse/AVRO-1296
>             Project: Avro
>          Issue Type: Bug
>          Components: python
>    Affects Versions: 1.7.4
>            Reporter: Jeremy Kahn
>            Assignee: Jeremy Kahn
>             Fix For: 1.7.5
>
>         Attachments: AVRO-1296a.patch, AVRO-1296b.patch
>
>
> If I parse a protocol {{p}} using {{avro.protocol.parse}}, which defines 
> {{"namespace": "ns"}} and then retrieve a child schema {{s}} from the 
> protocol's {{proto.types}} (or {{proto.types_dict}}), then {{s}} does not 
> have its namespace set (to {{ns}}), even if {{p}} has a namespace.
> This is particularly problematic if I'm using {{s}} to write out an avro file 
> intended to be read by a specific-type reader, because the file header will 
> claim to be objects of type {{s}} (not {{ns.s}}, as expected).
> I've attached two patches: one that makes sure that the {{namespace}} 
> property of protocol types is set to the default namespace of the protocol 
> when not otherwise set.
> The second patch ensures that the {{namespace}} is *not* rendered into JSON 
> when a default protocol specifies the right value already.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to