[Django] #37028: Cross-database support for `BitAnd()`, `BitOr()`, and `BitXor()` aggregates

26 views
Skip to first unread message

Django

unread,
Apr 9, 2026, 4:59:32 PMApr 9
to django-...@googlegroups.com
#37028: Cross-database support for `BitAnd()`, `BitOr()`, and `BitXor()` aggregates
-------------------------------------+-------------------------------------
Reporter: Mariusz | Owner: Mariusz Felisiak
Felisiak |
Type: New | Status: assigned
feature |
Component: Database | Version: 6.0
layer (models, ORM) | Keywords: oracle mysql
Severity: Normal | aggregates bit
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
I'd like to propose adding cross-database support for `BitAnd()`,
`BitOr()`, and `BitXor()` aggregates (currently implemented in
`django.contrib.postgres.aggregates`):
- [https://docs.oracle.com/en/database/oracle/oracle-
database/21/sqlrf/BIT_AND_AGG.html BIT_AND_AGG()],
[https://docs.oracle.com/en/database/oracle/oracle-
database/21/sqlrf/BIT_OR_AGG.html BIT_OR_AGG()], and
[https://docs.oracle.com/en/database/oracle/oracle-
database/21/sqlrf/BIT_XOR_AGG.html BIT_XOR_AGG()] (Oracle 21c+)
- [https://dev.mysql.com/doc/refman/8.4/en/aggregate-functions.html
#function_bit-and BIT_AND()], [https://dev.mysql.com/doc/refman/8.4/en
/aggregate-functions.html#function_bit-or BIT_OR()], and
[https://dev.mysql.com/doc/refman/8.4/en/aggregate-functions.html
#function_bit-xor BIT_XOR] (MySQL 8.4+)
--
Ticket URL: <https://code.djangoproject.com/ticket/37028>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 9, 2026, 4:59:45 PMApr 9
to django-...@googlegroups.com
#37028: Cross-database support for `BitAnd()`, `BitOr()`, and `BitXor()` aggregates
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle mysql | Triage Stage:
aggregates bit | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* cc: Mariusz Felisiak (added)

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

Django

unread,
Apr 9, 2026, 6:30:42 PMApr 9
to django-...@googlegroups.com
#37028: Cross-database support for `BitAnd()`, `BitOr()`, and `BitXor()` aggregates
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle mysql | Triage Stage: Accepted
aggregates bit |
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

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

Django

unread,
Apr 11, 2026, 2:31:38 AMApr 11
to django-...@googlegroups.com
#37028: Cross-database support for `BitAnd()`, `BitOr()`, and `BitXor()` aggregates
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle mysql | Triage Stage: Accepted
aggregates bit |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by MANAS MADESHIYA):

* cc: MANAS MADESHIYA (added)

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

Django

unread,
Apr 11, 2026, 2:00:58 PMApr 11
to django-...@googlegroups.com
#37028: Cross-database support for `BitAnd()`, `BitOr()`, and `BitXor()` aggregates
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle mysql | Triage Stage: Accepted
aggregates bit |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* has_patch: 0 => 1

Comment:

[https://github.com/django/django/pull/21092 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/37028#comment:4>

Django

unread,
Apr 13, 2026, 7:33:43 AMApr 13
to django-...@googlegroups.com
#37028: Cross-database support for `BitAnd()`, `BitOr()`, and `BitXor()` aggregates
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle mysql | Triage Stage: Accepted
aggregates bit |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by JaeHyuckSa):

* needs_better_patch: 0 => 1

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

Django

unread,
Apr 13, 2026, 4:00:20 PMApr 13
to django-...@googlegroups.com
#37028: Cross-database support for `BitAnd()`, `BitOr()`, and `BitXor()` aggregates
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle mysql | Triage Stage: Accepted
aggregates bit |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/37028#comment:6>

Django

unread,
Apr 17, 2026, 11:14:35 AMApr 17
to django-...@googlegroups.com
#37028: Cross-database support for `BitAnd()`, `BitOr()`, and `BitXor()` aggregates
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle mysql | Triage Stage: Ready for
aggregates bit | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/37028#comment:7>

Django

unread,
Apr 18, 2026, 2:53:30 AMApr 18
to django-...@googlegroups.com
#37028: Cross-database support for `BitAnd()`, `BitOr()`, and `BitXor()` aggregates
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: New feature | Status: closed
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: oracle mysql | Triage Stage: Ready for
aggregates bit | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"ed79c5959add54b6e8ea589ec601e0d2e801517e" ed79c59]:
{{{#!CommitTicketReference repository=""
revision="ed79c5959add54b6e8ea589ec601e0d2e801517e"
Fixed #37028 -- Added BitAnd(), BitOr(), and BitXor() aggregates.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37028#comment:8>
Reply all
Reply to author
Forward
0 new messages