hive 内置函数
1.sort_array(): sort_array(array(obj1, obj2,...)) - Sorts the input array in ascending order according to the natural ordering of the array elements. Example:
SELECT sort_array(array('b', 'd', 'c', 'a')) FROM src LIMIT 1; 'a', 'b', 'c', 'd' 2.ads(): abs(x) - returns the absolute value of x Example: SELECT abs(0) FROM src LIMIT 1; 0 SELECT abs(-5) FROM src LIMIT 1; 5 3,array_contains() array_contains(array, value) - Returns TRUE if the array contains value. Example: SELECT array_contains(array(1, 2, 3), 2) FROM src LIMIT 1; true