hive支持in用法是从0.3.2版本后

写hive 用in

如分时段,分类型,分平台统计点击量

select substr(createtime,12,2) hour,logtype,os_id,count(*) 
from  wizad_mdm_raw_hdfs raw
where ad_id in ('19829','19830','19831','26657d5ff9020d2abefe558796b99584') and adn=5
group by substr(createtime,12,2),logtype,os_id


ad_id 有很多,所以用in。这只有0.3.2后才能使用。

之前版本不支持,这就是网上有人说hive不支持in用法。hive wiki上可以看到


如果感兴趣可以自测一下,也许可以。但是in的对象是select子查询的话,是一定不支持的


posted on 2015-01-28 16:50  代码王子  阅读(240)  评论(0编辑  收藏  举报

导航