avro-writer-reader-dual-schema-resolution

Status: IN

AvroDecoder always requires both a writer schema (to parse the wire bytes) and a reader schema (to shape the output); this dual-schema resolution is Avro's core mechanism for schema evolution.

Source: entries/2026/05/29/avro-serializer-avro_serializer.md

Example

def _resolve_record(self, writer_schema, reader_schema, data):
    # match fields by name, apply defaults for missing reader fields
    for rf in reader_fields:
        if rf["name"] in writer_data:
            result[rf["name"]] = writer_data[rf["name"]]
        elif "default" in rf:
            result[rf["name"]] = rf["default"]

JSON