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

Tom White commented on AVRO-1274:
---------------------------------

I'm wondering if the correct way to do this is actually to have [null, T] for 
optional fields with no default:

{"name": "optionalBoolean", "type": [ "null", "boolean" ], "default": null}

and [T, null] when there is a non-null default:

{"name": "optionalBooleanWithDefault", "type": [ "boolean", "null" ], "default" 
: true}
                
> Add a schema builder API
> ------------------------
>
>                 Key: AVRO-1274
>                 URL: https://issues.apache.org/jira/browse/AVRO-1274
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Tom White
>            Assignee: Tom White
>         Attachments: AVRO-1274.patch, AVRO-1274.patch, AVRO-1274.patch, 
> AVRO-1274.patch, TestDefaults.patch
>
>
> It would be nice to have a fluent API that made it easier to construct record 
> schemas.

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