时间函数
与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).按自然顺序对数组进行排序并返回 |
网友评论