mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fix post review comments regarding the usage of List<>.
This commit is contained in:
@ -1527,13 +1527,11 @@ void add_extra_frame_cursors(List<Frame_cursor> *cursors,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Frame_cursor> get_window_func_required_cursors(
|
void get_window_func_required_cursors(
|
||||||
const Item_window_func* item_win)
|
List<Frame_cursor> *result, const Item_window_func* item_win)
|
||||||
{
|
{
|
||||||
List<Frame_cursor> result;
|
|
||||||
|
|
||||||
if (item_win->requires_partition_size())
|
if (item_win->requires_partition_size())
|
||||||
result.push_back(new Frame_unbounded_following_set_count);
|
result->push_back(new Frame_unbounded_following_set_count);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
If it is not a regular window function that follows frame specifications,
|
If it is not a regular window function that follows frame specifications,
|
||||||
@ -1541,17 +1539,15 @@ List<Frame_cursor> get_window_func_required_cursors(
|
|||||||
*/
|
*/
|
||||||
if (item_win->is_frame_prohibited())
|
if (item_win->is_frame_prohibited())
|
||||||
{
|
{
|
||||||
add_extra_frame_cursors(&result, item_win->window_func());
|
add_extra_frame_cursors(result, item_win->window_func());
|
||||||
return result;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* A regular window function follows the frame specification. */
|
/* A regular window function follows the frame specification. */
|
||||||
result.push_back(get_frame_cursor(item_win->window_spec->window_frame,
|
result->push_back(get_frame_cursor(item_win->window_spec->window_frame,
|
||||||
false));
|
false));
|
||||||
result.push_back(get_frame_cursor(item_win->window_spec->window_frame,
|
result->push_back(get_frame_cursor(item_win->window_spec->window_frame,
|
||||||
true));
|
true));
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1600,7 +1596,8 @@ bool compute_window_func_with_frames(Item_window_func *item_win,
|
|||||||
/* This algorithm doesn't support DISTINCT aggregator */
|
/* This algorithm doesn't support DISTINCT aggregator */
|
||||||
sum_func->set_aggregator(Aggregator::SIMPLE_AGGREGATOR);
|
sum_func->set_aggregator(Aggregator::SIMPLE_AGGREGATOR);
|
||||||
|
|
||||||
List<Frame_cursor> cursors= get_window_func_required_cursors(item_win);
|
List<Frame_cursor> cursors;
|
||||||
|
get_window_func_required_cursors(&cursors, item_win);
|
||||||
|
|
||||||
List_iterator_fast<Frame_cursor> it(cursors);
|
List_iterator_fast<Frame_cursor> it(cursors);
|
||||||
Frame_cursor *c;
|
Frame_cursor *c;
|
||||||
|
Reference in New Issue
Block a user