[ 
https://issues.apache.org/jira/browse/HIVE-14393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pengcheng Xiong reassigned HIVE-14393:
--------------------------------------

    Assignee: Pengcheng Xiong

> Tuple in list feature fails if there's only 1 tuple in the list
> ---------------------------------------------------------------
>
>                 Key: HIVE-14393
>                 URL: https://issues.apache.org/jira/browse/HIVE-14393
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>            Reporter: Carter Shanklin
>            Assignee: Pengcheng Xiong
>
> So this works:
> {code}
> hive> select * from test where (x,y) in ((1,1),(2,2));
> OK
> 1     1
> 2     2
> Time taken: 0.063 seconds, Fetched: 2 row(s)
> {code}
> And this doesn't:
> {code}
> hive> select * from test where (x,y) in ((1,1));
> org.antlr.runtime.EarlyExitException
>       at 
> org.apache.hadoop.hive.ql.parse.HiveParser_IdentifiersParser.precedenceEqualExpressionMutiple(HiveParser_IdentifiersParser.java:9510)
> {code}
> If I'm generating SQL I'd like to not have to special case 1 tuple.
> As a point of comparison this works in Postgres:
> {code}
> vagrant=# select * from test where (x, y) in ((1, 1));
>  x | y
> ---+---
>  1 | 1
> (1 row)
> {code}
> Any thoughts on this [~pxiong] ?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to