You need to explicitly defined the result type the UDF. You could refer to [1] for more details if you are using Flink 1.11. If you are using other versions of Flink, you need to refer to the corresponding documentation.
[1] https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/functions/udfs.html#implementation-guide > 在 2020年11月13日,下午4:56,Pierre Oberholzer <pierre.oberhol...@gmail.com> 写道: > > ScalarFunction