hive心得
hive经验
1.hive的join,不能将 t2 join t3 on t2.id=t3.id外边加括号
2.hive的union,不能给 t2 union all t3中的t2.t3加上括号
3.hive的column别名,不能取已经存在的column
4.if(x=1 and y=2,1,null) if函数条件只能是and or而且不能有嵌套,也就是带括号,所以in条件也不能有
要使用
CASE
WHEN Fruit = 'APPLE' THEN 'The owner is APPLE'
WHEN Fruit = 'ORANGE' THEN 'The owner is ORANGE'
ELSE 'It is another Fruit'
END
代替