#29850: Add window support for RowRange frames
-------------------------------------+-------------------------------------
Reporter: Daniel Fuchs | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: GSoC | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Mariusz Felisiak:
Old description:
> 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 only in [https://www.postgresql.org/docs/11
> /sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS PostgreSQL 11+] and
> [https://www.sqlite.org/windowfunctions.html#wexcls SQLite 3.28+], other
> databases do not support exclusion (see
> [https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf
> /Analytic-Functions.html#GUID-527832F7-63C0-4445-8C16-307FA5084056 Oracle
> 18c doc], [https://mariadb.com/kb/en/library/window-functions-overview/
> MariaDB doc], and [https://dev.mysql.com/doc/refman/8.0/en/window-
> functions-frames.html MySQL doc]).
New description:
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 [https://www.postgresql.org/docs/11/sql-
expressions.html#SYNTAX-WINDOW-FUNCTIONS PostgreSQL 11+],
[https://www.sqlite.org/windowfunctions.html#wexcls SQLite 3.28+], and
[https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf
/Analytic-Functions.html#GUID-527832F7-63C0-4445-8C16-307FA5084056 Oracle
21c+] other databases do not support exclusion
([https://mariadb.com/kb/en/library/window-functions-overview/ MariaDB
doc], and [https://dev.mysql.com/doc/refman/8.0/en/window-functions-
frames.html MySQL doc]).
--
--
Ticket URL: <https://code.djangoproject.com/ticket/29850#comment:10>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070186115c8a2e-0efbf7a1-8cc3-4bd6-8e7b-72bff8953c2d-000000%40eu-central-1.amazonses.com.