Hive
  1. Hive
  2. HIVE-7733

Ambiguous column reference error on query

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.13.0
    • Fix Version/s: 0.14.0
    • Component/s: None
    • Labels:
      None

      Description

      CREATE TABLE agg1 
        ( 
           col0 INT, 
           col1 STRING, 
           col2 DOUBLE 
        ); 
      
      explain SELECT single_use_subq11.a1 AS a1, 
             single_use_subq11.a2 AS a2 
      FROM   (SELECT Sum(agg1.col2) AS a1 
              FROM   agg1 
              GROUP  BY agg1.col0) single_use_subq12 
             JOIN (SELECT alias.a2 AS a0, 
                          alias.a1 AS a1, 
                          alias.a1 AS a2 
                   FROM   (SELECT agg1.col1 AS a0, 
                                  '42'      AS a1, 
                                  agg1.col0 AS a2 
                           FROM   agg1 
                           UNION ALL 
                           SELECT agg1.col1 AS a0, 
                                  '41'      AS a1, 
                                  agg1.col0 AS a2 
                           FROM   agg1) alias 
                   GROUP  BY alias.a2, 
                             alias.a1) single_use_subq11 
               ON ( single_use_subq11.a0 = single_use_subq11.a0 );
      

      Gets the following error:
      FAILED: SemanticException [Error 10007]: Ambiguous column reference a2
      Looks like this query had been working in 0.12 but starting failing with this error in 0.13

      1. HIVE-7733.7.patch.txt
        37 kB
        Navis
      2. HIVE-7733.6.patch.txt
        37 kB
        Navis
      3. HIVE-7733.5.patch.txt
        34 kB
        Navis
      4. HIVE-7733.4.patch.txt
        24 kB
        Navis
      5. HIVE-7733.3.patch.txt
        21 kB
        Navis
      6. HIVE-7733.2.patch.txt
        16 kB
        Navis
      7. HIVE-7733.1.patch.txt
        1 kB
        Navis

        Issue Links

          Activity

          Jason Dere created issue -
          Jason Dere made changes -
          Field Original Value New Value
          Affects Version/s 0.13.0 [ 12324986 ]
          Navis made changes -
          Attachment HIVE-7733.1.patch.txt [ 12662715 ]
          Navis made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Navis made changes -
          Attachment HIVE-7733.2.patch.txt [ 12664332 ]
          Navis made changes -
          Assignee Navis [ navis ]
          Navis made changes -
          Attachment HIVE-7733.2.patch.txt [ 12664332 ]
          Navis made changes -
          Attachment HIVE-7733.2.patch.txt [ 12664339 ]
          Navis made changes -
          Remote Link This issue links to "review board (Web Link)" [ 17539 ]
          Navis made changes -
          Attachment HIVE-7733.3.patch.txt [ 12667972 ]
          Navis made changes -
          Attachment HIVE-7733.4.patch.txt [ 12668234 ]
          Navis made changes -
          Attachment HIVE-7733.5.patch.txt [ 12673054 ]
          Navis made changes -
          Attachment HIVE-7733.6.patch.txt [ 12673292 ]
          Ashutosh Chauhan made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Navis made changes -
          Attachment HIVE-7733.7.patch.txt [ 12674068 ]
          Navis made changes -
          Attachment HIVE-7733.7.patch.txt [ 12674068 ]
          Navis made changes -
          Attachment HIVE-7733.7.patch.txt [ 12674704 ]
          Navis made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Navis made changes -
          Attachment HIVE-7733.7.patch.txt [ 12674704 ]
          Navis made changes -
          Attachment HIVE-7733.7.patch.txt [ 12674705 ]
          Ashutosh Chauhan made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Fix Version/s 0.15.0 [ 12328723 ]
          Resolution Fixed [ 1 ]
          Ashutosh Chauhan made changes -
          Fix Version/s 0.14.0 [ 12326450 ]
          Fix Version/s 0.15.0 [ 12328723 ]
          Thejas M Nair made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Yongzhi Chen made changes -
          Link This issue is related to HIVE-9528 [ HIVE-9528 ]

            People

            • Assignee:
              Navis
              Reporter:
              Jason Dere
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development