Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Query failed: Cannot unnest type: row

Tags:

presto

I'm running a query with a

select bar_tbl.thing1
from foo
cross join unnest(bar) as t(bar_tbl)

And got the error Error Query failed: Cannot unnest type: row

Why?

The bar column looks like this {thing1=abc, thing2=def}

like image 965
sshevlyagin Avatar asked Apr 20 '18 21:04

sshevlyagin


1 Answers

Turns out I was trying to expand a row, which doesn't make sense. I should have just done

select bar.thing1
from foo
like image 97
sshevlyagin Avatar answered Sep 23 '22 14:09

sshevlyagin