martin-g commented on issue #53: URL: https://github.com/apache/avro-rs/issues/53#issuecomment-2491123774
The problem here is that `SpecificSingleObjectWriter::<Comment>::with_capacity(10)?.write_ref(&payload, &mut buffer)` uses Serde and Uuid's serde support serializes it to String, i.e. it calls `fn serialize_str(self, v: &str) -> Result<Self::Ok, Self::Error>` and without support for external Schema there is no way for the Avro impl to know that it should create `apache_avro::types::Value::Fixed` instead of `apache_avro::types::Value::String` and this leads to 37 bytes instead of 16. If you have idea how to tell Serde to use an external Schema I'll be glad to explore it! Otherwise I'd suggest to use the [avro way](https://github.com/apache/avro-rs/blob/main/avro/README.md#writing-data). -- 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]
