Hi Calcite experts:

In Presto, multiple array columns could be flattened "together", as Presto
docs <https://prestodb.io/docs/current/sql/select.html> shows:

SELECT numbers, animals, n, aFROM (
>   VALUES
>     (ARRAY[2, 5], ARRAY['dog', 'cat', 'bird']),
>     (ARRAY[7, 8, 9], ARRAY['cow', 'pig'])) AS x (numbers, animals)CROSS JOIN 
> UNNEST(numbers, animals) AS t (n, a)
>
> yields:

  numbers  |     animals      |  n   |  a
-----------+------------------+------+------
 [2, 5]    | [dog, cat, bird] |    2 | dog
 [2, 5]    | [dog, cat, bird] |    5 | cat
 [2, 5]    | [dog, cat, bird] | NULL | bird
 [7, 8, 9] | [cow, pig]       |    7 | cow
 [7, 8, 9] | [cow, pig]       |    8 | pig
 [7, 8, 9] | [cow, pig]       |    9 | NULL


May I know what is the equivalent in Calcite SQL?

Thanks!
Will

Reply via email to