Skip to content

Support defining windowing behavior in the WINDOW clause #760

Open
@mingmwang

Description

@mingmwang

PostgreSQL and SparkSQL support defining the windowing behavior in the WINDOW clause and then referenced in OVER.
This is very useful if the same windowing behavior is wanted for several functions.

For example:

SELECT sum(salary) OVER w, avg(salary) OVER w
  FROM empsalary
  WINDOW w AS (PARTITION BY depname ORDER BY salary DESC);

https://www.postgresql.org/docs/15/tutorial-window.html

https://www.postgresql.org/docs/15/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions