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

[feat] Support schema field type promotion #159

Merged
merged 3 commits into from
Oct 30, 2023

Conversation

RobertIndie
Copy link
Member

@RobertIndie RobertIndie commented Oct 25, 2023

Motivation

The client is not correctly following Avro's type promotion rules, leading to a potential problem with data serialization and deserialization.

The expected behavior is that the Python client should correctly follow Avro's type promotion rules and perform type conversion when necessary, ensuring compatibility. However the actual behavior is that the Python client's schema deserialization is too strict, and type promotion is not happening as expected.

Modification

  • Support schema field type promotion when validating the python type
  • Convert the field value to the desired compatible python type

@RobertIndie RobertIndie self-assigned this Oct 25, 2023
@RobertIndie RobertIndie marked this pull request as ready for review October 25, 2023 12:33
@RobertIndie RobertIndie added this to the 3.4.0 milestone Oct 26, 2023
Copy link
Member

@shibd shibd left a comment

Choose a reason for hiding this comment

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

Nice catch!

@RobertIndie RobertIndie merged commit dfd163a into apache:main Oct 30, 2023
10 checks passed
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