Key takeaway
A default can make an old record readable without proving that the source observed the default value. Keep value origin with the decoded field.
Trace the value that appears during reading
A later reader displays review_status as unknown for an old record. That display alone leaves two possibilities: the original writer recorded unknown, or the reader supplied it because the field was absent. If the receiving package collapses those paths, an analyst can mistake a compatibility choice for a recorded business state.
Apache Avro’s record and schema-resolution rules describe a concrete version of this boundary. When the reader expects a field absent from the writer’s record, the reader field’s default can supply the value. That is different from the writer having encoded the field. The decision here is whether the export preserves that distinction across schema versions.
Complete a value-origin crosswalk
This hypothetical crosswalk has three source versions. Version W1 predates review_status. Version W2 explicitly writes unknown. Version W3 writes approved. Reader R2 supplies unknown when its field is missing from W1. The decoded text for W1 and W2 matches, but the evidence for the text differs.
Keep the original writer-schema identity and the reader-schema identity with the transformation record. A value-origin field can say source-written or reader-defaulted, while a separate reference identifies the rule. The labels in the table are an original proposed audit convention, not Avro fields that automatically appear in every decoded record.
| Hypothetical writer record | R2 decoded value | Origin to preserve | Permitted reading |
|---|---|---|---|
| W1: field absent | unknown | Reader default | No source-written review status |
| W2: unknown explicitly written | unknown | Source-written | Writer recorded unknown |
| W3: approved explicitly written | approved | Source-written | Writer recorded approved |
Do not transfer the word default between tools
Avro’s specification also says a record-field default does not make that field optional at encoding time. A developer must examine the writer and reader roles instead of assuming one default rule governs both. If a reader lacks a default for a field missing from the writer, the documented resolution rules describe an error rather than an invented value.
JSON Schema uses default as an annotation. Its documentation states that validation does not use that annotation to fill missing values, although other tools may use it as a hint. Consequently, a schema file containing default does not by itself explain why a receiving application inserted a value. The owner must identify the application step that did so.
Name the format, version, writer, reader and transformation in the evidence request. A field called default in a form builder, a validator and a binary-format reader may participate in different operations. Trace the observed pipeline; do not declare the package faithful merely because a schema contains a plausible replacement.
Test both matching text and different origins
Build an authorized synthetic fixture with the field absent, explicitly equal to the default, explicitly different and incompatible with the receiving type. Decode it using the actual writer/reader pairs under review. Check the output value and its retained origin separately. The absent and explicit-default cases must remain distinguishable if the proposed analysis relies on observed source behavior.
A later conversion to a flat table needs the same check. It may preserve the text and discard schema identities or provenance. Record where that loss occurs and whether the downstream use can tolerate it. If the use only needs a compatibility display, say so. If it estimates how often staff selected unknown, reader-defaulted rows cannot quietly become observations of that choice.
Resolve the analytical promise
For the fictional crosswalk, a count of all decoded unknown values would combine two different evidence states. A narrower report can count explicit source-written unknown values and report defaulted rows separately. It must also state which historical versions were checked; the existence of W1 does not prove all older records follow it.
Attach the crosswalk and unresolved version coverage to the inventory’s field description. A receiving evaluator can then ask for the appropriate provenance before a permissioned sample is considered. Compatibility is a useful engineering result. Whether a value represents an actual source observation remains a separate, inspectable claim.