Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-799

Incorrect result for "HAVING count(*) > 1"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0-incubating
    • Fix Version/s: 1.4.0-incubating
    • Component/s: None
    • Labels:
      None

      Activity

      Hide
      jnadeau Jacques Nadeau added a comment -

      Resolved in release 1.4.0-incubating (2015-08-23)

      Show
      jnadeau Jacques Nadeau added a comment - Resolved in release 1.4.0-incubating (2015-08-23)
      Hide
      julianhyde Julian Hyde added a comment -

      Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/92f32e8d.

      FilterAggregateTransposeRule was mixing up group keys, and as a result would sometimes push down a filter on an aggregate function when it should not have.

      Show
      julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/92f32e8d . FilterAggregateTransposeRule was mixing up group keys, and as a result would sometimes push down a filter on an aggregate function when it should not have.
      Hide
      julianhyde Julian Hyde added a comment -

      The query in http://calcite.incubator.apache.org/docs/ has this problem:

      select d.deptno, min(e.empid)
      from hr.emps as e
      join hr.depts as d
        on e.deptno = d.deptno
      group by d.deptno
      having count(*) > 1
      

      How embarrassing.

      Show
      julianhyde Julian Hyde added a comment - The query in http://calcite.incubator.apache.org/docs/ has this problem: select d.deptno, min(e.empid) from hr.emps as e join hr.depts as d on e.deptno = d.deptno group by d.deptno having count(*) > 1 How embarrassing.

        People

        • Assignee:
          julianhyde Julian Hyde
          Reporter:
          zqhxuyuan qihuang.zheng
        • Votes:
          0 Vote for this issue
          Watchers:
          3 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development