Harish Butani created HIVE-5874:
-----------------------------------

             Summary: SubQuery: better error handling when SQ and Outer Query 
has the same table alias
                 Key: HIVE-5874
                 URL: https://issues.apache.org/jira/browse/HIVE-5874
             Project: Hive
          Issue Type: Bug
            Reporter: Harish Butani
            Priority: Minor


The following query
{noformat}
select * from src where key in (select key from src where src.key > '1')
{noformat}

Gives the following message:
{noformat}
emanticException [Error 10249]: Line 1:58 Unsupported SubQuery Expression 
''1'': SubQuery expression refers to Outer query expressions only.
{noformat}

Whereas the user is attempting to express an uncorrelated Subquery.
The ambiguity is because we attempt to resolve references against  the Outer 
Query first. This is an implementation detail, see the Sub Query spec for 
details. For now it is better to disallow such SubQueries.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to