[
https://issues.apache.org/jira/browse/AVRO-3514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17534680#comment-17534680
]
Oscar Westra van Holthe - Kind edited comment on AVRO-3514 at 5/11/22 5:40 AM:
-------------------------------------------------------------------------------
The spec allows aliases to rename fields and types:
{quote}
For example, if the writer's schema was named "Foo" and the reader's schema is
named "Bar" and has an alias of "Foo", then the implementation would act as
though "Foo" were named "Bar" when reading.
{quote}
I think all implementations should implement that.
was (Author: opwvhk):
The spec allows aliases to rename fields and types:
{quote}
For example, if the writer's schema was named "Foo" and the reader's schema is
named "Bar" and has an alias of "Foo", then the implementation would act as
though "Foo" were named "Bar" when reading.
{quote}
> Renaming a named type should either be compatible or incompatible.
> ------------------------------------------------------------------
>
> Key: AVRO-3514
> URL: https://issues.apache.org/jira/browse/AVRO-3514
> Project: Apache Avro
> Issue Type: Bug
> Reporter: Ryan Skraba
> Priority: Major
>
> Currently, the Java SDK permits a RECORD schema (for example) to be renamed.
> In other words, data serialized with an old schema named {{SimpleRecordV1}}
> can be deserialized as a record named {{SimpleRecordV2}}.
> The Python SDK does not permit this to happen, causing an incompatibility
> error.
> The spec says:
> It is an error if the two schemas do not match.
> To match, one of the following must hold:
> ...
> both schemas are records with the same (unqualified) name
> If I remember correctly this was discussed (on the mailing list?) and
> renaming a named type was considered OK and the Java SDK was being acceptably
> more lenient than the spec. However, this causes difference in behaviour
> between Java and Python implementations.
> We should decide which behaviour is preferred and align the SDK.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)