欢迎投稿

今日深度:

hive函数,

hive函数,


内置函数:
简单函数,聚合函数,集合函数,特殊函数
自定义函数:
UDF(map阶段),UDAF(reduce阶段)

cli命令
show functions;

desc function concat(函数名字);函数的描述信息
hive> desc function concat;
OK
concat(str1, str2, ... strN) - returns the concatenation of str1, str2, ... strN or concat(bin1, bin2, ... binN) - returns the concatenation of bytes in binary data  bin1, bin2, ... binN
Time taken: 0.026 seconds, Fetched: 1 row(s)
desc function extended concat;详细描述信息
hive> desc function extended concat;
OK
concat(str1, str2, ... strN) - returns the concatenation of str1, str2, ... strN or concat(bin1, bin2, ... binN) - returns the concatenation of bytes in binary data  bin1, bin2, ... binN
Returns NULL if any argument is NULL.
Example:
  > SELECT concat('abc', 'def') FROM src LIMIT 1;
  'abcdef'
Time taken: 0.024 seconds, Fetched: 5 row(s)

简单函数
关系运算,=,<>,LIKE,RLIKE(正则匹配),regexp
数学运算,加减乘除
逻辑运算
map,array,struct
数值计算,round(四舍五入),取随机数,rand
……
coalesce,返回第一个非空值
带分隔符字符串连接函数,concat_ws(string sep,string a,string b…)
url解析函数,parse_url
json解析函数get_json_object
聚合函数,count,sumavg

特殊函数:
窗口函数,
分析函数
混合函数
UDTF函数

窗口函数:
应用场景,用于分区排序,动态group by,top n,累计查询,层次查询
lead lag last_value first_value

分析函数
the over clause
count sum min max avg
rank row_number dense_rank cume_dist percent_rank

混合函数
java_method(class,method[,arg1.arg2…])
reflect(class,method[,arg1,arg2…])
hash(a1[,a2])

UDTF用户定义表函数
explode

www.htsjk.Com true http://www.htsjk.com/hive/33917.html NewsArticle hive函数, 内置函数: 简单函数,聚合函数,集合函数,特殊函数 自定义函数: UDF(map阶段),UDAF(reduce阶段) cli命令 show functions; desc function concat(函数名字);函数的描述信息...
相关文章
    暂无相关文章
评论暂时关闭