avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clément MAHTIEU (JIRA) <j...@apache.org>
Subject [jira] [Updated] (AVRO-1628) Add Schema.createUnion(Schema... type)
Date Mon, 12 Jan 2015 23:32:34 GMT

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

Clément MAHTIEU updated AVRO-1628:
----------------------------------
    Attachment: AVRO-1628.patch

Thanks for the review. I updated the patch taking your suggestion into account.

> Add Schema.createUnion(Schema... type)
> --------------------------------------
>
>                 Key: AVRO-1628
>                 URL: https://issues.apache.org/jira/browse/AVRO-1628
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: Clément MAHTIEU
>            Priority: Trivial
>         Attachments: AVRO-1628.patch, AVRO-1628.patch
>
>
> Quite often, when I declare mapreduce jobs I have to create the union of two or three
schemas. For example:
> {code}
> AvroJob.setMapOutputKeySchema(job, Schema.createUnion(Arrays.asList(Foo.SCHEMA$, Bar.SCHEMA$))
> {code}
> Having Schema.createUnion only accept a List hurts readability and force users to write
boilerplate code for such trivial, but I believe common, use cases. It would be create to
add {{Schema.createUnion(Schema... type)}} 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message