Kriskras99 opened a new pull request, #512:
URL: https://github.com/apache/avro-rs/pull/512
I've done my best to make this PR as small as possible, but the serializer
and deserializer implementations need to match. So I can't make it smaller than
this. Every commit builds, but only the last commit is guaranteed to pass tests.
This is a breaking change, as this makes the serializer as strict as
possible (checking names). An array is now also serialized as a tuple (like
Serde does) unless `apache_avro::serde::array` is used.
Other stuff that happens in this PR:
- Document the mapping between the Serde and Avro data models
- `human_writable` is now configurable per reader and writer instance
- `Array` and `Map` serialisation will not write the block size in bytes
unless configured to do so
- This means they don't need to buffer the data, causing performance
improvements
- Fix the `AvroSchemaComponent` implementation of `std::time::Duration`
- The original implementation didn't work as the `Serialize`
implementation for this type is a struct
- Fix the `AvroSchemaComponent` for `bigdecimal::BigDecimal`
- The `Serialize` implementation for `BigDecimal` is a string, which had a
workaround in the serializer to make it serialize to `Schema::BigDecimal`. Now
the default is `Schema::String` which can be overwritten using
`apache_avro::serde::bigdecimal`
This PR does not include support in `avro_schema_derive`, that will come in
a separate PR. I also have a deserializer implementation in the works that can
resolve schemas, which should allow use the completely deprecate `from_value`
and `to_value`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]