Opened 8 years ago
Last modified 20 months ago
#27646 new New feature
Add QuerySet support for group by modifiers and OLAP functionality
Description ¶
PostgreSQL 9.5 introduced cube
, grouping sets
and rollup
. MySQL/MariaDB supports the rollup
-operation for aggregations. Oracle (obviously) also supports rollup
, grouping sets
and cube
. I suggest adding methods in QuerySet
for this, feature-flags to indicate level of support, and either new expressions for the different rollup
-syntax, or amend the operations of the backends for this. The syntax is slightly different in MySQL/MariaDB, as it uses WITH ROLLUP
, rather than ROLLUP
.
https://oracle-base.com/articles/misc/rollup-cube-grouping-functions-and-grouping-sets
http://dev.mysql.com/doc/refman/5.7/en/group-by-modifiers.html
https://www.postgresql.org/docs/current/static/queries-table-expressions.html#QUERIES-GROUPING-SETS
According to the ticket's flags, the next step(s) to move this issue forward are:
- To provide a patch by sending a pull request. Claim the ticket when you start working so that someone else doesn't duplicate effort. Before sending a pull request, review your work against the patch review checklist. Check the "Has patch" flag on the ticket after sending a pull request and include a link to the pull request in the ticket comment when making that update. The usual format is:
[https://github.com/django/django/pull/#### PR]
.
Change History (5)
comment:1 by , 8 years ago
Summary: | Group by modifiers, OLAP functionality → Add QuerySet support for group by modifiers and OLAP functionality |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 5 years ago
Cc: | added |
---|
comment:3 by , 5 years ago
Cc: | added |
---|
comment:4 by , 3 years ago
Cc: | added |
---|
comment:5 by , 20 months ago
Cc: | added |
---|
Tentatively accepting. It might be nice to elaborate on the details such as by writing documentation and getting feedback on that before starting to code.