avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeno I. Hajdu" <jeno.i.ha...@gmail.com>
Subject Alternative use of record field default values?
Date Mon, 11 Aug 2014 19:33:25 GMT
Hi,

my understanding of the field default values (based on the spec) is that it
is solely for filling in fields present in the reader schema, but missing
in the writer schema, thus defaults only make sense in reader schemas.

In addition to that couldn't defaults be used on the writer side (defined
in the writer schema) to fill in fields with missing values? So if I have a
record schema with 100 fields, all having defaults, I could specify only 5
field values for a record to be serialized and the Avro lib would fill in
the rest. This does not impact the serialization (format) itself, the spec
would only allow using defaults for this purpose (and for example adding
this support to the python implementation takes 2 extra lines based on a
quick trial).

What do you think? Would this go against Avro's philosophy?

Thanks and Regards,
Jeno

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message