数学函数
roundbroundfloorceilrandexplogpowsqrtbinhexunhexabspmodsinasincosacostanatandegreesradianssignumfactorialcbrtshiftleftshiftrightshiftrightunsignedgreatestleast
集合函数
sizearray_containssort_array
类型转换函数
日期函数
from_unixtimeunix_timestampto_dateyearquartermonthdayofmonthdayofyearhourminutesecondweekofyeardatediffdate_adddate_subfrom_utc_timestampto_utc_timestampcurrent_datecurrent_timestampadd_monthslast_daynext_daytruncmonths_betweendate_format
条件函数
nvlCOALESCEwhenisnull
字符函数
asciibase64concatconcat_wsdecodeencodeformat_numberget_json_objectinstrlengthlocatelowerlpadltrimformat_string 对应Hive中的 printfregexp_extractregexp_replacerepeatreverserpadrtrimsplitsubstring 对应Hive中的 substrsubstring_indextranslatetrimunbase64upperinitcaplevenshteinsoundex
聚合函数
countsumavgminmaxvariancevar_sampstddev_popstddev_sampcovar_popcovar_sampcorr
表生成函数
explodeposexplodejson_tuple
窗口函数
NTILEROW_NUMBERRANKDENSE_RANKCUME_DISTPERCENT_RANKLAGLEAD
参考链接:
Hive2.0函数大全
hive函数大全及使用示例
spark/sql/core/src/main/scala/org/apache/spark/sql/functions.scala