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

Wrong results when query has a HAVING clause but no aggregate or grouping exprs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • Impala 2.2.4
    • None
    • Frontend

    Description

      To reproduce:

      create table foo(a int);
      insert into foo values (1), (1);
      select 1 from foo having count(*) = 1; 
      1
      1
      select 1 from foo having count(*) = 2;
      1
      1
      

      In Postgres the same queries return:

      select 1 from foo having count(*) = 1; 
      (0 rows)
      select 1 from foo having count(*) = 2;
      1
      

      Attachments

        Activity

          People

            alex.behm Alexander Behm
            dtsirogiannis Dimitris Tsirogiannis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: