举例
UDF
...
public Long eval(Long occur_time, Integer flag) {
...
}
env.createTemporarySystemFunction("TimeStampUDF", TimeStampUDF.class); // 增加udf
// DDL
CREATE TABLE kafka_source (
occur_time BIGINT,
endTime AS TimeStampUDF(`occur_time`,1),
WATERMARK FOR event.log_ts AS event.log_ts - '5' SECOND
) WITH (
...
)
env.executeSql(ddlSql);
请问:
endTime AS TimeStampUDF(occur_time
,1),
// TimeStampUDF函数第一个参数是字段,第二个参数可以随意传入吗?
可以进行其他值传入