hive一个字段包含另一个字段

hive一个字段包含另一个字段

1.源数据表t
a b
yu yuxiaogang

 

array_contains(split(,'  '),a)
 
 
 
 
where array_contains(split(phone_zzlx.name,' ')

 

 

--HiveSQL题——array_contains函数

select
        id,
        oid,
        contains,
        if(array_contains(contains, oid), 1, 0) as flag
from ( 
         select
               id,
               oid,
               collect_set(if(oid = 0, id, null)) over () contains
          from table18
      ) tmp1;

select * 
from login 
where dt='20130101' 
  and (ver !='3.1' or ver !='3.2' 
                   or ver != '4.0' 
                   or ver != '5.2');
 
select * 
from login 
where dt='20130101' 
and (ver !='3.1' and ver !='3.2' 
                 and ver != '4.0' 
                 and ver != '5.2');


select * 
from login 
where dt=20130101 
and !array_contains(split('3.1,3.2,4.0,5.2',','),ver);

https://blog.csdn.net/ths512/article/details/121535237

posted @ 2022-04-19 17:25  cup_leo  阅读(969)  评论(0)    收藏  举报