[MDEV-8091] Simple window functions Created: 2015-05-02 Updated: 2017-04-06 Resolved: 2016-09-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer - Window functions |
| Fix Version/s: | 10.2.2 |
| Type: | Task | Priority: | Major |
| Reporter: | Vicențiu Ciorbaru | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Fixed | Votes: | 9 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||
| Sub-Tasks: |
|
||||||||||
| Sprint: | 10.2.0-5, 10.2.0-6, 10.2.0-7, 10.2.0-8, 10.2.2-1, 10.2.2-2, 10.2.2-3, 10.2.2-4 | ||||||||||
| Description |
|
There is a class of window functions that can be computed on the fly, after ordering. These functions are:
These functions can be computed directly. In order to do this we must:
Two-pass window functions:
Two-cursor window functions:
Key pieces for implementing this:
|
| Comments |
| Comment by Vicențiu Ciorbaru [ 2015-05-02 ] | ||||||||
| Comment by Sergei Petrunia [ 2015-11-26 ] | ||||||||
|
Overview of the solution sketch that was pushed into 10.1-window branch: JOIN::exec has a piece of code that detects that
if this is the case
then
and this computes the window function. It is done on the fly. | ||||||||
| Comment by Juan Telleria [ 2017-04-06 ] | ||||||||
|
¿Is possible to use Window Functions over columns which contain Aggregate Functions (For example: count(Column_Name)? SELECT |