[MDEV-9543] Parsing, name resolution and optimization for window functions. Created: 2016-02-10 Updated: 2017-01-18 Resolved: 2017-01-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer, Optimizer - Window functions |
| Fix Version/s: | 10.2.1 |
| Type: | Task | Priority: | Major |
| Reporter: | Igor Babaev | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
This task will cover the following phases of window functions processing: |
| Comments |
| Comment by Sergei Petrunia [ 2016-03-16 ] | ||||||||||||||||||||
|
Name resolution doesn't currently work when window functions are used with group by. Here is an example:
The query is valid, but I get this error:
| ||||||||||||||||||||
| Comment by Igor Babaev [ 2016-03-17 ] | ||||||||||||||||||||
|
The above query does not comply with SQL standard. But it can be rewritten:
Yet it still returned the same error message. | ||||||||||||||||||||
| Comment by Sergei Petrunia [ 2016-03-17 ] | ||||||||||||||||||||
|
The query may be non-standard, but PostgreSQL, SQL Server, and Oracle all support it. I agree that we could live with the aliases, for now. |