avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hayes <m...@greybird.com>
Subject Schema validation of a field's default values
Date Sat, 20 Oct 2012 00:19:08 GMT
Hi,

It looks like the Schema parser doesn't check a field's default value
against the field's type.  So for example, you can define a string default
value for a field of type int.  Since the default value is only used in
certain circumstances for schema resolution, such an error might not easily
be caught during testing, so the danger is that it would crop up at runtime.

Am I correct, so far?

If so, does anyone know of facility in the Avro library, or another
library, for checking the schema to ensure that default values are of the
proper type?  I wasn't able to find one, so I'm considering implementing
one myself.

Thanks in advance,
--mark

Mime
View raw message