Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL)
-
None
Description
CREATE TABLE t1(a INT, b INT); |
INSERT INTO t1 VALUES (1,1), (2,2), (3,3); |
MariaDB [test]> SELECT NTILE(MAX(a) OVER (PARTITION BY a)) OVER (PARTITION BY a ORDER BY b) FROM t1;
|
ERROR 4074 (HY000): Window functions can not be used as arguments to group functions.
|
MariaDB [test]> SELECT FIRST_VALUE(MAX(a) OVER (PARTITION BY a)) OVER (ORDER BY a) AS x FROM t1 GROUP BY a;
|
This query just crashes.
We should ensure that for FIRST_VALUE window function, we don't allow a window function in its arguments.