【发布时间】:2016-05-19 12:34:18
【问题描述】:
当我对 hive 表上的非空值执行 select 语句时,响应中没有正确的结果。结果好像没有“is not null”表达式!
示例:
select count(*)
from test_table
where test_col_id1='12345' and test_col_id2 is not null;
注意test_col_id1 和test_col_id2 不是分区键。
这是我的蜂巢版本。
Hive 0.14.0.2.2.0.0-2041
这是桌子:
... | test_col_id1 | test_col_id2 |
... | 12345 | x |
... | 12345 |空 |
此查询返回 2 条记录。
【问题讨论】:
-
您使用的是哪种 SerDe:Text、Sequence、AVRO、Parquet、ORC?当您选择一个您认为为 Null 的行时,它会显示为“null”还是空字符串?
-
Hive 的哪个版本?使用 TEZ (哪个版本) 或普通 MapReduce?
-
我正在从命令行进行查询。当我查询记录时,我在命令行上看到一个 NULL。