avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arvind Kalyan <bas...@gmail.com>
Subject Partial deserialization with schemas of different names
Date Sat, 28 Jun 2014 00:53:20 GMT
Hey folks,

How do we handle cases where the reader and writer record schemas have
different record names but their fields are in a is-a relationship with
slight differences in their fields.

For example:

    "type": "record",
    "name": "RecordA",
    "fields": [
        {"name": "a", "type": "string"},
        {"name": "b", "type": ["null", "long"]},
        {"name": "c", "type": {"type": "array", "items": "string"}}

    "type": "record",
    "name": "RecordB",
    "fields": [
        {"name": "a", "type": "string"}

In the above case, what's the best way to use RecordB for reading what was
written using RecordA?

Arvind Kalyan
cell: (408) 761-2030

View raw message