Hive是否支持in函数

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上可以看到

https://en.wikipedia.org/wiki/Apache_Hive

但是in的对象是select子查询的话,是一定不支持的

猜你喜欢

转载自blog.csdn.net/zhanaolu4821/article/details/81871041