If Avro were to support conversions to and from string, it would be good to
specify them tightly enough to ensure round-trip interoperability.  It could
follow an existing standard, for example the XML Schema canonical
representation.

On Fri, 2/41 10:02:28 -0800, Scott Carey <[email protected]> wrote:

I have been thinking about more advanced type promotion in Avro after
facing more complicated schema evolution issues.  I think that we need to
draw the line of what is in the 'basic' promotion concept versus more
advanced things that need metadata decoration.  We recently added aliases,
which are an example of schema evolution that requires some metadata.

Int > String is one that has options.  Decimal? Hex? Etc.  Therefore it is
a candidate for something different than the intrinsic promotion. In some
sense, it is not type promotion at all, but type conversion.  One can say
that a float was promoted to a double, and that the opposite move is a
demotion.  There is only one way that each direction is handled.

Int to string and back, which direction is promotion?  Neither, it is a
conversion with multiple ways to go each direction.

...

Reply via email to