Re: JSON reader enhancement

2017-11-19 Thread Ted Dunning
I can't speak to all use cases, but the variant map is very important when dealing with JSON data that has changed schema over time. In order to determine which version my data is, I need to know which fields are present in a map. Last time I looked, all that happened is that all films for set to e

Re: JSON reader enhancement

2017-11-19 Thread Paul Rogers
Hi Ted, Thanks for the suggestions. To handle nested lists correctly, we need Drill’s List data type, which uses Drill’s Union data type. (The List type is really mostly just a repeated Union, and so needs union support.) But, the union type disabled by default. The case I was trying to handle

Re: JSON reader enhancement

2017-11-19 Thread Ted Dunning
I don't see the value with this suggestion. It isn't going to make things much better since the user will be totally stunned when the structure doesn't come through as an array. A bigger issue is the fact that elements of maps aren't marked correctly as missing. That means that if I have these two

Re: JSON reader enhancement

2017-11-19 Thread Aman Sinha
Hi Paul, I have added some comments to DRILL-5974. Perhaps better to discuss in the JIRA for future referencing. -Aman On Sat, Nov 18, 2017 at 7:33 PM, Paul Rogers wrote: > Hi Arina, > > The proposal is to represent 2D arrays as a string (using the original, > unparsed JSON.) That is, given th

Re: JSON reader enhancement

2017-11-18 Thread Paul Rogers
Hi Arina, The proposal is to represent 2D arrays as a string (using the original, unparsed JSON.) That is, given this input: {a: “fred”, b: [[10, 20, 30], [11, 21, 31]]} The parsed columns are: a, b “fred”, "[[10, 20, 30], [11, 21, 31]]” Notice that column b is just a string. It is a string o

Re: JSON reader enhancement

2017-11-18 Thread Arina Yelchiyeva
In general sounds good. If user will apply kvgen / flatten over such 2-D array columns read as string, he will be able to normalize data in the format he wants? Right? Or we need to come up with new function? Kind regards Arina On Fri, Nov 17, 2017 at 10:39 PM, Paul Rogers wrote: > Hi All, > >