欢迎来到天天文库
浏览记录
ID:1741373
大小:95.75 KB
页数:32页
时间:2017-11-13
《hive函数及语法说明》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、无线增值产品部Hive函数及语法说明版本:Hive0.7.0.001eagooqi2011-7-19版本日期修订人描述V1.02010-07-20eagooqi初稿2012-1-4Eagooqi
2、
3、、cube目录n函数说明2n内置函数2n增加oracle函数14n增加业务函数17n扩展函数开发规范17n语法说明19n内置语法19n增加语法27n扩展语法开发规范(语法转换)27nORACLEsql对应的hSQL语法支持28n函数说明参考链接:https://cwiki.apache.org/confluence/display/Hive/La
4、nguageManualCLI下,使用以下命令显示最新系统函数说明SHOWFUNCTIONS;DESCRIBEFUNCTION;DESCRIBEFUNCTIONEXTENDED;n内置函数数值函数MathematicalFunctions返回类型函数名称(参数)描述BIGINTround(doublea)返回double类型的四舍五入的BIGINT值ReturnstheroundedBIGINTvalueofthedoubleDOUBLEround(doublea,intd)返回a
5、的d进制的四舍五入值ReturnsthedoubleroundedtoddecimalplacesBIGINTfloor(doublea)返回小于等于a的最大整数值ReturnsthemaximumBIGINTvaluethatisequalorlessthanthedoubleBIGINTceil(doublea),ceiling(doublea)返回a的最小的大于等于a的整数值ReturnstheminimumBIGINTvaluethatisequalorgreaterthanthedoubledoublerand(),rand(in
6、tseed)Returnsarandomnumber(thatchangesfromrowtorow)thatisdistributeduniformlyfrom0to1.Specifiyingtheseedwillmakesurethegeneratedrandomnumbersequenceisdeterministic.doubleexp(doublea)自然指数函数Returnse^awhereeisthebaseofthenaturallogarithmdoubleln(doublea)自然对数函数Returnsthenatura
7、llogarithmoftheargumentdoublelog10(doublea)以10为底对数函数Returnsthebase-10logarithmoftheargumentdoublelog2(doublea)以2为底对数函数Returnsthebase-2logarithmoftheargumentdoublelog(doublebase,doublea)对数函数Returnthebase"base"logarithmoftheargumentdoublepow(doublea,doublep)power(doublea,dou
8、blep)幂运算函数Returna^pdoublesqrt(doublea)开平方函数Returnsthesquarerootofastringbin(BIGINTa)二进制函数Returnsthenumberinbinaryformat(see[http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_bin])stringhex(BIGINTa)hex(stringa)十六进制函数Iftheargumentisanint,hexreturnsthenumb
9、erasastringinhexformat.Otherwiseifthenumberisastring,itconvertseachcharacterintoitshexrepresentationandreturnstheresultingstring.(see[http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_hex])stringunhex(stringa)反转十六进制函数Inverseofhex.Interpretseachpairofcha
10、ractersasahexidecimalnumberandconvertstothecharacterrepresentedbythenumber.stringconv(BIG
此文档下载收益归作者所有