Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-5874

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhbutani Harish Butani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: