Hi,
1.11中引入的新的udf注册接口,使用的是新的udf类型推断机制,所以会有上面的问题。
你可以参考新的udf类型推导文档[1] 来写一下type hint试试
[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/functions/udfs.html#type-inference
zz zhang 于2020年8月7日周五 上午11:00写道:
> 执行如下代码提示异常,改为旧方法StreamTableEnvironment.registerFunction执行正常,
> F
执行如下代码提示异常,改为旧方法StreamTableEnvironment.registerFunction执行正常,
Flink version: 1.11.1
package com.test;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.table.api.EnvironmentSettings;
import org.apache.flink.table.api.bridge.java.StreamTableEnviro