like
hive中模糊匹配含有某些文字的数据。
select *
from comment_base_all
where content like '%word(.*?)$';
select *
from comment_base_all
where content like '(.*?)word1(.*?)word2(.*?)';
select *
from comment_base_all
where content not like '(.*?)word1(.*?)word2(.*?)';
regexp
在hive中匹配文本数据内含word1、word2、...、wordn中至少一个词语的数据。
select *
from comment_base_all
where content regexp 'word1|word2|word3|...|wordn'