You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2017/06/01 18:46:04 UTC

[jira] [Created] (CALCITE-1822) Push Aggregate that follows Aggregate down to Druid

Julian Hyde created CALCITE-1822:
------------------------------------

             Summary: Push Aggregate that follows Aggregate down to Druid
                 Key: CALCITE-1822
                 URL: https://issues.apache.org/jira/browse/CALCITE-1822
             Project: Calcite
          Issue Type: Bug
          Components: druid
            Reporter: Julian Hyde
            Assignee: Julian Hyde


Push Aggregate that follows Aggregate down to Druid. This can occur if the SQL has an aggregate function applied to an aggregate function, or with a sub-query in the FROM clause.

{code}
SELECT MAX(COUNT(*))
FROM Emp
GROUP BY deptno

SELECT MAX(c) FROM (
  SELECT deptno, COUNT(*) AS c
  FROM Emp
  GROUP BY deptno)
{code}

And there are other possibilities where there is a Project and/or a Filter after the first Aggregate and before the second Aggregate.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)