mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Implemented avg() window function.
It is based on the sum() function, thus much of the logic is shared. Considering that there are 2 counters stored within the function, one that handles the null value, while the other that handles the divisor for the avg computation, it is possible to remove the counter from the Item_sum_avg. I have not removed it in this patch as we may choose to refactor the whole code into a separate class. This remains to be dicussed.
This commit is contained in:
@ -1585,6 +1585,7 @@ bool JOIN::process_window_functions(List<Item> *curr_fields_list)
|
||||
case Item_sum::COUNT_FUNC:
|
||||
case Item_sum::SUM_BIT_FUNC:
|
||||
case Item_sum::SUM_FUNC:
|
||||
case Item_sum::AVG_FUNC:
|
||||
{
|
||||
/*
|
||||
Frame-aware window function computation. It does one pass, but
|
||||
|
Reference in New Issue
Block a user