Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-2113

Uninformative error message when combining SELECT DISTINCT with aggregate function in HAVING clause

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Impala 2.2
    • Fix Version/s: Impala 2.5.0, Impala 2.3.2
    • Component/s: None
    • Environment:
      Impala v2.2.0-cdh5.4.2 on CentOS 6.5

      Description

      As shown below, queries that combine SELECT DISTINCT with a HAVING clause (but without a GROUP BY clause) containing an aggregate function fail with an uninformative error message, rather than the expected "ERROR: AnalysisException: cannot combine SELECT DISTINCT with aggregate functions or GROUP BY".

      > select * from test2;
      Query: select * from test2
      +-------------+------+-----+
      | id          | num  | prt |
      +-------------+------+-----+
      | charlie     | NULL | t2  |
      | asdfssdfasd | NULL | tst |
      | asdfs       | NULL | tst |
      +-------------+------+-----+
      Fetched 3 row(s) in 0.39s
      
       > select distinct id from test2 having sum(num) > 0;
      Query: select distinct id from test2 having sum(num) > 0
      ERROR: AnalysisException: null
      CAUSED BY: IllegalStateException: null
      
      

        Attachments

          Activity

            People

            • Assignee:
              cchanning Chris Channing
              Reporter:
              cflowers@varickmm.com_impala_259e Charlie Flowers
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: