Skip to content

Commit 5b85d0a

Browse files
committed
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
1 parent 7c9cfa0 commit 5b85d0a

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

sql/sql_explain.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ class Explain_aggr_window_funcs : public Explain_aggr_node
311311
enum_explain_aggr_node_type get_type() { return AGGR_OP_WINDOW_FUNCS; }
312312

313313
void print_json_members(Json_writer *writer, bool is_analyze);
314-
friend class Window_funcs_computation_step;
314+
friend class Window_funcs_computation;
315315
};
316316

317317
/////////////////////////////////////////////////////////////////////////////

sql/sql_select.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2661,7 +2661,7 @@ bool JOIN::make_aggr_tables_info()
26612661
curr_tab= join_tab + top_join_tab_count + aggr_tables - 1;
26622662
if (select_lex->window_funcs.elements)
26632663
{
2664-
curr_tab->window_funcs_step= new Window_funcs_computation_step;
2664+
curr_tab->window_funcs_step= new Window_funcs_computation;
26652665
if (curr_tab->window_funcs_step->setup(thd, &select_lex->window_funcs,
26662666
curr_tab))
26672667
DBUG_RETURN(true);

sql/sql_select.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ typedef struct st_join_table {
428428
Non-NULL value means this join_tab must do window function computation
429429
before reading.
430430
*/
431-
Window_funcs_computation_step* window_funcs_step;
431+
Window_funcs_computation* window_funcs_step;
432432

433433
/**
434434
List of topmost expressions in the select list. The *next* JOIN TAB

sql/sql_window.cc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,7 +1798,7 @@ bool Window_func_runner::exec(TABLE *tbl, SORT_INFO *filesort_result)
17981798
}
17991799

18001800

1801-
bool Window_func_sort::exec(JOIN *join)
1801+
bool Window_funcs_sort::exec(JOIN *join)
18021802
{
18031803
THD *thd= join->thd;
18041804
JOIN_TAB *join_tab= &join->join_tab[join->top_join_tab_count];
@@ -1825,7 +1825,7 @@ bool Window_func_sort::exec(JOIN *join)
18251825
}
18261826

18271827

1828-
bool Window_func_sort::setup(THD *thd, SQL_SELECT *sel,
1828+
bool Window_funcs_sort::setup(THD *thd, SQL_SELECT *sel,
18291829
List_iterator<Item_window_func> &it)
18301830
{
18311831
Item_window_func *win_func= it.peek();
@@ -1854,7 +1854,7 @@ bool Window_func_sort::setup(THD *thd, SQL_SELECT *sel,
18541854
}
18551855

18561856

1857-
bool Window_funcs_computation_step::setup(THD *thd,
1857+
bool Window_funcs_computation::setup(THD *thd,
18581858
List<Item_window_func> *window_funcs,
18591859
JOIN_TAB *tab)
18601860
{
@@ -1867,11 +1867,11 @@ bool Window_funcs_computation_step::setup(THD *thd,
18671867
DBUG_ASSERT(!sel->quick);
18681868
}
18691869

1870-
Window_func_sort *srt;
1870+
Window_funcs_sort *srt;
18711871
List_iterator<Item_window_func> iter(*window_funcs);
18721872
while (iter.peek())
18731873
{
1874-
if (!(srt= new Window_func_sort()) ||
1874+
if (!(srt= new Window_funcs_sort()) ||
18751875
srt->setup(thd, sel, iter))
18761876
{
18771877
return true;
@@ -1882,10 +1882,10 @@ bool Window_funcs_computation_step::setup(THD *thd,
18821882
}
18831883

18841884

1885-
bool Window_funcs_computation_step::exec(JOIN *join)
1885+
bool Window_funcs_computation::exec(JOIN *join)
18861886
{
1887-
List_iterator<Window_func_sort> it(win_func_sorts);
1888-
Window_func_sort *srt;
1887+
List_iterator<Window_funcs_sort> it(win_func_sorts);
1888+
Window_funcs_sort *srt;
18891889
/* Execute each sort */
18901890
while ((srt = it++))
18911891
{
@@ -1896,10 +1896,10 @@ bool Window_funcs_computation_step::exec(JOIN *join)
18961896
}
18971897

18981898

1899-
void Window_funcs_computation_step::cleanup()
1899+
void Window_funcs_computation::cleanup()
19001900
{
1901-
List_iterator<Window_func_sort> it(win_func_sorts);
1902-
Window_func_sort *srt;
1901+
List_iterator<Window_funcs_sort> it(win_func_sorts);
1902+
Window_funcs_sort *srt;
19031903
while ((srt = it++))
19041904
{
19051905
srt->cleanup();
@@ -1909,12 +1909,12 @@ void Window_funcs_computation_step::cleanup()
19091909

19101910

19111911
Explain_aggr_window_funcs*
1912-
Window_funcs_computation_step::save_explain_plan(MEM_ROOT *mem_root,
1912+
Window_funcs_computation::save_explain_plan(MEM_ROOT *mem_root,
19131913
bool is_analyze)
19141914
{
19151915
Explain_aggr_window_funcs *xpl= new Explain_aggr_window_funcs;
1916-
List_iterator<Window_func_sort> it(win_func_sorts);
1917-
Window_func_sort *srt;
1916+
List_iterator<Window_funcs_sort> it(win_func_sorts);
1917+
Window_funcs_sort *srt;
19181918
while ((srt = it++))
19191919
{
19201920
Explain_aggr_filesort *eaf=

sql/sql_window.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class Window_func_runner : public Sql_alloc
189189
190190
*/
191191

192-
class Window_func_sort : public Sql_alloc
192+
class Window_funcs_sort : public Sql_alloc
193193
{
194194
List<Window_func_runner> runners;
195195

@@ -200,7 +200,7 @@ class Window_func_sort : public Sql_alloc
200200
bool exec(JOIN *join);
201201
void cleanup() { delete filesort; }
202202

203-
friend class Window_funcs_computation_step;
203+
friend class Window_funcs_computation;
204204
};
205205

206206

@@ -215,9 +215,9 @@ class Explain_aggr_window_funcs;
215215
temporary table.
216216
*/
217217

218-
class Window_funcs_computation_step : public Sql_alloc
218+
class Window_funcs_computation : public Sql_alloc
219219
{
220-
List<Window_func_sort> win_func_sorts;
220+
List<Window_funcs_sort> win_func_sorts;
221221
public:
222222
bool setup(THD *thd, List<Item_window_func> *window_funcs, st_join_table *tab);
223223
bool exec(JOIN *join);

0 commit comments

Comments
 (0)