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

Incorrect results with codegen on multi-column group by with NULLs.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Impala 1.2.3
    • Fix Version/s: Impala 1.3
    • Component/s: None
    • Labels:
      None

      Description

      Looks like a bug in subexpression elimination. I manually disabled it and the query results were correct even with codegen enabled.

      Data

      create table foo (x int, y int);
      insert into foo values(1, 1);
      insert into foo values(1, 2);
      insert into foo values(2, 2);
      insert into foo values(1, NULL);
      insert into foo values(2, NULL);
      

      Query with codegen enabled

      Query: select x > 1, y > 1, x from foo group by 1, 2, 3
      +-------+-------+------+
      | x > 1 | y > 1 | x    |
      +-------+-------+------+
      | false | NULL  | NULL |
      | false | false | 1    |
      | true  | NULL  | NULL |
      | false | true  | 1    |
      | true  | true  | 2    |
      +-------+-------+------+
      

      Query with codegen disabled (or with codegen enabled but subexpr elim commented out)

      Query: select x > 1, y > 1, x from foo group by 1, 2, 3
      +-------+-------+---+
      | x > 1 | y > 1 | x |
      +-------+-------+---+
      | true  | NULL  | 2 |
      | false | false | 1 |
      | false | NULL  | 1 |
      | false | true  | 1 |
      | true  | true  | 2 |
      +-------+-------+---+
      

        Attachments

          Activity

            People

            • Assignee:
              nong_impala_60e1 Nong Li
              Reporter:
              alex.behm Alexander Behm
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: