spark sql内置函数
来源:互联网 发布:手机淘宝能修改评价吗 编辑:程序博客网 时间:2024/05/19 12:26
在Spark 1.5.x版本,增加了一系列内置函数到DataFrame API中,并且实现了code-generation的优化。与普通的函数不同,DataFrame的函数并不会执行后立即返回一个结果值,而是返回一个Column对象,用于在并行作业中进行求值。Column可以用在DataFrame的操作之中,比如select,filter,groupBy等。函数的输入值,也可以是Column。
聚合函数:
approxCountDistinct, avg, count, countDistinct, first, last, max, mean, min, sum, sumDistinct
集合函数:
array_contains, explode, size, sort_array
日期时间转换
unix_timestamp, from_unixtime, to_date, quarter, day, dayofyear, weekofyear, from_utc_timestamp, to_utc_timestamp
从日期时间中提取字段
year, month, dayofmonth, hour, minute, second
日期/时间计算
datediff, date_add, date_sub, add_months, last_day, next_day, months_between
获取当前时间等
current_date, current_timestamp, trunc, date_format
数学函数:
abs, acros, asin, atan, atan2, bin, cbrt, ceil, conv, cos, sosh, exp, expm1, factorial, floor, hex, hypot, log, log10, log1p, log2, pmod, pow, rint, round, shiftLeft, shiftRight, shiftRightUnsigned, signum, sin, sinh, sqrt, tan, tanh, toDegrees, toRadians, unhex
混合函数:
array, bitwiseNOT, callUDF, coalesce, crc32, greatest, if, inputFileName, isNaN, isnotnull, isnull, least, lit, md5, monotonicallyIncreasingId, nanvl, negate, not, rand, randn, sha, sha1, sparkPartitionId, struct, when
字符串函数:
ascii, base64, concat, concat_ws, decode, encode, format_number, format_string, get_json_object, initcap, instr, length, levenshtein, locate, lower, lpad, ltrim, printf, regexp_extract, regexp_replace, repeat, reverse, rpad, rtrim, soundex, space, split, substring, substring_index, translate, trim, unb
窗口函数:
cumeDist, denseRank, lag, lead, ntile, percentRank, rank, rowNumber
ase64, upper
- Spark SQL内置函数
- spark sql内置函数
- Spark SQL 支持的Hive内置函数
- day70:Spark SQL内置函数解密与实战
- 10.Spark SQL:内置函数以及每日uv
- 11.Spark SQL:内置函数以及每日uv
- Spark SQL内置函数的使用Spark SQL执行计划总结
- Spark 之 内置函数 JSON
- SQL内置函数
- SQL内置函数
- Oracle SQL内置函数
- 内置pl/sql函数
- SQL内置函数说明
- Oracle SQL 内置函数
- Oracle 内置SQL函数
- Oracle sql内置函数
- sql内置函数
- sql常用内置函数
- HDU 2948 Geometry Darts(点在圆,三角形,矩形内判定)
- poj3195 Generalized Matrioshkas(瞎搞题翻译)
- 【BashuOJ2963】数字游戏-DFS+剪枝
- PHP PDO::execute()执行insert into失败返回错误无错误消息的解决
- mysql5.5和5.6的一些区别
- spark sql内置函数
- PAT乙级1064. 朋友数(20)
- MySQL(五)之DDL(数据定义语言)与六大约束
- RPGMaker MV 插件基础04:插件指令与脚本
- 探索Arraylist
- Pat(A) 1102. Invert a Binary Tree (25)
- static的三种用法,定义静态变量,静态函数,静态代码块!
- Android O 行为变更
- [14] NFS服务搭建与配置