@@ -1527,31 +1527,27 @@ void add_extra_frame_cursors(List<Frame_cursor> *cursors,
1527
1527
}
1528
1528
}
1529
1529
1530
- List<Frame_cursor> get_window_func_required_cursors (
1531
- const Item_window_func* item_win)
1530
+ void get_window_func_required_cursors (
1531
+ List<Frame_cursor> *result, const Item_window_func* item_win)
1532
1532
{
1533
- List<Frame_cursor> result;
1534
-
1535
1533
if (item_win->requires_partition_size ())
1536
- result. push_back (new Frame_unbounded_following_set_count);
1534
+ result-> push_back (new Frame_unbounded_following_set_count);
1537
1535
1538
1536
/*
1539
1537
If it is not a regular window function that follows frame specifications,
1540
1538
specific cursors are required.
1541
1539
*/
1542
1540
if (item_win->is_frame_prohibited ())
1543
1541
{
1544
- add_extra_frame_cursors (& result, item_win->window_func ());
1545
- return result ;
1542
+ add_extra_frame_cursors (result, item_win->window_func ());
1543
+ return ;
1546
1544
}
1547
1545
1548
1546
/* A regular window function follows the frame specification. */
1549
- result.push_back (get_frame_cursor (item_win->window_spec ->window_frame ,
1550
- false ));
1551
- result.push_back (get_frame_cursor (item_win->window_spec ->window_frame ,
1552
- true ));
1553
-
1554
- return result;
1547
+ result->push_back (get_frame_cursor (item_win->window_spec ->window_frame ,
1548
+ false ));
1549
+ result->push_back (get_frame_cursor (item_win->window_spec ->window_frame ,
1550
+ true ));
1555
1551
}
1556
1552
1557
1553
/*
@@ -1600,7 +1596,8 @@ bool compute_window_func_with_frames(Item_window_func *item_win,
1600
1596
/* This algorithm doesn't support DISTINCT aggregator */
1601
1597
sum_func->set_aggregator (Aggregator::SIMPLE_AGGREGATOR);
1602
1598
1603
- List<Frame_cursor> cursors= get_window_func_required_cursors (item_win);
1599
+ List<Frame_cursor> cursors;
1600
+ get_window_func_required_cursors (&cursors, item_win);
1604
1601
1605
1602
List_iterator_fast<Frame_cursor> it (cursors);
1606
1603
Frame_cursor *c;
0 commit comments