Yingyi Bu created ASTERIXDB-1227:
------------------------------------

             Summary: Support standalone global aggregation in SQL++
                 Key: ASTERIXDB-1227
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1227
             Project: Apache AsterixDB
          Issue Type: Bug
          Components: AsterixDB, Optimizer
            Reporter: Yingyi Bu


In the current master, the following global aggregation query in SQL++ does not 
work: 
SELECT deptId AS deptId, SUM(e.salary + b.bonus) AS totalCompensation
FROM Employee e JOIN Bonus b ON e.job_category = b.job_category

It should be a sugar of the following query:

SELECT deptId AS deptId, SUM(e.salary + b.bonus) AS totalCompensation
FROM Employee e JOIN Bonus b ON e.job_category = b.job_category
GROUP BY 1

A rewriting rule is also needed to make sure the final optimized query plan 
does not have group-by operators.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to