|
|
Koert Kuipers 2012-02-03, 21:57
I often find myself manipulating record schemas or creating new ones from the fields of existing ones in Java.
Now at first i just tried to re-use a field of an existing record schema in a new record schema, but no luck: i ran into the "Field already used" runtime exception. Apparently a field is aware of its position and does not like to be re-used because of that. For the same reason i assume Field.clone() or something like that will be of no use either.
I could create a copy myself using the Field constructor, however that way i lose the aliases and props. In avro 1.5.4 there is no way to get to these either.
Any suggestions? Thanks
+
Koert Kuipers 2012-02-03, 21:57
-
Re: re-use or copy a Field
Doug Cutting 2012-02-04, 00:26
On 02/03/2012 01:57 PM, Koert Kuipers wrote: > I could create a copy myself using the Field constructor, however that > way i lose the aliases and props. In avro 1.5.4 there is no way to get > to these either.
In Avro 1.6 there's Field#getProps() method but there's no getAliases().
Please file a bug, asking for this.
Thanks,
Doug
+
Doug Cutting 2012-02-04, 00:26
-
Re: re-use or copy a Field
Koert Kuipers 2012-02-04, 00:41
ok i will do thanks
On Fri, Feb 3, 2012 at 7:26 PM, Doug Cutting <[EMAIL PROTECTED]> wrote:
> On 02/03/2012 01:57 PM, Koert Kuipers wrote: > > I could create a copy myself using the Field constructor, however that > > way i lose the aliases and props. In avro 1.5.4 there is no way to get > > to these either. > > In Avro 1.6 there's Field#getProps() method but there's no getAliases(). > > Please file a bug, asking for this. > > Thanks, > > Doug >
+
Koert Kuipers 2012-02-04, 00:41
|
|
All projects made searchable here are trademarks of the Apache Software Foundation.
Service operated by
Sematext