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

Scalar subquery with having throws exception

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.0
    • Component/s: Query Planning
    • Labels:

      Description

      Following query throws an exception

      select sum(p_retailprice) from part group by p_type having sum(p_retailprice) > (select max(pp.p_retailprice) from part pp);
      
      SemanticException [Error 10004]: Line 3:40 Invalid table alias or column reference 'pp': (possible column names are: p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, p_retailprice, p_comment)
      

        Attachments

        1. HIVE-15812.1.patch
          37 kB
          Vineet Garg

          Activity

            People

            • Assignee:
              vgarg Vineet Garg
              Reporter:
              vgarg Vineet Garg
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: