[
https://issues.apache.org/jira/browse/HIVE-12701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Damien Carol updated HIVE-12701:
--------------------------------
Description:
{code:sql}
create table hive_aprm02ht7(a int, b int, c int) partitioned by (p boolean) row
format delimited fields terminated by ',' stored as textfile;
load data local inpath 'hive_data8.txt' into table hive_aprm02ht7 partition
(p=true);
load data local inpath 'hive_data8.txt' into table hive_aprm02ht7 partition
(p=false);
describe hive_aprm02ht7;
{code}
{noformat}
col_name data_type comment
a int
b int
c int
p boolean
# Partition Information
# col_name data_type comment
p boolean
{noformat}
{code:sql}
show partitions hive_aprm02ht7;
{code}
{noformat}
OK
p=false
p=true
Time taken: 0.057 seconds, Fetched: 2 row(s)
{noformat}
-- everything is shown as true. But first three should be true and the last
three rows should be false
{noformat}
hive> select * from hive_aprm02ht7 where p in (true,false);
OK
1 2 3 true
4 5 6 true
7 8 9 true
1 2 3 true
4 5 6 true
7 8 9 true
Time taken: 0.068 seconds, Fetched: 6 row(s)
{noformat}
was:
create table hive_aprm02ht7(a int, b int, c int) partitioned by (p boolean) row
format delimited fields terminated by ',' stored as textfile;
load data local inpath 'hive_data8.txt' into table hive_aprm02ht7 partition
(p=true);
load data local inpath 'hive_data8.txt' into table hive_aprm02ht7 partition
(p=false);
describe hive_aprm02ht7;
col_name data_type comment
a int
b int
c int
p boolean
# Partition Information
# col_name data_type comment
p boolean
show partitions hive_aprm02ht7;
OK
p=false
p=true
Time taken: 0.057 seconds, Fetched: 2 row(s)
-- everything is shown as true. But first three should be true and the last
three rows should be false
hive> select * from hive_aprm02ht7 where p in (true,false);
OK
1 2 3 true
4 5 6 true
7 8 9 true
1 2 3 true
4 5 6 true
7 8 9 true
Time taken: 0.068 seconds, Fetched: 6 row(s)
> select on table with boolean as partition column shows wrong result
> -------------------------------------------------------------------
>
> Key: HIVE-12701
> URL: https://issues.apache.org/jira/browse/HIVE-12701
> Project: Hive
> Issue Type: Bug
> Components: Database/Schema, SQL
> Affects Versions: 1.1.0
> Reporter: Sudipto Nandan
> Assignee: Chinna Rao Lalam
>
> {code:sql}
> create table hive_aprm02ht7(a int, b int, c int) partitioned by (p boolean)
> row format delimited fields terminated by ',' stored as textfile;
> load data local inpath 'hive_data8.txt' into table hive_aprm02ht7 partition
> (p=true);
> load data local inpath 'hive_data8.txt' into table hive_aprm02ht7 partition
> (p=false);
> describe hive_aprm02ht7;
> {code}
> {noformat}
> col_name data_type comment
> a int
> b int
> c int
> p boolean
> # Partition Information
> # col_name data_type comment
> p boolean
> {noformat}
> {code:sql}
> show partitions hive_aprm02ht7;
> {code}
> {noformat}
> OK
> p=false
> p=true
> Time taken: 0.057 seconds, Fetched: 2 row(s)
> {noformat}
> -- everything is shown as true. But first three should be true and the last
> three rows should be false
> {noformat}
> hive> select * from hive_aprm02ht7 where p in (true,false);
> OK
> 1 2 3 true
> 4 5 6 true
> 7 8 9 true
> 1 2 3 true
> 4 5 6 true
> 7 8 9 true
> Time taken: 0.068 seconds, Fetched: 6 row(s)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)