Thanks Dian, but same error when using explicit returned type:
class dummyMap() extends ScalarFunction {
def eval() : util.Map[java.lang.String,java.lang.String] = {
val states = Map("key1" -> "val1", "key2" -> "val2")
states.asInstanceOf[util.Map[java.lang.String,java.lang.String]]
}
}
Le ven. 13 nov. 2020 à 10:34, Dian Fu <[email protected]> a écrit :
> 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 <[email protected]> 写道:
>
> ScalarFunction
>
>
>
--
Pierre Oberholzer
Hohlstrasse 507
CH - 8048 Zürich
+41 77 402 17 07