You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2010/03/02 22:07:27 UTC

[jira] Updated: (AVRO-432) add java annotation to specify arbitrary schema

     [ https://issues.apache.org/jira/browse/AVRO-432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated AVRO-432:
------------------------------

    Attachment: AVRO-432.patch

Here's a new version with tests.

> add java annotation to specify arbitrary schema
> -----------------------------------------------
>
>                 Key: AVRO-432
>                 URL: https://issues.apache.org/jira/browse/AVRO-432
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>    Affects Versions: 1.3.0
>            Reporter: Doug Cutting
>            Assignee: Doug Cutting
>             Fix For: 1.3.1
>
>         Attachments: AVRO-432.patch, AVRO-432.patch, AVRO-432.patch
>
>
> HDFS now includes a class (HdfsFileStatus) with a field (symlink) whose type is byte[] but which is null for non-symlinks.  For most other types, we could annotate this with something like @Union({Void.class, Foo.class}) to declare that the field may be null.  But there is unfortunately no way to refer to the class of byte[] in an annotation.  So, instead, I propose to add an annotation that permits the specification of an arbitrary schema.  In this case, the annotation would then be @AvroSchema("[\"null\",\bytes\"").

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