Commits

Douglas Adam Creager authored 7f0c2f36e04
AVRO-762. C: Better schema resolution This patch adds a new class that implements Avro's schema resolution rules. Before, the writer and reader schemas were resolved each time a datum was read from an Avro file. Now, we can examine the two schemas before reading and data values, and "remember" the resolution result in a tree of avro_resolver_t objects. The avro_resolver_new function creates this tree of resolvers. The result is an instance of a generic "consumer" interface, which is an abstract API for consuming Avro data that conforms to some writer schema. In this case, the resolver implementation of the consumer API fills in an avro_datum_t that conforms to the reader schema, promoting data and dropping fields as necessary. The avro_consume_binary function takes care of parsing the Avro binary encoding, passing off the data that it reads in to a consumer. We currently don't support the AVRO_LINK schema type; we'll need to add some memoization to handle recursive schemas properly. git-svn-id: https://svn.apache.org/repos/asf/avro/trunk@1074612 13f79535-47bb-0310-9956-ffa450edef68