django-sql-utils icon indicating copy to clipboard operation
django-sql-utils copied to clipboard

SubqueryAggregate does not expose parameters other than distinct

Open airstrike opened this issue 4 years ago • 3 comments

See https://github.com/martsberger/django-sql-utils/blob/88cf3a6ea513aacebd5bec616599938e77fd8e0a/sql_util/aggregates.py#L161-L168

This makes the ordering argument in ArrayAgg impossible to use. Ditto for any custom Aggregation a user may want to write

airstrike avatar Mar 04 '20 01:03 airstrike

Somewhat related to django/django#28296

airstrike avatar Mar 04 '20 16:03 airstrike

Ordering was added, but it is true that if there are other parameters to the aggregation, there is no mechanism to pass them. I will look into making this more general.

martsberger avatar Sep 28 '23 11:09 martsberger

The new default attribute on Sum would be lovely.

jsayles avatar Mar 19 '24 23:03 jsayles