Commit 91fc90c3 authored by Sergei Petrunia's avatar Sergei Petrunia

Update to previous cset, which added ORDER BY into the wrong clause

parent e292ea87
......@@ -1778,17 +1778,17 @@ insert into t1 values (null,'a');
insert into t1 values (2,'b');
insert into t1 values (-1,'');
explain format=json
select *, row_number() over (order by s1) as X from t1 order by X desc, s2 desc;
select *, row_number() over (order by s1, s2) as X from t1 order by X desc;
EXPLAIN
{
"query_block": {
"select_id": 1,
"filesort": {
"sort_key": "X, t1.s2",
"sort_key": "X",
"window_functions_computation": {
"sorts": {
"filesort": {
"sort_key": "t1.s1"
"sort_key": "t1.s1, t1.s2"
}
},
"temporary_table": {
......@@ -1803,12 +1803,12 @@ EXPLAIN
}
}
}
select *, row_number() over (order by s1) as X from t1 order by X desc, s2 desc;
select *, row_number() over (order by s1, s2) as X from t1 order by X desc;
s1 s2 X
2 b 6
1 a 5
1 NULL 4
-1 3
NULL NULL 2
NULL a 1
NULL a 2
NULL NULL 1
drop table t1;
......@@ -1092,7 +1092,7 @@ insert into t1 values (2,'b');
insert into t1 values (-1,'');
explain format=json
select *, row_number() over (order by s1) as X from t1 order by X desc, s2 desc;
select *, row_number() over (order by s1) as X from t1 order by X desc, s2 desc;
select *, row_number() over (order by s1, s2) as X from t1 order by X desc;
select *, row_number() over (order by s1, s2) as X from t1 order by X desc;
drop table t1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment