不需要专门为Scala 的 Table API 注册函数。
函数通过调用 registerFunction()方法在 TableEnvironment 中注册。...数据准备
hello|word,hello|spark
hello|Flink,hello|java,hello|大数据老哥
编写代码
package udf
import org.apache.flink.streaming.api.scala...该表由三列(id、name 和 price)、五行组成数据。现在我们需要找到表中所有饮料的最高价格,即执行 max()聚合,结果将是一个数值。...用户定义的表聚合函数,是通过继承 TableAggregateFunction 抽象类来实现的。...数据准备
1,Latte,6
2,Milk,3
3,Breve,5
4,Mocha,8
5,Tea,4
代码如下
package udf
import org.apache.flink.streaming.api.scala