Hive
  1. Hive
  2. HIVE-5874

SubQuery: better error handling when SQ and Outer Query has the same table alias

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The following query

      select * from src where key in (select key from src where src.key > '1')
      

      Gives the following message:

      emanticException [Error 10249]: Line 1:58 Unsupported SubQuery Expression ''1'': SubQuery expression refers to Outer query expressions only.
      

      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.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Harish Butani
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development