#16688: unionagg doesn't respect limits
-----------------------------------------------+------------------------
Reporter: arc <django-bugs@…> | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: GIS
Version: 1.3 | Severity: Normal
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------------+------------------------
Changes (by aaugustin):
* needs_docs: => 0
* needs_better_patch: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted
Comment:
Slicing a !QuerySet basically tacks "LIMIT foo" at the end of the
generated SQL. As a consequence, the slicing applies after the
aggregation.
The same problem is handled properly in the case of `filter`:
`MyModel.objects.filter(...)[:10].filter(...)` raises `AssertionError:
Cannot filter a query once a slice has been taken.`
I think aggregating a query after a slice has been taken should also raise
an `AssertionError`.
--
Ticket URL: <https://code.djangoproject.com/ticket/16688#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.