[
https://issues.apache.org/jira/browse/HIVE-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16415874#comment-16415874
]
Steve Yeom edited comment on HIVE-18999 at 3/27/18 4:29 PM:
------------------------------------------------------------
We can further shorten the test case:
create table table1(col1 bigint);
insert into table1 values (2014);
-- CORRECT : case 1
SELECT COUNT(t1.col1) from table1 t1 where struct(col1) in (struct("2014"));
-- INCORRECT: case 2
SELECT COUNT(t1.col1) from table1 t1 where struct(col1) in (struct(2014));
create table table2(col2 int);
insert into table2 values (2014);
-- CORRECT: case 3
SELECT COUNT(t2.col2) from table2 t2 where struct(col2) in (struct(2014));
was (Author: steveyeom2017):
We can further shorten the test case:
create table table1(col1 bigint);
insert into table1 values (2014);
-- CORRECT
SELECT COUNT(t1.col1) from table1 t1 where struct(col1) in (struct("2014"));
-- INCORRECT
SELECT COUNT(t1.col1) from table1 t1 where struct(col1) in (struct(2014));
create table table2(col2 int);
insert into table2 values (2014);
-- CORRECT
SELECT COUNT(t2.col2) from table2 t2 where struct(col2) in (struct(2014));
> Filter operator does not work for List
> --------------------------------------
>
> Key: HIVE-18999
> URL: https://issues.apache.org/jira/browse/HIVE-18999
> Project: Hive
> Issue Type: Bug
> Components: Query Processor
> Affects Versions: 3.0.0
> Reporter: Steve Yeom
> Assignee: Steve Yeom
> Priority: Major
>
> {code:sql}
> create table table1(col0 int, col1 bigint, col2 string, col3 bigint, col4
> bigint);
> insert into table1 values (1, 10000, 'ccl',2014, 11);
> insert into table1 values (1, 10000, 'ccl',2015, 11);
> insert into table1 values (1, 10000, 'ccl',2014, 11);
> insert into table1 values (1, 10000, 'ccl',2013, 11);
> -- INCORRECT
> SELECT COUNT(t1.col0) from table1 t1 where struct(col3, col4) in
> (struct(2014,11));
> -- CORRECT
> SELECT COUNT(t1.col0) from table1 t1 where struct(col3, col4) in
> (struct('2014','11'));
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)