rsgen-avro icon indicating copy to clipboard operation
rsgen-avro copied to clipboard

3d Arrays cause Templating error

Open ajfabbri opened this issue 7 months ago • 2 comments

Using a 3-dimensional array fails with Templating error: Didn't find schema Array(Array(Double)) in state GenState

fabbri@linux~/Code/rsgen-avro$ cat array-3d.avsc
{
  "type" : "record",
  "name" : "Array3d",
  "fields" : [ {
    "name" : "coordinates",
    "type" : {
      "type" : "array",
      "items" : {
        "type" : "array",
        "items" : {
          "type" : "array",
          "items" : "double"
        }
      }
    }
  } ]
}
fabbri@linux:~/Code/rsgen-avro$ target/debug/rsgen-avro array-3d.avsc -
Templating error: Didn't find schema Array(Array(Double)) in state GenState { types_by_schema: {"{\"type\":\"array\",\"items\":\"double\"}": "Vec<f64>"}, schemata_by_name: {Name { name: "Array3d", namespace: None }: Record(RecordSchema { name: Name { name: "Array3d", namespace: None }, aliases: None, doc: None, fields: [RecordField { name: "coordinates", doc: None, aliases: None, default: None, schema: Array(Array(Array(Double))), order: Ascending, position: 0, custom_attributes: {} }], lookup: {"coordinates": 0}, attributes: {} })}, not_eq: {"{\"type\":\"record\",\"name\":\"Array3d\",\"fields\":[{\"name\":\"coordinates\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"array\",\"items\":{\"type\":\"array\",\"items\":\"double\"}}}}]}", "{\"type\":\"array\",\"items\":\"double\"}"}, use_chrono_dates: false }

ajfabbri avatar Jun 27 '24 21:06 ajfabbri