[
https://issues.apache.org/jira/browse/AVRO-1016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13201809#comment-13201809
]
Doug Cutting commented on AVRO-1016:
------------------------------------
A copy constructor would work if you want an exact copy of the field. I'd not
object to adding that. But if you're copying a field and manipulating parts of
it then a copy-constructor alone might not be sufficient.
Ideally we might have a builder API for Field and Schema, where each of these
could accept an existing instance as the base. Then you could do something
like:
new Builder(oldField).setName("foo").build();
But that seems beyond the scope of this issue.
> Expose aliases on Schema.Field
> ------------------------------
>
> Key: AVRO-1016
> URL: https://issues.apache.org/jira/browse/AVRO-1016
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.6.1
> Reporter: koert kuipers
> Priority: Trivial
> Fix For: 1.6.2
>
> Attachments: AVRO-1016.diff, AVRO-1016.patch
>
>
> If i create a copy of a Schema.Field using the constructor i lose the props
> and aliases. I can find out what the props are and add them back in using
> Schema.Field.props() but there is no way to find out the aliases. Can we also
> expose the aliases? Set<String> Schema.Field.aliases()?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira