I am migrating a query from Vertica to Presto(0.246). The query contains a Vertica function StringTokenizerDelim, which basically explodes and array (market column) into rows.
This is the mockup of the table:
+----+---------+-------------+
| id | product | market |
+----+---------+-------------+
| 1 | Cabinet | AU,GB,FR |
| 2 | Chair | US,GB |
| 3 | Desk | BE,GB,FR,US |
+----+---------+-------------+
The output should be:
+----+---------+--------+
| id | product | market |
+----+---------+--------+
| 1 | Cabinet | AU |
| 1 | Cabinet | GB |
| 1 | Cabinet | FR |
| 2 | Chair | US |
| 2 | Chair | GB |
| 3 | Desk | BE |
| 3 | Desk | GB |
| 3 | Desk | FR |
| 3 | Desk | US |
+----+---------+--------+
What is the equivalent to that function in Presto (if there is any? couldn't find it on the documentation)?
Cheers,