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

ASF subversion and git services commented on AVRO-2143:
-------------------------------------------------------

Commit e0ab6bd54ab632569782a577b7e9a1d419e08845 in avro's branch 
refs/heads/master from Pedro Carneiro
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=e0ab6bd ]

AVRO-2302 Fix invalid namespace on BigQuery import

This change fixes an issue when importing Avro files into BigQuery, when
such files have been generated using `ProtobufData`. The schema
namespace may end in a dollar sign, if using nested classes.

The correction piggybacks on the fix provided for AVRO-2143 (#283). In
it, `SpecificData` will attempt to load a class joining the namespace
and the name with a dot, and if that fails, it tries again with a dollar
sign.

The same behaviour is hereby reused for `ProtobufData`.


> ReflectData should determine inner class names in a different way.
> ------------------------------------------------------------------
>
>                 Key: AVRO-2143
>                 URL: https://issues.apache.org/jira/browse/AVRO-2143
>             Project: Apache Avro
>          Issue Type: Improvement
>    Affects Versions: 1.7.7
>            Reporter: Miguel
>            Assignee: Doug Cutting
>            Priority: Major
>             Fix For: 1.9.0
>
>
> I used ReflectData to generate schemas containing inner classes. These 
> classes were named automatically by ReflectData with dollar ('$'), with, for 
> example com.company.avro.House$Type. Nevertheless @AvroAlias does not support 
> aliases containing '$' in names. In particulr, it fails in validateName in 
> Schema core class. The failure is correct given that AVRO name specs does 
> notinclude the '$' symbol. 
> I suppose that ReflectData should, for example, generate inner class names in 
> a different way, such as replacing '$' by dots ('.'), or it should fail.
> And a detail: Although I cannot add aliases with '$', I can still encode and 
> decode such objects and inner classes using that schema. 
> I think that it newer versions it is also happening.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to