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

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

                Author: ASF GitHub Bot
            Created on: 18/Apr/22 22:13
            Start Date: 18/Apr/22 22:13
    Worklog Time Spent: 10m 
      Work Description: martin-g opened a new pull request, #1650:
URL: https://github.com/apache/avro/pull/1650

   Fixes https://github.com/flavray/avro-rs/issues/47.
   
   Until now it was expected that both the schema fields and the input values 
are sorted the same way.
       
   Use BTreeMap instead of HashMap for the lookup table because otherwise the 
assertion on the validation error messages is impossible due to random printing 
of the map's entries
   
   ### Jira
   
   - [X] My PR addresses the following [Avro 
Jira](https://issues.apache.org/jira/browse/AVRO/) issues and references them 
in the PR title. For example, "AVRO-1234: My Avro PR"
     - https://issues.apache.org/jira/browse/AVRO-3495
   
   ### Tests
   
   - [X] My PR adds new unit tests
   
   ### Commits
   
   - [X] My commits all reference Jira issues in their subject lines. In 
addition, my commits follow the guidelines from "[How to write a good git 
commit message](https://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Documentation
   
   - [X] No need




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

            Worklog Id:     (was: 758141)
    Remaining Estimate: 0h
            Time Spent: 10m

> Rust: Record serialization is sensitive to order of fields in struct
> --------------------------------------------------------------------
>
>                 Key: AVRO-3495
>                 URL: https://issues.apache.org/jira/browse/AVRO-3495
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: rust
>            Reporter: Martin Tzvetanov Grigorov
>            Assignee: Martin Tzvetanov Grigorov
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Initially reported at: [https://github.com/flavray/avro-rs/issues/47]
>  
> Trying to validate and write a record from the following struct:
> {code:java}
> #[derive(Deserialize, Serialize)]
> pub struct MyRecord {
>   b: String,
>   a: i64,
> }
>  {code}
>  
> using this schema:
> {code:java}
> {
>   "type": "record",
>   "name": "my_record",
>   "fields": [
>     {"name": "a", "type": "long"},
>     {"name": "b", "type": "string"},
>   ]
> } {code}
>  
> fails because the order of the fields is not the same.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to