Hadoop 在配置单元中,布尔类型的分区始终为true

Hadoop 在配置单元中,布尔类型的分区始终为true,hadoop,hive,Hadoop,Hive,最近我安装了包含Hive 1.1.0-CDH5.4.4的CDH5.4.4,然后我在Hive中发现了一些奇怪的东西: CREATE TABLE boolean_partition_test ( `assert` string) PARTITIONED BY ( `isreal` boolean ); insert into table boolean_partition_test partition(isreal=false) select 'Cloudy' from dual where d

最近我安装了包含
Hive 1.1.0-CDH5.4.4
的CDH5.4.4,然后我在Hive中发现了一些奇怪的东西:

CREATE TABLE boolean_partition_test
(
`assert` string)
PARTITIONED BY (
`isreal` boolean
);

insert into table boolean_partition_test partition(isreal=false) 
select 'Cloudy' from dual where ds='2015-11-01' limit 1;
当我运行以下查询时,我真不敢相信:

hive> show partitions boolean_partition_test;
OK
isreal=false
Time taken: 0.158 seconds, Fetched: 1 row(s)
hive> select * from boolean_partition_test;
OK
Cloudy  true
Time taken: 0.27 seconds, Fetched: 1 row(s)
我甚至在HDFS中得到了目录:
/user/hive/warehouse/boolean\u partition\u test/isreal=false

然后我尝试了动态分区方式:

CREATE TABLE boolean_partition_test2
(
`assert` string)
PARTITIONED BY (
`isreal` boolean
);

insert into table boolean_partition_test2 partition(isreal) 
select 'Cloudy' as assert, false as isreal from dual where ds='2015-11-01' limit 1;

事情还是。。在我将field
isreal
更改为type
string
之后,事情恢复了正常,但这不是我现在想要的。那么,在这种情况下,是什么让Hive变成了这样一个顽皮的孩子呢?

Hive
不能正确处理布尔分区列

请参考以下链接