`
乡里伢崽
  • 浏览: 108625 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

hive 内置函数

    博客分类:
  • 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
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics