[ 
https://issues.apache.org/jira/browse/AVRO-3804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17744630#comment-17744630
 ] 

Martin Tzvetanov Grigorov commented on AVRO-3804:
-------------------------------------------------

Have you considered using GenericSingleObjectWriter or 
SpecificSingleObjectWriter ?

See 
https://github.com/apache/avro/blob/master/lang/rust/avro/examples/test_interop_single_object_encoding.rs

> Open the visibility of serde implementation
> -------------------------------------------
>
>                 Key: AVRO-3804
>                 URL: https://issues.apache.org/jira/browse/AVRO-3804
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: rust
>            Reporter: Yannick Guern
>            Priority: Trivial
>
> Hi everyone :)
> We at Clever Cloud are working on a storage format using the Avro 
> specification for FoundationDB.
> As we build our project in Rust, we would like to use the apache_avro crate, 
> but some behaviors prevent us to be completely happy.
> The `append_ser` method takes a Serializable data and return bytes.
> But it turned out that the blob contains both the avro serialized data and 
> the header with the complete schema avro encoded iteself.
> As we are planning to store the record schema in the database, and make the 
> record refer to it thanks to the schema fingerprint. We don't need the full 
> Object Container File format.
> Our idea, instead of rely on `append_ser`, is to use the `let avro_value = 
> data.serialize(&mut serializer)` then get the bytes with
> ```
> to_avro_datum(&schema, avro_value)?
> ```
> But as the `apache_avro::ser` nor `apachec_avro::de` aren't public, I can't 
> access from the outside of the crate to the `apacheche_avro::ser::Serializer` 
> and `apacheche_avro::de::DDeserializer`.
> We need the avro_value, because we want to walk the AST.
> Can you open  in `lib.rs` the serde modules ?
> ```rust
> mod codec;
> pub mod de;
> // ...
> pub mod ser;
> mod util;
> mod writer;
> ```
> Thanks :)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to