You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "Martin Tzvetanov Grigorov (Jira)" <ji...@apache.org> on 2022/11/11 07:30:00 UTC
[jira] [Resolved] (AVRO-3664) Add Rust Avro Value conversion derive implementations
[ https://issues.apache.org/jira/browse/AVRO-3664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Tzvetanov Grigorov resolved AVRO-3664.
---------------------------------------------
Resolution: Not A Problem
As agreed in the Pull Request comments the users are recommended to use apache_avro::to_value(x) and apache_avro::from_value(value).
Adding implementation for TryFrom introduces a lot of complexity in the avro_derive crate for no real value.
> Add Rust Avro Value conversion derive implementations
> -----------------------------------------------------
>
> Key: AVRO-3664
> URL: https://issues.apache.org/jira/browse/AVRO-3664
> Project: Apache Avro
> Issue Type: New Feature
> Components: rust
> Reporter: Aaron Spiegel
> Priority: Major
> Labels: pull-request-available
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Given the current constraints of the _AvroSchema_ derive macro, it is possible to also derive the following implementations:
> {code:java}
> impl From<apache_avro::types::Value> for X {...}
> impl from<X> for apache_avro::types::Value {...}{code}
> With these traits implemented, serialization in Avro becomes considerably simpler, for schemas that are already generated through a derive macro.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)