You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Matthew Weaver (JIRA)" <ji...@apache.org> on 2013/06/29 03:44:22 UTC

[jira] [Updated] (HIVE-784) Support uncorrelated subqueries in the WHERE clause

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

Matthew Weaver updated HIVE-784:
--------------------------------

    Release Note: Not ready for release
          Status: Patch Available  (was: In Progress)

Support subqueries for 'WHERE IN (<subquery>)', initial version.

This is an initial implementation, not ready for submission (details below).
Nevertheless I would welcome comments on the approach.

- ASTRewriter.inSubqueryToJoin().  Currently is called right after
  parsing, but will probably have to move later for proper alias
  generation.
- This early version hard-codes a generated alias "t2" for subquery.  To
  fix, with guarantee of unique alias, will require moving the rewrite
  into SemanticAnalyzer.analyzeInternal() after getMetaData().
- Currently only handles a top-level occurrence of WHERE IN
  (<subquery>).  Any nested occurrences will fail.

                
> Support uncorrelated subqueries in the WHERE clause
> ---------------------------------------------------
>
>                 Key: HIVE-784
>                 URL: https://issues.apache.org/jira/browse/HIVE-784
>             Project: Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Ning Zhang
>            Assignee: Matthew Weaver
>
> Hive currently only support views in the FROM-clause, some Facebook use cases suggest that Hive should support subqueries such as those connected by IN/EXISTS in the WHERE-clause. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira