[Django] #31584: Queryset crashes when gruping by Exists() on Oracle.

6 views
Skip to first unread message

Django

unread,
May 14, 2020, 2:13:05 AM5/14/20
to django-...@googlegroups.com
#31584: Queryset crashes when gruping by Exists() on Oracle.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: felixxm
Type: Bug | Status: assigned
Component: Database | Version: 3.0
layer (models, ORM) |
Severity: Release | Keywords: oracle exists
blocker | boolean
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Boolean expressions are not supported in the GROUP_BY clause on Oracle.
Noticed when polishing [https://github.com/django/django/pull/12911 PR].

Regression in efa1908f662c19038a944129c81462485c4a9fe8.

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

Django

unread,
May 14, 2020, 2:27:11 AM5/14/20
to django-...@googlegroups.com
#31584: Queryset crashes when grouping by Exists() on Oracle.

-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: felixxm
Type: Bug | Status: assigned
Component: Database layer | Version: 3.0
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: oracle exists | Triage Stage: Accepted
boolean |
Has patch: 0 | Needs documentation: 0

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

* stage: Unreviewed => Accepted


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

Django

unread,
May 14, 2020, 7:09:34 AM5/14/20
to django-...@googlegroups.com
#31584: Queryset crashes when grouping by Exists() on Oracle.

-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: felixxm
Type: Bug | Status: assigned
Component: Database layer | Version: 3.0
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: oracle exists | Triage Stage: Accepted
boolean |
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/12913 PR]

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

Django

unread,
May 14, 2020, 8:08:14 AM5/14/20
to django-...@googlegroups.com
#31584: Queryset crashes when grouping by Exists() on Oracle.

-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: felixxm
Type: Bug | Status: assigned
Component: Database layer | Version: 3.0
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: oracle exists | Triage Stage: Ready for
boolean | checkin
Has patch: 1 | Needs documentation: 0

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

* stage: Accepted => Ready for checkin


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

Django

unread,
May 14, 2020, 9:07:27 AM5/14/20
to django-...@googlegroups.com
#31584: Queryset crashes when grouping by Exists() on Oracle.

-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: felixxm
Type: Bug | Status: closed

Component: Database layer | Version: 3.0
(models, ORM) |
Severity: Release blocker | Resolution: fixed

Keywords: oracle exists | Triage Stage: Ready for
boolean | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

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


Comment:

In [changeset:"3a941230c85b2702a5e1cd97e17251ce21057efa" 3a94123]:
{{{
#!CommitTicketReference repository=""
revision="3a941230c85b2702a5e1cd97e17251ce21057efa"
Fixed #31584 -- Fixed crash when chaining values()/values_list() after
Exists() annotation and aggregation on Oracle.

Oracle requires the EXISTS expression to be wrapped in a CASE WHEN in
the GROUP BY clause.

Regression in efa1908f662c19038a944129c81462485c4a9fe8.
}}}

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

Django

unread,
May 14, 2020, 9:11:10 AM5/14/20
to django-...@googlegroups.com
#31584: Queryset crashes when grouping by Exists() on Oracle.

-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: felixxm
Type: Bug | Status: closed
Component: Database layer | Version: 3.0
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: oracle exists | Triage Stage: Ready for
boolean | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton.gibson@…>):

In [changeset:"b46b0f80e81bbf8fcf7e8c20c249c8041db5e227" b46b0f8]:
{{{
#!CommitTicketReference repository=""
revision="b46b0f80e81bbf8fcf7e8c20c249c8041db5e227"
[3.1.x] Fixed #31584 -- Fixed crash when chaining values()/values_list()


after Exists() annotation and aggregation on Oracle.

Oracle requires the EXISTS expression to be wrapped in a CASE WHEN in
the GROUP BY clause.

Regression in efa1908f662c19038a944129c81462485c4a9fe8.
Backport of 3a941230c85b2702a5e1cd97e17251ce21057efa from master
}}}

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

Django

unread,
May 14, 2020, 9:11:47 AM5/14/20
to django-...@googlegroups.com
#31584: Queryset crashes when grouping by Exists() on Oracle.

-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: felixxm
Type: Bug | Status: closed
Component: Database layer | Version: 3.0
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: oracle exists | Triage Stage: Ready for
boolean | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton.gibson@…>):

In [changeset:"92acf1022fb13a7a8b1ff7cdfe72c21050c1e4e7" 92acf102]:
{{{
#!CommitTicketReference repository=""
revision="92acf1022fb13a7a8b1ff7cdfe72c21050c1e4e7"
[3.0.x] Fixed #31584 -- Fixed crash when chaining values()/values_list()


after Exists() annotation and aggregation on Oracle.

Oracle requires the EXISTS expression to be wrapped in a CASE WHEN in
the GROUP BY clause.

Regression in efa1908f662c19038a944129c81462485c4a9fe8.
Backport of 3a941230c85b2702a5e1cd97e17251ce21057efa from master
}}}

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

Reply all
Reply to author
Forward
0 new messages