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

Scott Carey commented on AVRO-1274:
-----------------------------------

I agree, don't hold this up.

It appears to be the proper abstraction for the job:  it does not leak 
implementation details and is more a Java definition of the Schema spec.  For 
example:

{code}
    public FieldBuilder optionalInt(String name, int defaultValue) {
      return new FieldBuilder(this, name, INT, true, toJsonNode(defaultValue));
    }
{code}
does not leak the JsonNode stuff out to the api, and requires that the default 
value is the proper type.   There may be some more work to do to reach all 
parts of the spec or aid ease of use (perhaps in another ticket), but if all 
uses are spec-compatible and type-safe, then it is extremely unlikely we'll 
need an API change to this at any point in the future unless it involves a 
corresponding spec change.


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