mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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
This commit is contained in:
@ -311,7 +311,7 @@ public:
|
||||
enum_explain_aggr_node_type get_type() { return AGGR_OP_WINDOW_FUNCS; }
|
||||
|
||||
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()
|
||||
curr_tab= join_tab + top_join_tab_count + aggr_tables - 1;
|
||||
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,
|
||||
curr_tab))
|
||||
DBUG_RETURN(true);
|
||||
|
@ -428,7 +428,7 @@ typedef struct st_join_table {
|
||||
Non-NULL value means this join_tab must do window function computation
|
||||
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
|
||||
|
@ -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;
|
||||
JOIN_TAB *join_tab= &join->join_tab[join->top_join_tab_count];
|
||||
@ -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)
|
||||
{
|
||||
Item_window_func *win_func= it.peek();
|
||||
@ -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,
|
||||
JOIN_TAB *tab)
|
||||
{
|
||||
@ -1867,11 +1867,11 @@ bool Window_funcs_computation_step::setup(THD *thd,
|
||||
DBUG_ASSERT(!sel->quick);
|
||||
}
|
||||
|
||||
Window_func_sort *srt;
|
||||
Window_funcs_sort *srt;
|
||||
List_iterator<Item_window_func> iter(*window_funcs);
|
||||
while (iter.peek())
|
||||
{
|
||||
if (!(srt= new Window_func_sort()) ||
|
||||
if (!(srt= new Window_funcs_sort()) ||
|
||||
srt->setup(thd, sel, iter))
|
||||
{
|
||||
return true;
|
||||
@ -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);
|
||||
Window_func_sort *srt;
|
||||
List_iterator<Window_funcs_sort> it(win_func_sorts);
|
||||
Window_funcs_sort *srt;
|
||||
/* Execute each sort */
|
||||
while ((srt = it++))
|
||||
{
|
||||
@ -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);
|
||||
Window_func_sort *srt;
|
||||
List_iterator<Window_funcs_sort> it(win_func_sorts);
|
||||
Window_funcs_sort *srt;
|
||||
while ((srt = it++))
|
||||
{
|
||||
srt->cleanup();
|
||||
@ -1909,12 +1909,12 @@ void Window_funcs_computation_step::cleanup()
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
Explain_aggr_window_funcs *xpl= new Explain_aggr_window_funcs;
|
||||
List_iterator<Window_func_sort> it(win_func_sorts);
|
||||
Window_func_sort *srt;
|
||||
List_iterator<Window_funcs_sort> it(win_func_sorts);
|
||||
Window_funcs_sort *srt;
|
||||
while ((srt = it++))
|
||||
{
|
||||
Explain_aggr_filesort *eaf=
|
||||
|
@ -189,7 +189,7 @@ public:
|
||||
|
||||
*/
|
||||
|
||||
class Window_func_sort : public Sql_alloc
|
||||
class Window_funcs_sort : public Sql_alloc
|
||||
{
|
||||
List<Window_func_runner> runners;
|
||||
|
||||
@ -200,7 +200,7 @@ public:
|
||||
bool exec(JOIN *join);
|
||||
void cleanup() { delete filesort; }
|
||||
|
||||
friend class Window_funcs_computation_step;
|
||||
friend class Window_funcs_computation;
|
||||
};
|
||||
|
||||
|
||||
@ -215,9 +215,9 @@ class Explain_aggr_window_funcs;
|
||||
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:
|
||||
bool setup(THD *thd, List<Item_window_func> *window_funcs, st_join_table *tab);
|
||||
bool exec(JOIN *join);
|
||||
|
Reference in New Issue
Block a user