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

Add AvroGenerator.canWriteBinaryNatively() to support binary writes, fix java.util.UUID representation #179

Closed
cowtowncoder opened this issue Sep 10, 2019 · 2 comments
Labels
Milestone

Comments

@cowtowncoder
Copy link
Member

Looks like Avro backend is missing one crucial capability indicator, needed for (de)serializers to know that binary data can be handled natively.
Adding this should allow for (more) efficient serialization of java.util.UUID, for example.
Binary data reads/writes themselves are probably not affected since there are separate methods: this has more to do with binary representation of types like UUID.

@cowtowncoder
Copy link
Member Author

Note: looks like Schema generation for UUID type just indicates String, and does not have good access to find out if binary available, or, if it did, way to indicate that.

Will probably need to add something in schema interfaces for jackson-core, too, but can't use that in 2.10 regardless, so need to add a work-around in Avro schema handler.

@cowtowncoder cowtowncoder added 2.11 and removed 2.10 labels Sep 10, 2019
@cowtowncoder
Copy link
Member Author

Looks like I may have to leave default UUID serialization, schema type, as String for 2.10, and add some low-level support to be able to fix this in 2.11.

@cowtowncoder cowtowncoder added this to the 2.11.0 milestone Nov 27, 2019
@cowtowncoder cowtowncoder changed the title Add AvroGenerator.canWriteBinaryNatively() to support binary writes Add AvroGenerator.canWriteBinaryNatively() to support binary writes, fix java.util.UUID representation Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant