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.
Showing
mysql-test/r/win_avg.result
0 → 100644
mysql-test/t/win_avg.test
0 → 100644
Please register or sign in to comment