jdarais opened a new pull request, #382:
URL: https://github.com/apache/avro-rs/pull/382

   This PR adds some missing functionality for the Duration type:
   
   - Schema::Duration is updated to contain a FixedSchema struct, which 
contains name, namespace, size, doc, etc. fields that can exist on Duration 
types. (#378)
   - apache_avro's Duration type is updated to implement Serialize and 
Deserialize to support inclusion in structs de/serialized from/to avro "the 
serde way"
   - Small fix to the Deserializer implementation in serde/de.rs to allow 
Value::Duration to be deserialized.  (Duration is deserialized as bytes.)
   
   This PR also deprecates `SchemaKind::is_named` in favor of a new 
`Schema::is_named` function, which can correctly determine whether a schema is 
for a named type, even when it is for a logical type that could have either a 
named or non-named underlying type, (such as "decimal" or "uuid".)
   
   One note on this change: I noticed that the derive macro for AvroSchema was 
using the Duration schema for core::time::Duration.  It is no longer trivial to 
create a schema for a Duration type, since the schema would need to be given a 
name.  It looks like other named types are excluded from these derive macros, 
so I just deleted the `impl_schema!(core::time::Duration, Schema::Duration)` 
line, but I'm not sure if there's something better that can be done here.


-- 
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]

Reply via email to