Tim Perkins created AVRO-2258:
---------------------------------

             Summary: Resolution Canonical Form
                 Key: AVRO-2258
                 URL: https://issues.apache.org/jira/browse/AVRO-2258
             Project: Apache Avro
          Issue Type: New Feature
          Components: spec
            Reporter: Tim Perkins


The spec defines the Parsing Canonical Form to identify schemas that are the 
same from the perspective of reading data written against the schemas. Schema 
Fingerprints can then be computed based on the Parsing Canonical Form.

For our implementation of an Avro schema registry, we found schema fingerprints 
based on the Parsing Canonical Form to be insufficient because they exclude 
default and alias attributes which affect resolution between different schemas.

For the registry, we wanted new versions to created when defaults or alias are 
changed.

We extended to the Parsing Canonical Form to define a Resolution Canonical Form 
by modifying the order transformation and adding a transformation on aliases:
 * [ORDER] Order the appearance of fields in JSON objects as follows: {{name, 
type, fields, symbols, items, values, size, default, aliases}}
 * [ALIASES] Aliases for named types and fields are converted to their 
fullname, using applicable namespace, and sorted.

We have an implementation for this that we have been using in Ruby:

[https://github.com/salsify/avro-resolution_canonical_form]

 

I'm opening this issue to gauge if there is interest and support for adding 
this to the Avro specification. If there is then I can open a pull request to 
modify the spec.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to