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

Should not pushdown Filter through Aggregate without group keys

    XMLWordPrintableJSON

Details

    Description

      If we are given a query

      SELECT count FROM tbl HAVING false;

      This query should produce an empty set. 

      We should not allow a filter to pass through this aggregate.  When the aggregate has no group by, there is always one implied group (for the whole dataset).  So if we apply the filter before the aggregate, the implied group will still be created.  This is not what we want, since the filter should produce an empty set.

      Attachments

        Issue Links

          Activity

            People

              FrankZou Dan Zou
              scarlin Steve Carlin
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: