[prev in list] [next in list] [prev in thread] [next in thread] 

List:       avro-dev
Subject:    [jira] [Commented] (AVRO-1400) Introduce annotation to specify default values
From:       "dennis lucero (JIRA)" <jira () apache ! org>
Date:       2013-11-25 9:18:35
Message-ID: JIRA.12678756.1384250062435.22954.1385371115812 () arcas
[Download RAW message or body]


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

dennis lucero commented on AVRO-1400:
-------------------------------------

An alternative fix instead of the suggested annotation would be to allow "default" \
for @AvroMeta with a change in org.apache.avro.Schema:344.

> Introduce annotation to specify default values
> ----------------------------------------------
> 
> Key: AVRO-1400
> URL: https://issues.apache.org/jira/browse/AVRO-1400
> Project: Avro
> Issue Type: Improvement
> Components: java
> Affects Versions: 1.7.5
> Reporter: dennis lucero
> Labels: annotation, features, reflection, schema
> 
> It would be nice if there was an annotation in org.apache.avro.reflect to specify \
> default values for schemata derived reflectively, allowing for proper schema \
> evolution. I suggest the following:
> {code:java}
> @AvroDefault(1)
> int someNum;
> @Nullable
> @AvroDefault(null)
> AnotherRecord myRec;
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic