首页 > 其他 > 详细

Hive 中函数总结

时间:2015-10-26 22:24:38      阅读:354      评论:0      收藏:0      [点我收藏+]

Hive supports three types of conditional functions. These functions are listed below:


IF( Test Condition, True Value, False Value ) 
The IF condition evaluates the “Test Condition” and if the “Test Condition” is true, then it returns the “True Value”. Otherwise, it returns the False Value.
Example: IF(1=1, ‘working‘, ‘not working‘) returns ‘working‘

COALESCE( value1,value2,... )

The COALESCE function returns the fist not NULL value from the list of values. If all the values in the list are NULL, then it returns NULL.
Example: COALESCE(NULL,NULL,5,NULL,4) returns 5

Hive 中函数总结

原文:http://www.cnblogs.com/yxzfscg/p/4912379.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!