flavray / avro-rs

Avro client library implementation in Rust
MIT License
169 stars 95 forks source link

Bytes/Fixed compatibility and Serde #169

Open dgrijalva-squire opened 3 years ago

dgrijalva-squire commented 3 years ago

I've been struggling to get Serde working on a schema that uses fixed fields. It appears there's no mapping between Serde and Value::Fixed. It looks like this could be supported if we added a few mappings to Value that allow coercion between Bytes and Fixed as long as the size matches.

Am I just doing it wrong? Would you accept a PR that adds this support?

poros commented 3 years ago

Hi, apologies for the late reply. We are aware of one issue with Fixed and default values (see #96 and #66), but not that it is completely broken (it should be used as base for some of the logical types and we should have tests for those). If you have some code to reproduce the bug, we could turn it into a unit test.

You are welcome to contribute, of course! Have a look in the codebase and submit a PR as you see fit.