Re: [Django] #33898: Window() expression with ArrayAgg() crashes.

5 views
Skip to first unread message

Django

unread,
Aug 5, 2022, 10:55:57 AM8/5/22
to django-...@googlegroups.com
#33898: Window() expression with ArrayAgg() crashes.
-------------------------------------+-------------------------------------
Reporter: Kia | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 4.1
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: ArrayAgg, Window | Triage Stage: Accepted
function, extend, tuple, params |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

This has become a true whack-a-mole game over the years.

I think we should just bite the bullet and audit all of our `as_sql`
functions to make sure they deal with params in `tuple` and not in `list`.
Otherwise the only true way to cover all cases is to have a unit test for
every combination of expression Django provides. Any thoughts on that
Mariusz?

Should we keep this issue focused on the `Window(ArrayAgg)` case or
perform a larger audit meant to be backported? We could at least make sure
all `as_sql` implementation are able to deal with `tuple | list` for now.

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

Django

unread,
Aug 5, 2022, 11:09:39 AM8/5/22
to django-...@googlegroups.com
#33898: Window() expression with ArrayAgg() crashes.
-------------------------------------+-------------------------------------
Reporter: Kia | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 4.1
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: ArrayAgg, Window | Triage Stage: Accepted
function, extend, tuple, params |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

> Should we keep this issue focused on the Window(ArrayAgg) case or
perform a larger audit meant to be backported?

Yes we should focus this on fixing ` Window(ArrayAgg)` and backport do
4.1. Larger audit can be made on the `main` branch.

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

Django

unread,
Aug 6, 2022, 7:55:50 AM8/6/22
to django-...@googlegroups.com
#33898: Window() expression with ArrayAgg() crashes.
-------------------------------------+-------------------------------------
Reporter: Kia | Owner: Mariusz
| Felisiak
Type: Bug | Status: assigned

Component: Database layer | Version: 4.1
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: ArrayAgg, Window | Triage Stage: Accepted
function, extend, tuple, params |
Has patch: 1 | Needs documentation: 0

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

* owner: nobody => Mariusz Felisiak
* status: new => assigned
* has_patch: 0 => 1


Comment:

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

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

Django

unread,
Aug 6, 2022, 12:00:05 PM8/6/22
to django-...@googlegroups.com
#33898: Window() expression with ArrayAgg() crashes.
-------------------------------------+-------------------------------------
Reporter: Kia | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed

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

Keywords: ArrayAgg, Window | Triage Stage: Accepted
function, extend, tuple, params |
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:"fd93db97c7228b16a4f92f97ef05b0d72418d952" fd93db97]:
{{{
#!CommitTicketReference repository=""
revision="fd93db97c7228b16a4f92f97ef05b0d72418d952"
Fixed #33898 -- Fixed Window() expression crash with ArrayAgg().

Thanks Kia for the report.

Regression in e06dc4571ea9fd5723c8029959b95808be9f8812.
}}}

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

Django

unread,
Aug 6, 2022, 12:01:17 PM8/6/22
to django-...@googlegroups.com
#33898: Window() expression with ArrayAgg() crashes.
-------------------------------------+-------------------------------------
Reporter: Kia | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed
Component: Database layer | Version: 4.1
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: ArrayAgg, Window | Triage Stage: Accepted
function, extend, tuple, params |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"d9ace347b4e38d9eac01d7a17a68b009c81f5c06" d9ace347]:
{{{
#!CommitTicketReference repository=""
revision="d9ace347b4e38d9eac01d7a17a68b009c81f5c06"
[4.1.x] Fixed #33898 -- Fixed Window() expression crash with ArrayAgg().

Thanks Kia for the report.

Regression in e06dc4571ea9fd5723c8029959b95808be9f8812.
Backport of fd93db97c7228b16a4f92f97ef05b0d72418d952 from main
}}}

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

Reply all
Reply to author
Forward
0 new messages