title: UNNEST returns no rows for empty array
body: <p>I am using <code>unnest</code> for more flatten more than one array in Athena query. When the array has some records it returns the correct result. But when the second array is empty it is returning no records. Can someone please let me know how to do unnest to unnest more than one array in a single query?</p>
  
  <p>The following query returns empty row.</p>
  
  <pre><code>WITH example AS (
   SELECT devop, devs 
   FROM
  
     UNNEST(ARRAY['Sharon', 'John', 'Bob', 'Sally']) AS t(devop),
       UNNEST(ARRAY[]) AS t(devs)
  )
  select array_join(array_agg(distinct example.devop),';'),array_join(array_agg(distinct example.devs),';') from example
  </code></pre>
  
  <p>The following query returns the correct result.</p>
  
  <pre><code>WITH example AS (
   SELECT devop, devs 
   FROM
  
     UNNEST(ARRAY['Sharon', 'John', 'Bob', 'Sally']) AS t(devop),
       UNNEST(ARRAY['a','b']) AS t(devs)
  )
  select array_join(array_agg(distinct example.devop),';'),array_join(array_agg(distinct example.devs),';') from example
  </code></pre>
  
  <p>When the second array is empty I want the following result</p>
  
  <pre><code>_col0                             _col1
  ----------------------------------------------
  Sally;John;Bob;Sharon              
  </code></pre>