File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1778,17 +1778,17 @@ insert into t1 values (null,'a');
1778
1778
insert into t1 values (2,'b');
1779
1779
insert into t1 values (-1,'');
1780
1780
explain format=json
1781
- select *, row_number() over (order by s1) as X from t1 order by X desc, s2 desc;
1781
+ select *, row_number() over (order by s1, s2 ) as X from t1 order by X desc;
1782
1782
EXPLAIN
1783
1783
{
1784
1784
"query_block": {
1785
1785
"select_id": 1,
1786
1786
"filesort": {
1787
- "sort_key": "X, t1.s2 ",
1787
+ "sort_key": "X",
1788
1788
"window_functions_computation": {
1789
1789
"sorts": {
1790
1790
"filesort": {
1791
- "sort_key": "t1.s1"
1791
+ "sort_key": "t1.s1, t1.s2 "
1792
1792
}
1793
1793
},
1794
1794
"temporary_table": {
@@ -1803,12 +1803,12 @@ EXPLAIN
1803
1803
}
1804
1804
}
1805
1805
}
1806
- select *, row_number() over (order by s1) as X from t1 order by X desc, s2 desc;
1806
+ select *, row_number() over (order by s1, s2 ) as X from t1 order by X desc;
1807
1807
s1 s2 X
1808
1808
2 b 6
1809
1809
1 a 5
1810
1810
1 NULL 4
1811
1811
-1 3
1812
- NULL NULL 2
1813
- NULL a 1
1812
+ NULL a 2
1813
+ NULL NULL 1
1814
1814
drop table t1;
Original file line number Diff line number Diff line change @@ -1092,7 +1092,7 @@ insert into t1 values (2,'b');
1092
1092
insert into t1 values (-1,'');
1093
1093
1094
1094
explain format=json
1095
- select *, row_number() over (order by s1) as X from t1 order by X desc, s2 desc;
1096
- select *, row_number() over (order by s1) as X from t1 order by X desc, s2 desc;
1095
+ select *, row_number() over (order by s1, s2 ) as X from t1 order by X desc;
1096
+ select *, row_number() over (order by s1, s2 ) as X from t1 order by X desc;
1097
1097
drop table t1;
1098
1098
You can’t perform that action at this time.
0 commit comments