美文网首页
hive函数

hive函数

作者: echolvan | 来源:发表于2020-01-11 13:27 被阅读0次

时间函数

与sql不同的点

sql hive 解释
now() current_date() 选取现在时间

hive特有的集合函数

Return Type Name(Signature) Description
int size(Map<K.V>) Returns the number of elements in the map type.求map的长度
int size(Array<T>) Returns the number of elements in the array type.求数组的长度
array<K> map_keys(Map<K.V>) Returns an unordered array containing the keys of the input map.返回map中的所有key
array<V> map_values(Map<K.V>) Returns an unordered array containing the values of the input map.返回map中的所有value
boolean array_contains(Array<T>, ) Returns TRUE if the array contains value.如该数组Array<T>包含value返回true。,否则返回false
array sort_array(Array<T>) Sorts the input array in ascending order according to the natural ordering of the array elements and returns it (as of version 0.9.0).按自然顺序对数组进行排序并返回

相关文章

网友评论

      本文标题:hive函数

      本文链接:https://www.haomeiwen.com/subject/mggvactx.html