Agreed, oversight in the api. On Mon, Jan 4, 2021 at 11:42 AM Micah Kornfield <[email protected]> wrote:
> Hi John, > I believe this is an oversight in the API. I think we should probably > open up a JIRA and try to address it. > > Depending on the use-case you might be able to write a map as > list-of-struct<key, value> and replace the metadata at some point, but I'm > not sure if this is possible in the Java library, so I don't have any > examples. > > Thanks, > Micah > > On Fri, Jan 1, 2021 at 10:02 PM John Peterson < > [email protected]> wrote: > >> Hi All, >> >> I’m attempting to convert the following data structure into vectors for >> Arrow: >> >> Map<String, Map<String, Integer>> >> >> Using the UnionMapWriter, it seems that I can’t grab a map writer for the >> value of the map, but a nested complex type such as a list is supported: >> >> writer.value().list(); // works, get a ListWriter >> writer.value().map(); // doesn’t work, no such method >> >> Is this a known limitation, or is there a proper way to translate nested >> map structures to Arrow? I’m planning on supporting a Map as both a key and >> a value of a map. If there is a way to do this (even without the writers), >> could you please point me to an example? >> >> Thanks in advance for your help with this. >> >> John >> >
