Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro >> mail # user >> Schema validation of a field's default values

Copy link to this message
Re: Schema validation of a field's default values
We should probably follow Postel's law and be liberal in what we accept
during deserialization.  So we might more rigorously check default values
when writing even though that's not when they're used.  Most schemas that
are used when writing are also used for reading.
On Mon, Nov 5, 2012 at 1:44 PM, Mark Hayes <[EMAIL PROTECTED]> wrote:

> I'm not sure how it can be added to Avro without breaking existing apps.
>  If ResolvingGrammarDecoder.encode were changed to correct the deficiencies
> I mentioned, existing schemas that don't pass the stricter rules would
> cause errors in the builder, and errors when applying default values from a
> reader schema during deserialization.
> --mark