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] Created: (AVRO-751) Store schema reference in datum instances
Date Fri, 28 Jan 2011 17:24:43 GMT
Store schema reference in datum instances
-----------------------------------------

                 Key: AVRO-751
                 URL: https://issues.apache.org/jira/browse/AVRO-751
             Project: Avro
          Issue Type: Improvement
          Components: c
            Reporter: Douglas Creager
            Assignee: Douglas Creager
         Attachments: 0001-Store-schema-reference-in-datum-instances.patch

This is a patch that lets us keep track of which schema an avro_datum_t is an instance of.
 This is a breaking API change, but I think it makes the API simpler and more logical.  From
the commit message:

    We now keep track of which particular schema an avro_datum_t is an
    instance of.  For primitive values, there's only one possible schema,
    and so we don't store an explicit reference.  For compound values, the
    datum constructors now take in a schema parameter, which is stored in
    the avro_datum_t instance.  For records, enums, and fixeds, this means
    that we don't need to store the name of the schema type anymore, since
    we can get this from the schema.
    
    There were also several functions, which operate on datum instances,
    which needed to take in a schema parameter — avro_datum_to_json, as an
    example.  Those parameters aren't needed anymore, since the datum
    carries a reference to its own schema already.

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


Mime
View raw message