Opened 6 years ago
Closed 13 months ago
#29850 closed New feature (fixed)
Add window support for RowRange frames
Reported by: | Daniel Fuchs | Owned by: | Sarah Boyce |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | GSoC |
Cc: | Raphael Michel, Mads Jensen, John Speno | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
The current RowRange frame is missing handling for several cases.
None of the following are currently supported:
RowRange(start=-2, end=-1)
ROWS BETWEEN 2 PRECEDING AND 1 PRECEDING
RowRange(start=1, end=2)
ROWS BETWEEN 1 FOLLOWING AND 2 FOLLOWING
It's also missing support for EXCLUDE.
ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING EXCLUDE CURRENT ROW
Frame exclusion is supported in PostgreSQL 11+, SQLite 3.28+, and Oracle 21c+ other databases do not support exclusion (MariaDB doc, and MySQL doc).
Change History (16)
comment:1 by , 6 years ago
Summary: | Poor Window Support for RowRange Frames → Add window support for RowRange frames |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → New feature |
comment:3 by , 6 years ago
Description: | modified (diff) |
---|---|
Version: | 2.1 → master |
comment:5 by , 5 years ago
Description: | modified (diff) |
---|
comment:6 by , 4 years ago
Keywords: | GSoC added |
---|
comment:7 by , 4 years ago
Is it a good idea to add an argument named as exclude in WindowFrame class in django.db.models.expressions? This argument will contain the F() value of the row/range to be excluded.
comment:8 by , 3 years ago
Cc: | added |
---|
comment:9 by , 2 years ago
Cc: | added |
---|
comment:10 by , 22 months ago
Description: | modified (diff) |
---|
comment:11 by , 13 months ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:12 by , 13 months ago
Has patch: | set |
---|
comment:13 by , 13 months ago
Patch needs improvement: | set |
---|
Frame exclusions can be one of:
- EXCLUDE CURRENT ROW
- EXCLUDE GROUP
- EXCLUDE TIES
- EXCLUDE NO OTHERS
Marking that patch needs improvement as will aim to provide support for all types
comment:14 by , 13 months ago
Patch needs improvement: | unset |
---|
comment:16 by , 13 months ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:18 by , 13 months ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Exclusion is supported also on SQLite 3.28+ (see release notes).