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

Improve error handling for subqueries if there is wrong column reference

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1
    • Query Planning
    • None

    Description

      If there is a column reference within subquery which doesn't exist Hive throws misleading error message.
      e.g. 

      select * from table1 where table1.col1 IN (select col2 from table2 where table2.col1=table1.non_existing_column) and table1.col1 IN (select 4);
      

      The above query, assuming table1 doesn't have non_existing_column, will throw following misleading error:

      FAILED: SemanticException Line 0:-1 Unsupported SubQuery Expression 'col1': Only 1 SubQuery expression is supported.
      

      Attachments

        1. HIVE-18725.10.patch
          10 kB
          Igor Kryvenko
        2. HIVE-18725.09.patch
          6 kB
          Igor Kryvenko
        3. HIVE-18725.08.patch
          6 kB
          Igor Kryvenko
        4. HIVE-18725.07.patch
          6 kB
          Igor Kryvenko
        5. HIVE-18725.06.patch
          5 kB
          Igor Kryvenko
        6. HIVE-18725.05.patch
          5 kB
          Igor Kryvenko
        7. HIVE-18725.04.patch
          5 kB
          Igor Kryvenko
        8. HIVE-18725.03.patch
          8 kB
          Igor Kryvenko
        9. HIVE-18725.02.patch
          3 kB
          Igor Kryvenko
        10. HIVE-18725.01.patch
          4 kB
          Igor Kryvenko

        Issue Links

          Activity

            People

              ikryvenko Igor Kryvenko
              vgarg Vineet Garg
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: