Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL)
-
None
Description
The following query works:
select a + min(a) over (partition by a) from t1 where a = 1; |
|
a + min(a) over (partition by a) |
2
|
2
|
2
|
However this one fails with a strange parser error:
create view win_view |
as (select a, a + min(a) over (partition by a) from t1 where a = 1); |
select * from win_view; |
query 'select * from win_view' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '???) AS `a + min(a) over (partition by a)` from `test`.`t1` where (`test`.`t1`.`' at line 1
|
Note that the following views however work:
create view some_view |
as (select a, a + a from t1 where a = 1); |
select * from some_view; |
a a + a
|
1 2
|
1 2
|
1 2
|
create view win_view |
as (select a, min(a) over (partition by a) from t1 where a = 1); |
select * from win_view; |
a min(a) over (partition by a) |
1 1
|
1 1
|
1 1
|