为了使用户更好、更方便的进行数据加工,计算列函数在数据模型引擎V2.0中新增了45+函数,并且适配了50+的业务库。
1、函数是基于数据模型引擎V2.0进行适配的,只有在引擎V2.0开启状态下才能正常使用;如果没有适配,使用对应的函数可能会报错。 |
以下是计算列函数适配数据库函数情况:代表已经已经适配了,详细可查看:数据连接支持情况-汇总。
数据库名称 | 适配情况 | 备注 |
Aliyun AnalyticDB | 已实现 | |
Aliyun MaxCompute | 未适配 | |
ByteHouse | 未适配 | |
AWS Redshift | 已实现 | |
CirroData(信创版支持) | 已实现 | |
ClickHouse | 已实现 | |
已实现 | ||
DaMeng | 已实现 | |
已实现 | ||
DB2 | 已实现 | right、left函数不支持中文 atan2函数返回值与其他数据库不同,可以考虑调转参数位置满足 |
DORIS | 已实现 | |
GaussDB | 已实现 | GaussDB 200 len函数中中文只支持UTF8编码 substring、insert函数不支持中文 |
已实现 | ||
GBase | 已实现 | Gbase8sV88: 1、isnotnull、isnull等逻辑语句select的列字段不支持is null 和is not null 2、datediff【select (to_date('2023-11-30', 'YYYY-MM-DD') - to_date('2023-11-15', 'YYYY-MM-DD')) UNITS DAY from smartsql_function_test】、week年周函数不支持 |
GOLDENDB(信创版支持) | 已实现 | |
GREENPLUM | 已实现 | |
HADOOP | 已实现 | |
HANA | 已实现 | length、bitlength只支持默认的utf-8编码 trunc(120.12345, 2)函数测试环境无法执行,使用TO_DECIMAL函数处理,并且当精度小于0,值大于7位的时候无法支持,如trunc(12345678, 2),原因是数据长度过长会自动转为double的科学计数 |
HSQL | 已实现 | |
HuaWei FusionInsight HD | 已实现 | 不支持atan2、_cast |
impala | 已实现 | 字符串处理函数不支持中文或者中文不准 |
INFOBRIGHT | 已实现 | |
INFORMIX | 已实现 | 不支持week、char、log2、季度计算、datetounixtime 中文处理长度(len、length_inner、length_inner、insert_dev、left、repeat_dev、right、rpad、lpad) cast_inner不支持time、TIMESTAMP类型、cast_inner('1979-08-10 11:45:14', 'DATE') 不支持null is null 针对null、false\true对象无法处理的函数:coalesce、greatest_dev、least_dev、ifnull、isnotnull |
Kingbase | 已实现 | |
KingbaseAnalytics | 已实现 | coalesce不支持非数字字符串,如不支持 coalesce('a', '7', 8),支持select coalesce('5', '7', 8) |
Kylin(麒麟) | 已实现 | dateformat不支持timestamp类型 ; day函数不支持; length对中文不准确 |
MARIADB | 已实现 | coalesce不支持非数字字符串,如不支持 coalesce('a', '7', 8),支持select coalesce('5', '7', 8) |
MOGDB(信创版支持) | 已实现 | coalesce不支持非数字类型,如不支持 coalesce('a', '7', 8),只支持select coalesce(5, 7, 8) |
MonetDB | 已实现 | right函数不支持中文 DateDiff函数高低版本支持select "day"((cast('2020-07-29' as timestamp) - cast('2020-07-20' as timestamp))),高版本文档显示可以支持select timestampdiff_day(timestamp '2021-12-31 18:40:40', timestamp '2021-12-20 16:30:20'),但是本地低版本不支持该函数 day、month、year、分秒小时等函数形式类似于select "year"(now()),变形处理为:Expr.NativeFuncExpr("\"year\"", date :: Nil) position函数无法支持position('st' IN 'str'),只能写死字符串 |
SQLserver | 已实现 | |
mysql | 已实现 | |
OBASE | 未适配 | |
OceanBase(信创版支持) | 已实现 | coalesce不支持非数字类型,如不支持 coalesce('a', '7', 8),只支持select coalesce(5, 7, 8) 不支持处理boolean值的函数greatest_dev、least_dev |
oracle | 已实现 | isnotnull、isnull等逻辑语句select的列字段不支持is null 和is not null |
PANWEIDB(信创版支持) | 已实现 | |
PostgreSQL | 已实现 | |
Presto | 已实现 | ascii函数只支持单个字符 |
RAPIDS(信创版支持) | 未适配 | |
SelectDB(信创版支持) | 已实现 | |
ShenTong(信创版支持) | 已实现 | |
sinodb(信创版支持) | 已实现 | week年周函数不支持 |
Spark SQL | 已实现 | 不支持round(-1.65432, -1) |
starRocks | 已实现 | |
Sybase | 已实现 | |
Teradata | 未适配 | atan2函数返回值与其他数据库不同,可以考虑调转参数位置满足 insert、substring、left、righ、lpadt、rpad等字符函数不支持中文 |
TiDB | 已实现 | |
Oracle TimesTen | 未适配 | |
VASTBASEG(信创版支持) | 已实现 | |
Vertica | 已实现 | |
xinghuan星环Inceptor | 已实现 | 已经测试 |
xinghuan星环ArgoDB | 已实现 | |
YMatrix | 已实现 |