Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-3495

Rust: Record serialization is sensitive to order of fields in struct

    XMLWordPrintableJSON

Details

    Description

      Initially reported at: https://github.com/flavray/avro-rs/issues/47

       

      Trying to validate and write a record from the following struct:

      #[derive(Deserialize, Serialize)]
      pub struct MyRecord {
        b: String,
        a: i64,
      }
       

       

      using this schema:

      {
        "type": "record",
        "name": "my_record",
        "fields": [
          {"name": "a", "type": "long"},
          {"name": "b", "type": "string"},
        ]
      } 

       

      fails because the order of the fields is not the same.

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              mgrigorov Martin Tzvetanov Grigorov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m