You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Paul Yang (JIRA)" <ji...@apache.org> on 2010/05/07 22:45:48 UTC

[jira] Updated: (HIVE-801) row-wise IN would be useful

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

Paul Yang updated HIVE-801:
---------------------------

    Attachment: HIVE-801.1.patch

This patch supports IN using the SQL syntax:

{code}
SELECT * FROM src WHERE key in(238, 11, ...)
{code}

Currently, we only support column names / expressions with in. For a case like WHERE a.foo IN (b.*) , we'll need to support column regexes like SELECT. I'm not sure if that is a big use case though, as most functions take a fixed number of arguments anyway.

> row-wise IN would be useful
> ---------------------------
>
>                 Key: HIVE-801
>                 URL: https://issues.apache.org/jira/browse/HIVE-801
>             Project: Hadoop Hive
>          Issue Type: New Feature
>            Reporter: Adam Kramer
>            Assignee: Paul Yang
>         Attachments: HIVE-801.1.patch
>
>
> SELECT * FROM tablename t
> WHERE IN(12345,key1,key2,key3);
> ...IN would operate on a given row, and return True when the first argument equaled at least one of the other arguments. So here IN would return true if 12345=key1 OR 12345=key2 OR 12345=key3 (but wouldn't test the latter two if the first matched).
> This would also help with https://issues.apache.org/jira/browse/HIVE-783, if IN were implemented in a manner that allows it to be used in an ON clause.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.