Questions about UDTF in flink SQL
Posted by wangsan on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Questions-about-UDTF-in-flink-SQL-tp24783.html
Hi all,
When using user-defined table function in Flink SQL, it seems that the result type of a table function must be determinstic.
If I want a UDTF whose result type is determined by its input parameters, what should I do?
What I want to do is like this:
```
SELECT input, f1, f2 length FROM MyTable, LATERAL TABLE(unnest_udtf(input, v1, v2)) as T(f1, f2), LATERAL TABLE(unnest_udtf(input, v3, v4, v5)) as T(f3, f4, f5)
```
I can surely register the same UDTF with different name and configuration, but I guess that’s not a good idea :(.
If we can not make this in Flink SQL for now , may be we should consider this feature in future?
Best,
wangsan