tidb
tidb copied to clipboard
Display partition by, order by and frame info for window function
Feature Request
Is your feature request related to a problem? Please describe:
MySQL [test]> explain select sum(a) over(partition by a order by b) from t;
+--------------------------+----------+------+------------------------------------------------------------+
| id | count | task | operator info |
+--------------------------+----------+------+------------------------------------------------------------+
| Projection_7 | 10000.00 | root | sum(a) over(partition by a order by b) |
| └─Window_8 | 10000.00 | root | sum(test.t.a) |
| └─Sort_12 | 10000.00 | root | test.t.a:asc, test.t.b:asc |
| └─TableReader_11 | 10000.00 | root | data:TableScan_10 |
| └─TableScan_10 | 10000.00 | cop | table:t, range:[-inf,+inf], keep order:false, stats:pseudo |
+--------------------------+----------+------+------------------------------------------------------------+
Describe the feature you'd like:
Now we only display the window function name and it's paremeters in the explain, it is better to also add the partiton by, order by and frame info.
Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy: