prestodb / presto-admin

A tool to install, configure and manage Presto installations
http://prestodb.github.io/presto-admin/
Apache License 2.0
171 stars 100 forks source link

unnset json array #113

Closed Liorba closed 8 years ago

Liorba commented 8 years ago

Hey all, it seems that unnesting json array which contains a list of maps is impossible see the example below

 select x.n
 from
 unnest(cast(json_extract('{"payload":[{"type":"b","value":"9"}, {"type":"a","value":"8"}]}','$.payload') as 
 array<varchar>)) as  x(n)

I get an error: Query failed (#20151228_081622_00006_w4si4) Value cannot be cast to array<varchar>

cawallin commented 8 years ago

This looks like a Presto issue, rather than a presto-admin issue -- can you file the issue there? https://github.com/facebook/presto/issues