Hi John, You're mentioning that Flink doesn't support UNNEST, but it does [1]. Would this work for you?
Best regards, Martijn [1] https://nightlies.apache.org/flink/flink-docs-release-1.15/docs/dev/table/sql/queries/joins/#array-expansion Op ma 13 jun. 2022 om 13:55 schreef John Tipper <john_tip...@hotmail.com>: > Hi all, > > Flink doesn’t support the unnest() function, which takes an array and > creates a row for each element in the array. I have column containing an > array of map<str, str> and I’d like to implement my own unnest. > > I try this as an initial do-nothing implementation: > > @udtf(result_types=Datatypes.MAP( > key_type=Datatypes.STRING(), value_type=Datatypes.STRING())) > def my_unnest(arr): > return [] > > I get an error when Flink starts: > > No match found for function signature my_unnest(<VARCHAR(2147483647), > VARCHAR(2147483647)) MAP ARRAY>) > > Is there something that I’m missing in my definition please? > > Many thanks, > > John >