码迷,mamicode.com
首页 > 数据库 > 详细

Hive SQL测试

时间:2016-08-15 13:01:40      阅读:995      评论:0      收藏:0      [点我收藏+]

标签:

在spark的空表test上进行运算,注意结果差异:

select name,sum(if(age is null,0,age)) as ages from test group by name;//
select sum(if(age is null,0,age)) as ages from test group by name;//
select sum(if(age is null,0,age)) as ages from test; //null

 

Hive SQL测试

标签:

原文地址:http://www.cnblogs.com/yongwangzhiqian/p/5772497.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!