diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2016-03-27 11:47:19 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2016-03-27 11:47:19 +0300 |
commit | 0786b0d2cd75fb4e59752616abf03688e7cdba0a (patch) | |
tree | 9fd45edda555871707393d3361a5afefa4122130 /sql/sql_select.h | |
parent | 6ad9ac212c030017bce4c1613bade04cee774f4f (diff) | |
download | mariadb-git-0786b0d2cd75fb4e59752616abf03688e7cdba0a.tar.gz |
Make window function computation a part of the query plan
Added class Window_funcs_computation, with setup() method to setup
execution, and exec() to run window function computation.
setup() is currently trivial. In the future, it is expected to optimize
the number of sorting operations and passes that are done over the temp.
table.
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index 502e28d2dbd..d2780a795d0 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -423,6 +423,12 @@ typedef struct st_join_table { /* Sorting related info */ Filesort *filesort; + + /* + Non-NULL value means this join_tab must do window function computation + before reading. + */ + Window_funcs_computation* window_funcs; bool used_for_window_func; @@ -1494,8 +1500,6 @@ public: int init_execution(); void exec(); - bool process_window_functions(List<Item_window_func> *window_funcs); - void exec_inner(); bool prepare_result(List<Item> **columns_list); int destroy(); @@ -2270,5 +2274,5 @@ public: bool test_if_order_compatible(SQL_I_List<ORDER> &a, SQL_I_List<ORDER> &b); int test_if_group_changed(List<Cached_item> &list); -int create_sort_index(THD *thd, JOIN *join, JOIN_TAB *tab); +int create_sort_index(THD *thd, JOIN *join, JOIN_TAB *tab, Filesort *fsort); #endif /* SQL_SELECT_INCLUDED */ |