I'm trying to run a query on a tables with records containing nested array. In the example below the nested array is called "ages". Some of the records may have an empty array.
How do I run a query the runs a "left" cross join, so that even a record that has no elements in ages will be output (one row with ages=null)/
WITH people AS (
select * from unnest(
[STRUCT("Tim" as name, [5] as ages),
STRUCT("Jane" as name, [] as ages)])
)
select
name
from people, unnest(ages) as a