Commit 5b85d0a7 authored by Sergei Petrunia's avatar Sergei Petrunia

Window functions: Better class names

As discussed on the call:
- s/Window_funcs_computation_step/Window_funcs_computation/g
- s/Window_func_sort/Window_funcs_sort/g
parent 7c9cfa07
...@@ -311,7 +311,7 @@ class Explain_aggr_window_funcs : public Explain_aggr_node ...@@ -311,7 +311,7 @@ class Explain_aggr_window_funcs : public Explain_aggr_node
enum_explain_aggr_node_type get_type() { return AGGR_OP_WINDOW_FUNCS; } enum_explain_aggr_node_type get_type() { return AGGR_OP_WINDOW_FUNCS; }
void print_json_members(Json_writer *writer, bool is_analyze); void print_json_members(Json_writer *writer, bool is_analyze);
friend class Window_funcs_computation_step; friend class Window_funcs_computation;
}; };
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
......
...@@ -2661,7 +2661,7 @@ bool JOIN::make_aggr_tables_info() ...@@ -2661,7 +2661,7 @@ bool JOIN::make_aggr_tables_info()
curr_tab= join_tab + top_join_tab_count + aggr_tables - 1; curr_tab= join_tab + top_join_tab_count + aggr_tables - 1;
if (select_lex->window_funcs.elements) if (select_lex->window_funcs.elements)
{ {
curr_tab->window_funcs_step= new Window_funcs_computation_step; curr_tab->window_funcs_step= new Window_funcs_computation;
if (curr_tab->window_funcs_step->setup(thd, &select_lex->window_funcs, if (curr_tab->window_funcs_step->setup(thd, &select_lex->window_funcs,
curr_tab)) curr_tab))
DBUG_RETURN(true); DBUG_RETURN(true);
......
...@@ -428,7 +428,7 @@ typedef struct st_join_table { ...@@ -428,7 +428,7 @@ typedef struct st_join_table {
Non-NULL value means this join_tab must do window function computation Non-NULL value means this join_tab must do window function computation
before reading. before reading.
*/ */
Window_funcs_computation_step* window_funcs_step; Window_funcs_computation* window_funcs_step;
/** /**
List of topmost expressions in the select list. The *next* JOIN TAB List of topmost expressions in the select list. The *next* JOIN TAB
......
...@@ -1798,7 +1798,7 @@ bool Window_func_runner::exec(TABLE *tbl, SORT_INFO *filesort_result) ...@@ -1798,7 +1798,7 @@ bool Window_func_runner::exec(TABLE *tbl, SORT_INFO *filesort_result)
} }
bool Window_func_sort::exec(JOIN *join) bool Window_funcs_sort::exec(JOIN *join)
{ {
THD *thd= join->thd; THD *thd= join->thd;
JOIN_TAB *join_tab= &join->join_tab[join->top_join_tab_count]; JOIN_TAB *join_tab= &join->join_tab[join->top_join_tab_count];
...@@ -1825,7 +1825,7 @@ bool Window_func_sort::exec(JOIN *join) ...@@ -1825,7 +1825,7 @@ bool Window_func_sort::exec(JOIN *join)
} }
bool Window_func_sort::setup(THD *thd, SQL_SELECT *sel, bool Window_funcs_sort::setup(THD *thd, SQL_SELECT *sel,
List_iterator<Item_window_func> &it) List_iterator<Item_window_func> &it)
{ {
Item_window_func *win_func= it.peek(); Item_window_func *win_func= it.peek();
...@@ -1854,7 +1854,7 @@ bool Window_func_sort::setup(THD *thd, SQL_SELECT *sel, ...@@ -1854,7 +1854,7 @@ bool Window_func_sort::setup(THD *thd, SQL_SELECT *sel,
} }
bool Window_funcs_computation_step::setup(THD *thd, bool Window_funcs_computation::setup(THD *thd,
List<Item_window_func> *window_funcs, List<Item_window_func> *window_funcs,
JOIN_TAB *tab) JOIN_TAB *tab)
{ {
...@@ -1867,11 +1867,11 @@ bool Window_funcs_computation_step::setup(THD *thd, ...@@ -1867,11 +1867,11 @@ bool Window_funcs_computation_step::setup(THD *thd,
DBUG_ASSERT(!sel->quick); DBUG_ASSERT(!sel->quick);
} }
Window_func_sort *srt; Window_funcs_sort *srt;
List_iterator<Item_window_func> iter(*window_funcs); List_iterator<Item_window_func> iter(*window_funcs);
while (iter.peek()) while (iter.peek())
{ {
if (!(srt= new Window_func_sort()) || if (!(srt= new Window_funcs_sort()) ||
srt->setup(thd, sel, iter)) srt->setup(thd, sel, iter))
{ {
return true; return true;
...@@ -1882,10 +1882,10 @@ bool Window_funcs_computation_step::setup(THD *thd, ...@@ -1882,10 +1882,10 @@ bool Window_funcs_computation_step::setup(THD *thd,
} }
bool Window_funcs_computation_step::exec(JOIN *join) bool Window_funcs_computation::exec(JOIN *join)
{ {
List_iterator<Window_func_sort> it(win_func_sorts); List_iterator<Window_funcs_sort> it(win_func_sorts);
Window_func_sort *srt; Window_funcs_sort *srt;
/* Execute each sort */ /* Execute each sort */
while ((srt = it++)) while ((srt = it++))
{ {
...@@ -1896,10 +1896,10 @@ bool Window_funcs_computation_step::exec(JOIN *join) ...@@ -1896,10 +1896,10 @@ bool Window_funcs_computation_step::exec(JOIN *join)
} }
void Window_funcs_computation_step::cleanup() void Window_funcs_computation::cleanup()
{ {
List_iterator<Window_func_sort> it(win_func_sorts); List_iterator<Window_funcs_sort> it(win_func_sorts);
Window_func_sort *srt; Window_funcs_sort *srt;
while ((srt = it++)) while ((srt = it++))
{ {
srt->cleanup(); srt->cleanup();
...@@ -1909,12 +1909,12 @@ void Window_funcs_computation_step::cleanup() ...@@ -1909,12 +1909,12 @@ void Window_funcs_computation_step::cleanup()
Explain_aggr_window_funcs* Explain_aggr_window_funcs*
Window_funcs_computation_step::save_explain_plan(MEM_ROOT *mem_root, Window_funcs_computation::save_explain_plan(MEM_ROOT *mem_root,
bool is_analyze) bool is_analyze)
{ {
Explain_aggr_window_funcs *xpl= new Explain_aggr_window_funcs; Explain_aggr_window_funcs *xpl= new Explain_aggr_window_funcs;
List_iterator<Window_func_sort> it(win_func_sorts); List_iterator<Window_funcs_sort> it(win_func_sorts);
Window_func_sort *srt; Window_funcs_sort *srt;
while ((srt = it++)) while ((srt = it++))
{ {
Explain_aggr_filesort *eaf= Explain_aggr_filesort *eaf=
......
...@@ -189,7 +189,7 @@ class Window_func_runner : public Sql_alloc ...@@ -189,7 +189,7 @@ class Window_func_runner : public Sql_alloc
*/ */
class Window_func_sort : public Sql_alloc class Window_funcs_sort : public Sql_alloc
{ {
List<Window_func_runner> runners; List<Window_func_runner> runners;
...@@ -200,7 +200,7 @@ class Window_func_sort : public Sql_alloc ...@@ -200,7 +200,7 @@ class Window_func_sort : public Sql_alloc
bool exec(JOIN *join); bool exec(JOIN *join);
void cleanup() { delete filesort; } void cleanup() { delete filesort; }
friend class Window_funcs_computation_step; friend class Window_funcs_computation;
}; };
...@@ -215,9 +215,9 @@ class Explain_aggr_window_funcs; ...@@ -215,9 +215,9 @@ class Explain_aggr_window_funcs;
temporary table. temporary table.
*/ */
class Window_funcs_computation_step : public Sql_alloc class Window_funcs_computation : public Sql_alloc
{ {
List<Window_func_sort> win_func_sorts; List<Window_funcs_sort> win_func_sorts;
public: public:
bool setup(THD *thd, List<Item_window_func> *window_funcs, st_join_table *tab); bool setup(THD *thd, List<Item_window_func> *window_funcs, st_join_table *tab);
bool exec(JOIN *join); bool exec(JOIN *join);
......
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