You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Douglas Creager (JIRA)" <ji...@apache.org> on 2011/01/05 23:00:46 UTC

[jira] Created: (AVRO-727) Plethora of new accessors/mutators

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.


[jira] Commented: (AVRO-727) Plethora of new accessors/mutators

Posted by "Douglas Creager (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977997#action_12977997 ] 

Douglas Creager commented on AVRO-727:
--------------------------------------

Oh, and this patch might not apply cleanly unless the patch I submitted for AVRO-630 is applied, too.

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


[jira] Resolved: (AVRO-727) Plethora of new accessors/mutators

Posted by "Bruce Mitchener (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruce Mitchener resolved AVRO-727.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5.0

Apparently git am chokes when there is any fuzz ... hand applied again.


> 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
>             Fix For: 1.5.0
>
>         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.


[jira] Updated: (AVRO-727) Plethora of new accessors/mutators

Posted by "Douglas Creager (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Douglas Creager updated AVRO-727:
---------------------------------

    Attachment:     (was: 0001-Plethora-of-new-accessor-mutator-methods.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.


[jira] Commented: (AVRO-727) Plethora of new accessors/mutators

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978576#action_12978576 ] 

Doug Cutting commented on AVRO-727:
-----------------------------------

Matt, Bruce: could one of you please review this? Thanks!

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


[jira] Updated: (AVRO-727) Plethora of new accessors/mutators

Posted by "Douglas Creager (JIRA)" <ji...@apache.org>.
     [ 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

Updated patch with two additional accessors for record schemas.

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


[jira] Updated: (AVRO-727) Plethora of new accessors/mutators

Posted by "Douglas Creager (JIRA)" <ji...@apache.org>.
     [ 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.