-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avro schema evolution not working with Union type and null default #4120
Labels
Comments
jrkinley
added
kind/bug
Something isn't working
area/schema-registry
Schema Registry service within Redpanda
labels
Mar 28, 2022
jrkinley
changed the title
Avro schema evolution not working with Union type with default
Avro schema evolution not working with Union type and Mar 28, 2022
null
default
jrkinley
changed the title
Avro schema evolution not working with Union type and
Avro schema evolution not working with Union type and null default
Mar 28, 2022
null
default
BenPope
added a commit
to BenPope/redpanda
that referenced
this issue
Mar 28, 2022
For Avro, nil type in a union is supported for backwards compatibility, if it's also the default. The default value must be of the type of the first type in the union. This change allows that. Fixes redpanda-data#4120
BenPope
added a commit
to BenPope/redpanda
that referenced
this issue
Mar 28, 2022
For Avro, nil type in a union is supported for backwards compatibility, if it's also the default. The default value must be of the type of the first type in the union. This change allows that. Fixes redpanda-data#4120 (cherry picked from commit 2cfa559)
/backport v21.11.x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Version & Environment
Redpanda
v2.11.10
What went wrong?
Adding a new field to an Avro schema with a default value of
null
should be backwards compatible (note thatNone
in Python is correctly translated tonull
byjson.dumps
):But the schema registry rejects the new version of the schema with:
The subject's compatibility mode is set to
BACKWARD
and Python's Avro schema compatibility checks pass ok:What should have happened instead?
The schema registry should accept the new schema version because the additional field is backward compatible.
How to reproduce the issue?
schema-registry.txt
The text was updated successfully, but these errors were encountered: