diff options
| author | Monty <monty@mariadb.org> | 2021-09-17 14:53:54 +0300 |
|---|---|---|
| committer | Sergei Petrunia <sergey@mariadb.com> | 2023-01-30 15:22:20 +0200 |
| commit | 9d0fbcc4007478a9b54db6402a2dfd9c4c400554 (patch) | |
| tree | 843c3ce18826cf3d4a8bfebb87023668d730303e /sql/sql_window.cc | |
| parent | 6252a281b5020d28685777c11ee27688a9db3d66 (diff) | |
| download | mariadb-git-9d0fbcc4007478a9b54db6402a2dfd9c4c400554.tar.gz | |
Improve comments in the optimizer
Diffstat (limited to 'sql/sql_window.cc')
| -rw-r--r-- | sql/sql_window.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_window.cc b/sql/sql_window.cc index c0acecd138f..c9f2256ff16 100644 --- a/sql/sql_window.cc +++ b/sql/sql_window.cc @@ -423,6 +423,16 @@ ORDER *st_select_lex::find_common_window_func_partition_fields(THD *thd) #define CMP_GT_C 1 // Greater than and compatible #define CMP_GT 2 // Greater then + +/* + This function is used for sorting ORDER/PARTITION BY clauses of window + functions and so must implement an order relation on ORDER BY clauses" + + It is called by a sorting function. + The function return's CMP_EQ (=0) if the values are identical. + If not equal, it returns a stable value < or > than 0. +*/ + static int compare_order_elements(ORDER *ord1, int weight1, ORDER *ord2, int weight2) |
