類似: 在MYSQL里面我們可以這樣的執行SQL select a.Community,a.PID,b.spidertime,b.comm,b.showings,b.room from lianjia_list a ,RentHouse_lianjia b where a.site = 7 and b.city='北京' and b.comm like %a.Community%; 不行我們可以這樣 select a.Community,a.PID,b.spidertime,b.comm,b.showings,b.room from lianjia_list a ,RentHouse_lianjia b where a.site = 7 and b.city='北京' and b.comm like {%a.Community%}; 或者類似其他的我們可以直接%你要匹配的字段% 但是在hive里面不行,有人說這事一個BUG,並自定義UDF去完成這個操作,因為他轉義了! 今天我試了很多種方法,讓我頭疼了也很久 select a.Community,a.PID,b.spidertime,b.comm,b.showings,b.room from lianjia_list a ,RentHouse_lianjia b where a.site = 7 and b.city='北京' and b.comm like concat('%',a.Community,'%'); 發現,我們這樣用拼接字符串的方式來實現模糊匹配,大家試試吧!