[Django] #27767: Support DISTINCT queries in ArrayAgg

19 views
Skip to first unread message

Django

unread,
Jan 23, 2017, 10:49:21 AM1/23/17
to django-...@googlegroups.com
#27767: Support DISTINCT queries in ArrayAgg
--------------------------------------------+------------------------
Reporter: Tom | Owner: (none)
Type: New feature | Status: new
Component: contrib.postgres | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------------+------------------------
It's sometimes useful to run DISTINCT over an ArrayAgg, I've made a rather
simple pull request that implements this here:
[https://github.com/django/django/pull/7932]

I notice there are a few aggregates now that support Distinct (Count,
StringAgg and hopefully ArrayAgg). It might be good to make a subclass
they inherit from, instead of duplicating the implementation?

If this is deemed a good idea I can add some documentation changes and any
changes that are requested.

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

Django

unread,
Jan 23, 2017, 11:03:32 AM1/23/17
to django-...@googlegroups.com
#27767: Support DISTINCT queries in ArrayAgg
----------------------------------+------------------------------------

Reporter: Tom | Owner: (none)
Type: New feature | Status: new
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1

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

* needs_docs: 0 => 1
* has_patch: 0 => 1
* stage: Unreviewed => Accepted


Comment:

> I notice there are a few aggregates now that support Distinct (Count,
StringAgg and hopefully ArrayAgg). It might be good to make a subclass
they inherit from, instead of duplicating the implementation?

Makes sense to me.

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

Django

unread,
Jan 23, 2017, 11:05:28 AM1/23/17
to django-...@googlegroups.com
#27767: Support DISTINCT queries in ArrayAgg
----------------------------------+------------------------------------

Reporter: Tom | Owner: (none)
Type: New feature | Status: new
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Simon Charette):

* needs_better_patch: 0 => 1


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

Django

unread,
Jan 23, 2017, 2:29:10 PM1/23/17
to django-...@googlegroups.com
#27767: Support DISTINCT queries in ArrayAgg
----------------------------------+------------------------------------

Reporter: Tom | Owner: (none)
Type: New feature | Status: new
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* needs_better_patch: 1 => 0
* needs_docs: 1 => 0


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

Django

unread,
Feb 4, 2017, 1:58:12 PM2/4/17
to django-...@googlegroups.com
#27767: Support DISTINCT queries in ArrayAgg
-------------------------------------+-------------------------------------
Reporter: Tom | Owner: Tim
| Graham <timograham@…>
Type: New feature | Status: closed
Component: contrib.postgres | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* owner: (none) => Tim Graham <timograham@…>
* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"b5393028bfc939adf14d0fa5e4088cddd3b9dfa1" b5393028]:
{{{
#!CommitTicketReference repository=""
revision="b5393028bfc939adf14d0fa5e4088cddd3b9dfa1"
Fixed #27767 -- Added distinct argument to ArrayAgg.
}}}

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

Reply all
Reply to author
Forward
0 new messages