Table API SQL系统(内置)函数System (Built-in) Function详解
目录
函数类型
引用函数
函数精确引用
函数模糊引用
函数解析顺序
精确的函数引用
模糊的函数引用
系统函数
标量函数(Scalar Functions)
比较函数(Comparison Functions)
逻辑函数(Logical Functions)
算术函数(Arithmetic Functions)
字符串函数(String Functions)
时间函数(Temporal Functions)
条件函数(Conditional Functions)
类型转换函数(Type Conversion Functions)
集合函数(Collection Functions)
JSON函数(JSON Functions)
值构造函数(Value Construction Functions)
值访问函数(Value Access Functions)
分组函数(Grouping Functions)
哈希函数(Hash Functions)
聚合函数(Aggregate Functions)
时间区间和时间点单位
列函数(Column Functions)
Flink Table API & SQL允许用户使用函数进行数据转换。
函数类型
在Flink中有两个维度来对函数进行分类。
一个维度是系统(或内置)函数(system (or built-in) functions)与目录函数(catalog functions)。系统函数没有命名空间,可以用它们的名称来引用。目录函数属于目录和数据库,因此它们具有目录和数据库命名空间,它们可以通过完全/部分限定名称(catalog.db.func
或者 db.func
)引用。或只是函数名引用。
另一个维度是临时函数与持久函数的区别。临时函数是不稳定的,只在会话的生命周期内存在,它们总是由用户创建的。持久函数存在于会话的整个生命周期中,它们要么由系统提供,要么保存在目录中。
这两个维度为Flink用户提供了4个函数类别:
(1)临时系统函数(Temporary system functions)
(2)系统函数(System functions)
(3)临时目录函数(Temporary catalog functions)
(3)目录函数(Catalog functionsÿ