avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@gmail.com>
Subject Re: Why canonical form excludes default?
Date Mon, 10 Apr 2017 20:11:13 GMT
Identical fingerprints indicate that one schema can read data written
by another without schema resolution.  Canonical form is used to
implement fingerprints.  Default values are used during resolution,
and are thus not a part of fingerprints.

Compatibility between schemas that takes account of schema resolution
can be determined with utilities like Java's SchemaCompatibility and
SchemaValidator classes.  This type of compatibility requires a more
complex comparison, not implementable with hashcode identity.


On Mon, Apr 10, 2017 at 12:29 AM, Rafal Kluszczynski
<rafal.kluszczynski@allegrogroup.com> wrote:
> Hello,
> I have a question about canonical form. So far, we are storing schemas in schema-registry
service. Usually this mean, that developers use different schema versions on dev, test or
production environments. That is why we were interested in using fingerprint as unique schema
identifier for particular version (the same on every env).
> This, of course, mean we have to adapt schema-registry and that is OK for us. Unfortunately,
default is also stripped from original schema which in our case is important for such tools
like Hue or Presto.
> Could you explain why default value is stripped and what is the basic idea behind fingerprint
and canonical form in current version of Avro specification (1.8.1)?
> Kind regards,
> --
> // Rafal Kluszczynski
> Software Engineer
> Allegro

View raw message