mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-11868: min ( distinct ) over ( ) returns wrong value
The bug was not visible in current HEAD. Introduced test case to catch regressions. Also improve error messages regarding distinct usage in window functions.
This commit is contained in:
@ -2699,10 +2699,20 @@ bool Window_func_runner::add_function_to_run(Item_window_func *win_func)
|
||||
{
|
||||
/* Distinct is not yet supported. */
|
||||
case Item_sum::GROUP_CONCAT_FUNC:
|
||||
my_error(ER_NOT_SUPPORTED_YET, MYF(0),
|
||||
"GROUP_CONCAT() aggregate as window function");
|
||||
return true;
|
||||
case Item_sum::SUM_DISTINCT_FUNC:
|
||||
my_error(ER_NOT_SUPPORTED_YET, MYF(0),
|
||||
"SUM(DISTINCT) aggregate as window function");
|
||||
return true;
|
||||
case Item_sum::AVG_DISTINCT_FUNC:
|
||||
my_error(ER_NOT_SUPPORTED_YET, MYF(0),
|
||||
"This aggregate as window function");
|
||||
"AVG(DISTINCT) aggregate as window function");
|
||||
return true;
|
||||
case Item_sum::COUNT_DISTINCT_FUNC:
|
||||
my_error(ER_NOT_SUPPORTED_YET, MYF(0),
|
||||
"COUNT(DISTINCT) aggregate as window function");
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
|
Reference in New Issue
Block a user