You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had searched in the issues and found no similar issues.
Version
doris-2.1.6-rc04-653e315ba5
What's Wrong?
mysql>
with test_with as (
select
id,
sum(id) over(
order by id
rows between UNBOUNDED PRECEDING and current row
) calc,
ROW_NUMBER() over(order by id desc ) rn
from (
select1 id
UNION ALLselect2 id
UNION ALLselect3 id
) t
)
select*from test_with ;
+----+------+----+
| id | calc | rn |
+----+------+----+
| 3 | 6 | 1 |
| 2 | 3 | 2 |
| 1 | 1 | 3 |
+----+------+----+3 rows inset (0.05 sec)
-- add where rn=1
mysql>
with test_with as (
select
id,
sum(id) over(
order by id
rows between UNBOUNDED PRECEDING and current row
) calc,
ROW_NUMBER() over(order by id desc ) rn
from (
select1 id
UNION ALLselect2 id
UNION ALLselect3 id
) t
)
select*from test_with where rn=1;
+----+------+----+
| id | calc | rn |
+----+------+----+
| 3 | 3 | 1 |
+----+------+----+1 row inset (0.05 sec)
Search before asking
Version
doris-2.1.6-rc04-653e315ba5
What's Wrong?
add where rn=1, the result has error.
What You Expected?
the correct result should be:
How to Reproduce?
No response
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: