Why you need CROSS JOIN with an UNNEST in Trino
· 5 min read
If you've worked with arrays or delimited strings in Trino, you've probably encountered the need to "explode" them into separate rows. This is where UNNEST comes in. But there's a catch: unlike some other SQL databases, Trino requires you to use CROSS JOIN UNNEST rather than just UNNEST in your SELECT clause. Let's explore why.