Skip to content
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 references poc implementation using avro lib #987

Conversation

davide-armand
Copy link
Contributor

@davide-armand davide-armand commented Oct 31, 2024

This is a proof of concept for implementing Avro reference using Avro python library.
I used the following PR (implementation using unions) as the base: #926

What works:

  • Direct reference (schema1 --> schema2)
  • Recursive reference (schema1 --> schema1)

What does not work:

  • Indirect references (schema1 --> schema2 --> schema3) - maybe not needed, not sure Schema Registry supports this
  • ... probably other things as well

Instead of using avro unions, use avro lib (function `make_avsc_object()`) to
merge together reference schemas and main schema.
This is just a proof of concept, it does not support indirect references
for example (schema1 --> schema2 --> schema3).
@davide-armand davide-armand changed the base branch from main to avro_references2 October 31, 2024 11:04
SCHEMA_PERSON_AGE_INT_LONG = {
"type": "record",
"name": "Person",
"namespace": "com.netapp",
"fields": [
{"name": "name", "type": "string"},
{"name": "age", "type": "long"},
{"name": "address", "type": "Address"},
# {"name": "address", "type": "Address"},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented out indirect refs since they don't work, so that other tests can be executed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we don't need to support indirect refs, it's unclear if Schema Registry supports them

@davide-armand
Copy link
Contributor Author

Closing this as it was just a proof of concept

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant