[MDEV-11867] Invalid use of group function - Created: 2017-01-21 Updated: 2021-02-16 Resolved: 2017-02-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer - Window functions |
| Affects Version/s: | 10.2.3 |
| Fix Version/s: | 10.2.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | the6campbells | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Following windowed aggregate cannot be expressed.
|
| Comments |
| Comment by Elena Stepanova [ 2017-01-23 ] | ||||||||||
|
It's unrelated to window functions. You can't use an aggregate function as an argument for another aggregate function:
| ||||||||||
| Comment by the6campbells [ 2017-01-23 ] | ||||||||||
|
SQL-OLAP addendum provides for an aggregate input as shown. Does this mean that your 10.2.x release will not support this style of aggregation by design which is supported in a large # of systems that support SQL-OLAP? Vendors that will support this specification include: DB2 family, ORACLE, Postgres, Teradata, SQL Server, ..... C1 C2 3 4 | ||||||||||
| Comment by Elena Stepanova [ 2017-01-23 ] | ||||||||||
| Comment by the6campbells [ 2017-02-01 ] | ||||||||||
|
So if MariaDB 10.2.x will not support grouped-window queries will it be added to another release in 2017? In essence, one would be forced to apply a query transformation to push the grouped query into a derived table and apply the windowed aggregate in the outer block. | ||||||||||
| Comment by Igor Babaev [ 2017-02-01 ] | ||||||||||
|
We are planning to fix it in 10.2 now. | ||||||||||
| Comment by Igor Babaev [ 2017-02-02 ] | ||||||||||
|
The fix for this bug was pushed into the 10.2.tree. |