[Django] #27646: Group by modifiers, OLAP functionality

47 views
Skip to first unread message

Django

unread,
Dec 27, 2016, 6:24:03 AM12/27/16
to django-...@googlegroups.com
#27646: Group by modifiers, OLAP functionality
-------------------------------------+-------------------------------------
Reporter: Mads | Owner: nobody
Jensen |
Type: New | Status: new
feature |
Component: Database | Version: master
layer (models, ORM) |
Severity: Normal | Keywords: olap rollup orm
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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

--
Ticket URL: <https://code.djangoproject.com/ticket/27646>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 27, 2016, 8:53:35 AM12/27/16
to django-...@googlegroups.com
#27646: Add QuerySet support for group by modifiers and OLAP functionality
-------------------------------------+-------------------------------------
Reporter: Mads Jensen | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: olap rollup orm | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Accepted


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/27646#comment:1>

Django

unread,
Apr 3, 2020, 5:25:04 AM4/3/20
to django-...@googlegroups.com
#27646: Add QuerySet support for group by modifiers and OLAP functionality
-------------------------------------+-------------------------------------

Reporter: Mads Jensen | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: olap rollup orm | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Adam (Chainz) Johnson):

* cc: Adam (Chainz) Johnson (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/27646#comment:2>

Django

unread,
Aug 8, 2020, 12:27:07 PM8/8/20
to django-...@googlegroups.com
#27646: Add QuerySet support for group by modifiers and OLAP functionality
-------------------------------------+-------------------------------------

Reporter: Mads Jensen | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: olap rollup orm | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Hannes Ljungberg):

* cc: Hannes Ljungberg (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/27646#comment:3>

Django

unread,
Aug 11, 2022, 7:35:59 AM8/11/22
to django-...@googlegroups.com
#27646: Add QuerySet support for group by modifiers and OLAP functionality
-------------------------------------+-------------------------------------

Reporter: Mads Jensen | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: dev

(models, ORM) |
Severity: Normal | Resolution:
Keywords: olap rollup orm | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by John Speno):

* cc: John Speno (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/27646#comment:4>

Django

unread,
Jul 4, 2023, 1:40:39 PM7/4/23
to django-...@googlegroups.com
#27646: Add QuerySet support for group by modifiers and OLAP functionality
-------------------------------------+-------------------------------------

Reporter: Mads Jensen | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: olap rollup orm | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by David Sanders):

* cc: David Sanders (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/27646#comment:5>

Django

unread,
May 5, 2025, 8:18:40 AM5/5/25
to django-...@googlegroups.com
#27646: Add QuerySet support for group by modifiers and OLAP functionality
-------------------------------------+-------------------------------------
Reporter: Mads Jensen | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: olap rollup orm | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tilman Koschnick):

* cc: Tilman Koschnick (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/27646#comment:6>
Reply all
Reply to author
Forward
0 new messages