You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Pengcheng Xiong (JIRA)" <ji...@apache.org> on 2016/07/31 18:01:20 UTC
[jira] [Updated] (HIVE-14393) Tuple in list feature fails if
there's only 1 tuple in the list
[ https://issues.apache.org/jira/browse/HIVE-14393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pengcheng Xiong updated HIVE-14393:
-----------------------------------
Attachment: HIVE-14393.01.patch
> 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
> Attachments: HIVE-14393.01.patch
>
>
> 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)