[ 
https://issues.apache.org/jira/browse/AVRO-3232?focusedWorklogId=665609&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-665609
 ]

ASF GitHub Bot logged work on AVRO-3232:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Oct/21 10:25
            Start Date: 14/Oct/21 10:25
    Worklog Time Spent: 10m 
      Work Description: ultrabug commented on pull request #1368:
URL: https://github.com/apache/avro/pull/1368#issuecomment-943224323


   ```rust
   pub fn get_decoded_message(schema: &Schema, message: &BorrowedMessage<'_>) 
-> Result<Partner> {
       let mut reader = Cursor::new(&message.payload().unwrap()[5..]);  // 5.. 
because I read from Confluent Kafka
       let val = from_avro_datum(&schema, &mut reader, None).unwrap();
       let partner: Partner = match &val {
           Value::Record(inner) => from_value::<Partner>(&val).unwrap(),
           _ => unreachable!(),
       };
       Ok(partner)
   }
   ```
   
   I'll have to trim the Partner struct from confidential entities and share a 
trimmed schema as well. Will report back in a few.


-- 
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 665609)
    Time Spent: 1h  (was: 50m)

> 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
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h
>  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.3.4#803005)

Reply via email to