Hi Matt,

I think the "key" attribute was removed from the spec, because keys are
always supposed to be string.  It was probably never removed from the schema
you are using, but the attribute is probably ignored by the other
implementations.

Scott




On 11/6/09 5:26 PM, "Matt Massie" said:

> I'm working on C interoperability tests and I think I've find an
> inconsistency.
> 
> In interop.avsc we have...
> 
> {"type": "map", "keys": "long", "values":
>         {"type": "record", "name": "Foo",
>          "fields": [{"name": "label", "type": "string"}]}}},
> 
> ...for the map field.  Looking at the Java and python code, the key is
> always read/written as utf8.  My C code was trying to read the keys as longs
> (since that is what the schema has).  When I changed "long" to "string", it
> worked.
> 
> Is the correct behaviour to honor the "keys" type if it exists?
> 
> Thanks for the help!
> -Matt

Reply via email to