flavray/avro-rs

Failing to decode record type referencing an enum

Closed this issue · 1 comments

Seems like avro-rs library cannot parse following message

{
  "type": "record",
  "name": "mymsg",
  "namespace": "myns",
  "fields": [
    {
      "name": "myid",
      "type": "int"
    },
    {
      "name": "c1",
      "type": {
        "type": "enum",
        "name": "myflag",
        "symbols": [
          "A",
          "B",
          "C"
        ]
      }
    },
    {
      "name": "c2",
      "type": "myflag"
    }
  ]
}

I get following error

thread '' panicked at 'called Result::unwrap() on an Err value: SRCError { error: "Could not parse schema", side: Some("Failed to parse schema: Unknown type: myflag"), retriable: false, cached: true }', src/receiver.rs:84:19
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Is this something you can fix?

poros commented

Yeah, the library has no support for recursive types yet :/
Closing as duplicate of #92