目前,我正在使用Hive进行一些数据探索,无法解释以下行为。假设我有一个带有字段master_id的表(名为mytable)。当我数一数我得到的行数c如果我想用非空master_id来计数行数,我会得到一个更高的数目。select count(*) as c from mytable where master_id is not null1134041
此外
将WHERE子句与NOT LIKE在my_text_column上使用时,将跳过null值。SELECT count(id) FROM public.mytable;-------SELECT count(id) FROM public.mytable WHERE my_text_column LIKE 'foo';-------SELECT count(id) FROM public.mytable WHERE my_text_column NOT LIKE 'foo'