avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Grey <mgthesec...@spotify.com>
Subject Re: Can we have duplicate fields in Avro?
Date Mon, 24 Jul 2017 15:27:59 GMT
Protobuf repeated still produces a List<T> in it's generated Java companion
class.  I'm not aware of any way of representing this in either avro or
pbuf that wouldn't require you to iterate through some sequence stored at
that key.

On Sun, Jul 23, 2017 at 5:29 AM, kant kodali <kanth909@gmail.com> wrote:

> Hi All,
> I was wondering if we can have duplicate fields in Avro? for example, If I
> have the following JSON {"city": "Toronto", "city": "Newyork"} and try to
> grab the key "city" I believe the JSON parser either throws error or
> returns "Newyork" but I don't think it will give me both "Toronto" and
> "Newyork" so I am wondering if this limitation is same in Avro or is Avro
> ok with duplicate fields?
> And yes I can express city as an array or whatever but thats not what I
> want There are cases for me where I really want to use the same key (may be
> something similar to protobuf repeated).
> Thanks!

View raw message