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-4073: Create Convenience toBytes Method for Datum Writer #3197

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

belugabehr
Copy link
Contributor

What is the purpose of the change

  • This pull request improves usability by providing a convenience way to turn a datum into a byte array, fixing AVRO-4073

Verifying this change

This change added tests.

@github-actions github-actions bot added the Java Pull Requests for Java binding label Oct 4, 2024
@belugabehr belugabehr force-pushed the belugabehr/AVRO-4073 branch 4 times, most recently from cf86303 to ca792ee Compare October 4, 2024 14:35
* depth first, writing each leaf value in the schema from the datum to the byte
* array.
*/
byte[] toByteArray(D datum) throws IOException;
Copy link
Member

Choose a reason for hiding this comment

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

The two implementations are the same at the moment. Would it make sense to make this method a method with default implementation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Touché. Much Cleaner. Thanks for the suggestion. Updated.

@belugabehr belugabehr merged commit ec2378b into apache:main Oct 7, 2024
8 checks passed
@belugabehr belugabehr deleted the belugabehr/AVRO-4073 branch October 7, 2024 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java Pull Requests for Java binding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants