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

最新文章

  1. linux中ls命令
  2. Apache Spark源码走读之16 -- spark repl实现详解
  3. SQL Server ->> 分区表上创建唯一分区索引
  4. URAL1133. Fibonacci Sequence(二分)
  5. Linux的网卡由eth0变成了eth1,如何修复?
  6. !!!全球最流行开源硬件平台!不知道就OUT了!
  7. Dockerfile与Docker构建流程解读
  8. Redis 安装(一)
  9. DAY5-小别-2018-1-15
  10. Ceph rdb
  11. 【转】Install Win32 OpenSSH (test release)
  12. JS Replace 全部替换字符的用法小结
  13. HTML 选择目录
  14. mac navicate 2013 - Lost connection to MySQL server at 'reading initial communication packet
  15. nginx 学习资料
  16. alv界面透视功能
  17. js解码编码decodeURI与decodeURIComponent区别
  18. java实现返回一个字符串所有排列
  19. 基于python 3.5 所做的找出来一个字符串中最长不重复子串算法
  20. CUBA Platform —— 开源的、可靠的企业级应用开发利器

热门文章

  1. Nutch配置:nutch-default.xml详解
  2. ListView中EditText的数据加载错乱的问题
  3. UVA 11401 - Triangle CountingTriangle Counting 数学
  4. Assembly(c#中简单说明[转]
  5. Visual Studio 2010 快捷键
  6. 关于HTTP协议的学习
  7. python FTP上传和下载文件
  8. QT中显示GIF图片
  9. 针对安卓java入门:运算符和表达式
  10. POJ3267——The Cow Lexicon(动态规划)