summaryrefslogtreecommitdiff
path: root/sql/sql_window.cc
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2016-09-09 18:21:36 +0300
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2016-09-09 18:33:29 +0300
commit14690c70c1cf754eef02c714871eaf5bea40283d (patch)
tree357f0a44181767c816d37c1587dfb2a75ebb4ef4 /sql/sql_window.cc
parentdfd3be928d98d123e86b8ad3ae307e27153ab11c (diff)
downloadmariadb-git-14690c70c1cf754eef02c714871eaf5bea40283d.tar.gz
Enable almost all aggregate functions for window functions
Diffstat (limited to 'sql/sql_window.cc')
-rw-r--r--sql/sql_window.cc20
1 files changed, 7 insertions, 13 deletions
diff --git a/sql/sql_window.cc b/sql/sql_window.cc
index 7192c8a492e..e720c39eb8f 100644
--- a/sql/sql_window.cc
+++ b/sql/sql_window.cc
@@ -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);
Item_sum::Sumfunctype type= win_func->window_func()->sum_func();
+
switch (type)
{
- case Item_sum::ROW_NUMBER_FUNC:
- case Item_sum::RANK_FUNC:
- case Item_sum::DENSE_RANK_FUNC:
- case Item_sum::COUNT_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:
+ /* Distinct is not yet supported. */
+ case Item_sum::GROUP_CONCAT_FUNC:
+ case Item_sum::SUM_DISTINCT_FUNC:
+ case Item_sum::AVG_DISTINCT_FUNC:
my_error(ER_NOT_SUPPORTED_YET, MYF(0),
"This aggregate as window function");
return true;
+ default:
+ break;
}
return window_functions.push_back(win_func);