avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Douglas Creager (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AVRO-727) Plethora of new accessors/mutators
Date Wed, 05 Jan 2011 22:00:51 GMT

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

Douglas Creager updated AVRO-727:

    Attachment: 0001-Plethora-of-new-accessor-mutator-methods.patch

Aforementioned patch

> Plethora of new accessors/mutators
> ----------------------------------
>                 Key: AVRO-727
>                 URL: https://issues.apache.org/jira/browse/AVRO-727
>             Project: Avro
>          Issue Type: Improvement
>          Components: c
>            Reporter: Douglas Creager
>            Assignee: Douglas Creager
>         Attachments: 0001-Plethora-of-new-accessor-mutator-methods.patch
> I'm attaching a patch that adds a slew of new accessor and mutators methods to the C
API.  I think this is basically complete — any useful piece of information about any of
the schema or datum types can now be retrieved and set.
> Some notes from the commit message:
>       - You can create the appropriate avro_datum_t instance for an
>         arbitrary schema with the new avro_datum_from_schema() function.
>         For records, this includes creating a datum instance for each of the
>         record's fields.  Arrays and maps are initially created empty, while
>         a union is created with none of its branches initially selected.
>         This prevents the function from going into an endless loop for
>         recursive schemas.
>       - The active branch of a union can now be changed.  If the desired
>         branch is already active, this has no result.  Otherwise, a new
>         avro_datum_t is created for the new branch.
>       - Map values can now be accessed by index as well as by key.  The
>         index of a map entry is based on the order that it was added to the
>         map.
>       - Enum values can be retrieved or set either by integer value or by
>         symbol name.
>     A couple of the new functions need access to the schema of a datum in
>     order to work.  These functions take in the schema instance as an extra
>     parameter.  A better solution might be to include a reference to a
>     schema object in each avro_datum_t instance.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message