Skip to content

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
{"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.

2 participants