Hi,

I was trying to use Avro IDL to organize a complicated schema and ran into a 
problem with mutually recursive types. Here is a simple example:


{
    "type" : "record",
    "name" : "Outer",
    "fields" : [
        {
            "name" : "outerValue",
            "type" : {
                "type" : "record",
                "name" : "Inner",
                "fields" : [
                    {
                        "name" : "innerValue",
                        "type" : ["int", "Outer"]
                    }
                ]

            }
        }
    ]
}


I could find no way to write this using Avro IDL. It doesn't allow nested 
records (I can't do this)


protocol trial {

    record Outer {

        record Inner {

            union {int, Outer} innerValue;

        }

        Inner outerValue;

    }

}


There is also no way to do a forward declaration. Is there any other way of 
doing this?


Thanks,

Shaf

Reply via email to