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

Alexandre Normand commented on AVRO-1268:
-----------------------------------------

I thought I'd post a quick update. I have a working patch for at least the 
basic use case that got me interested in making this change (declaring a type 
with {{@java-class("java.math.BigDecimal")}} in a schema and have that used as 
the type in the generated sources). I added tests for that for the compiler 
portion and I've also confirmed it works in a real end-to-end use case but I 
have yet to add tests for the reader/writer changes. 

I also won't be submitting the patch until AVRO-1267 is committed because I 
rely on that change to have the {{@java-class}} be allowed in an IDL file.
                
> Add java-class support for stringable types to SpecificData
> -----------------------------------------------------------
>
>                 Key: AVRO-1268
>                 URL: https://issues.apache.org/jira/browse/AVRO-1268
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.7.4
>            Reporter: Alexandre Normand
>            Assignee: Alexandre Normand
>            Priority: Minor
>             Fix For: 1.7.5
>
>
> Stringable types are java classes that can be serialized through strings 
> (which require a single string constructor and a valid toString() 
> implementation). ReflectData currently has support from stringable types but 
> it would be desirable to get this feature with SpecificData. 
> The work involves changes to the SpecificCompiler (depends on {{@java-class}} 
> support in AVRO-1267) to generate the specific sources with the proper java 
> type as well as moving the ReflectDatumReader and ReflectDatumWriter to read 
> the java-class property. 

--
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