mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Enable almost all aggregate functions for window functions
This commit is contained in:
@ -2313,24 +2313,18 @@ bool Window_func_runner::add_function_to_run(Item_window_func *win_func)
|
|||||||
sum_func->setup_window_func(current_thd, win_func->window_spec);
|
sum_func->setup_window_func(current_thd, win_func->window_spec);
|
||||||
|
|
||||||
Item_sum::Sumfunctype type= win_func->window_func()->sum_func();
|
Item_sum::Sumfunctype type= win_func->window_func()->sum_func();
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case Item_sum::ROW_NUMBER_FUNC:
|
/* Distinct is not yet supported. */
|
||||||
case Item_sum::RANK_FUNC:
|
case Item_sum::GROUP_CONCAT_FUNC:
|
||||||
case Item_sum::DENSE_RANK_FUNC:
|
case Item_sum::SUM_DISTINCT_FUNC:
|
||||||
case Item_sum::COUNT_FUNC:
|
case Item_sum::AVG_DISTINCT_FUNC:
|
||||||
case Item_sum::SUM_BIT_FUNC:
|
|
||||||
case Item_sum::SUM_FUNC:
|
|
||||||
case Item_sum::AVG_FUNC:
|
|
||||||
case Item_sum::PERCENT_RANK_FUNC:
|
|
||||||
case Item_sum::CUME_DIST_FUNC:
|
|
||||||
case Item_sum::NTILE_FUNC:
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
my_error(ER_NOT_SUPPORTED_YET, MYF(0),
|
my_error(ER_NOT_SUPPORTED_YET, MYF(0),
|
||||||
"This aggregate as window function");
|
"This aggregate as window function");
|
||||||
return true;
|
return true;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return window_functions.push_back(win_func);
|
return window_functions.push_back(win_func);
|
||||||
|
Reference in New Issue
Block a user