Matt Massie wrote:
> 1. Can records, enums and fixed all be used as custom type specifications?
>
Yes
> For example, in the interop schema there is an enum named "enumField" that
> is a sibling to the "recordField" node. Does that mean that "recordField"
> could have a field of type "enumField"?
>
Note that "enumField" is not the type. It is the field name. Type is "Kind". So
one can use it in "recordField" as:
{"name": "recordField", "type":
{"type": "record", "name": "Node",
"fields": [
{"name": "label", "type": "string"},
{"name": "c1", "type": {"type": "array", "items": "Kind"}},
{"name": "c2", "type": "Kind"},
{"name": "c3", "type": "MD5"},
{"name": "children", "type": {"type": "array", "items": "Node"}}]}
See c1, c2 and c3 are fields which use named types.
> 2. Do we require that a custom type be defined 'before' it is used or can
> people can use custom types prior to their definition?
>
>
Should be defined "before" it is used.
- Sharad