[MDEV-10855] Window functions: condition pushdown through the PARTITION BY clause Created: 2016-09-21 Updated: 2017-11-13 Resolved: 2017-11-13 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer - Window functions |
| Fix Version/s: | 10.3.1 |
| Type: | Task | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Suppose the child query
Then, the condition on col1 can be pushed down through the window function. Example:
Here, current execution will compute incidents across all departments. However, we are only interested in dept='Support'. PARTITION BY dept allows pushing the dept='Support' condition to the inner query's WHERE condition. Initial mention of this possible feature: |
| Comments |
| Comment by Igor Babaev [ 2017-08-15 ] |
|
The patch resolving this problem was pushed into bb-10.2-ext. |
| Comment by Igor Babaev [ 2017-11-13 ] |
|
The code to support the optimization required by the task was pushed into 10.3 |