martin-g commented on PR #1921:
URL: https://github.com/apache/avro/pull/1921#issuecomment-1313925855

   The actual problem in ser.rs and de.rs.
   This PR changes the way apache_avro serializes objects/instances into 
`apache_avro::types::Value`.
   For now I see no way to make the serde logic more dynamic, i.e. depending on 
the enum variants' types or on container/field's attribute to decide what kind 
of `Value` to construct.
   
   The new serde logic is powerful enough to handle complex kinds of Rust enums 
(by using Schema::Record([Schema::Enum, Schema::Union])). But it does not 
support the old representation (Schema::Enum) because all variants are mapped 
to Value::Null and there could be at most one `null` in an Avro Union.
   
   The logic what schema to derive looks like a simpler task (although I 
haven't tried it yet, so I might be wrong).


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