[
https://issues.apache.org/jira/browse/AVRO-3232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17471911#comment-17471911
]
ASF subversion and git services commented on AVRO-3232:
-------------------------------------------------------
Commit e8200cd2d40d9cf4a702905e6d2eeb9d589ec57a in avro's branch
refs/heads/dependabot/nuget/lang/csharp/Microsoft.NET.Test.Sdk-17.0.0 from
Ultrabug
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=e8200cd ]
AVRO-3232: add matches to deserialize_any union+string/map (#1368)
the deserialize_any method is used when using from_value::<T>
to deserialize a record which has fields that are not present
in <T>
the deserialize_any was missing some matches on certain
Value variants which caused errors like:
Error: DeserializeValue("Unsupported union")
Error: DeserializeValue("incorrect value of type: String")
this patch adds the missing matches and enhances the error
message to help in understanding which type could be missing in
the future
the test case added showcases the problem while validating that
union deserialization is actually working as well
Signed-off-by: Ultrabug <[email protected]>
> Rust deserializer: add missing matches to deserialize_any union and string/map
> ------------------------------------------------------------------------------
>
> Key: AVRO-3232
> URL: https://issues.apache.org/jira/browse/AVRO-3232
> Project: Apache Avro
> Issue Type: Bug
> Components: rust
> Reporter: Ultrabug
> Assignee: Martin Tzvetanov Grigorov
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.12.0
>
> Time Spent: 3h 50m
> Remaining Estimate: 0h
>
> When deserializing complex Avro schemas using from_value::<T> to map the data
> to a struct, we get errors even if the Record itself has been deserialized
> successfully.
> These errors come from the fact that `deserialize_any` from de.rs is missing
> some matches.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)