Opened 7 years ago
Last modified 16 months ago
#28333 assigned New feature
Filter and subquery for window expressions — at Initial Version
Reported by: | Mads Jensen | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | window orm filter subquery GSoC |
Cc: | Alexandr Artemyev, Andy Terra, Étienne Beaulé, Michael Wheeler, şuayip üzülmez, John Speno, Alex Scott, Ad Timmering, Hannes Ljungberg, Dave Johansen, Simon Charette | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
#26608 will introduce window function expressions, but will disallow filtering on the result of them, e.g.:
Window.objects.annotate(row=Window(expression=RowNumber())).filter(row__lt=1)
is not allowed. Instead, the window function expression should be wrapped in an inner query, and the filtering should be done in an outer query.
Note:
See TracTickets
for help on using tickets.