[
https://issues.apache.org/jira/browse/AVRO-2104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17090746#comment-17090746
]
Robbie Gruener edited comment on AVRO-2104 at 4/23/20, 5:02 PM:
----------------------------------------------------------------
This change broke backwards compatibility with a previous serialized avro
record I had which was serialized using avro-python3==1.9.0 since the full name
always included a period even if namespace was not set. Therefore I am unable
to deserialize these records using avro-python3==1.9.2.1. Basically there is a
nested schema which werent using namespaces and the avro header schema looks
something like:
{code:java}
{
"type": "record",
"name": "MyRecord",
"fields": [
{
"type": {
"type": "record",
"name": "ParentRecord",
"fields": [
{
"type": [
{
"type": "record",
"name": "SubRecord",
"fields": [
{
"type": "string",
"name": "foo"
}
],
},
"null"
],
"name": "subRecord"
}
],
},
"name": "parent",
},
{
"type": ".SubRecord",
"name": "subRecord",
}
],
}
{code}
On parsing I then get the following error
avro.schema.SchemaParseException: Unknown named schema '.SubRecord', known
names: ['ParentRecord, SubRecord'].
Any suggestions on how to remedy this? I guess I should have used namespace but
too late for that and we would like to not be stuck on avro 1.9.0 forever.
was (Author: rgruener):
This change broke backwards compatibility with a previous serialized avro
record I had which was serialized using avro-python3==1.9.0 since the fullname
always included a period even if namespace was not set. Therefore I am unable
to deserialize these records using avro-python3==1.9.2.1 since I get the
following error:
avro.schema.SchemaParseException: Unknown named schema '.RecordName', known
names: ['RecordName'].
Any suggestions on how to remedy this? I guess I should have used namespace but
too late for that and we would like to not be stuck on avro 1.9.0 forever.
> Schema normalisation and fingerprint support for Python 3
> ---------------------------------------------------------
>
> Key: AVRO-2104
> URL: https://issues.apache.org/jira/browse/AVRO-2104
> Project: Apache Avro
> Issue Type: Improvement
> Components: python
> Reporter: Robert Smallshire
> Assignee: Michael A. Smith
> Priority: Major
> Fix For: 1.9.2
>
>
> The existing Python 3 implementation supports neither schema canonicalisation
> to parsing normal form, nor fingerprinting of normalised schemas. This limits
> the interoperability of Python 3 Avro systems with other Avro implementations
> including the Java and Ruby versions.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)