mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 11:27:39 +02:00
Date-time fields are disabled currently for the result type of percentile function
This commit is contained in:
parent
58a6e43513
commit
0ef6127c29
2 changed files with 4 additions and 5 deletions
|
|
@ -176,10 +176,9 @@ bool Item_window_func::check_result_type_of_order_item()
|
|||
Item_result rtype= window_spec->order_list->first->item[0]->cmp_type();
|
||||
// TODO (varun) : support date type in percentile_cont function
|
||||
if (rtype != REAL_RESULT && rtype != INT_RESULT &&
|
||||
rtype != DECIMAL_RESULT && rtype != TIME_RESULT &&
|
||||
window_func()->sum_func() == Item_sum::PERCENTILE_CONT_FUNC)
|
||||
rtype != DECIMAL_RESULT && rtype != TIME_RESULT)
|
||||
{
|
||||
my_error(ER_WRONG_TYPE_FOR_PERCENTILE_CONT, MYF(0));
|
||||
my_error(ER_WRONG_TYPE_FOR_PERCENTILE_FUNC, MYF(0));
|
||||
return TRUE;
|
||||
}
|
||||
setting_handler_for_percentile_functions(rtype);
|
||||
|
|
|
|||
|
|
@ -7788,8 +7788,8 @@ ER_UNKNOWN_COMPRESSION_METHOD
|
|||
eng "Unknown compression method: %s"
|
||||
ER_NOT_SINGLE_ELEMENT_ORDER_LIST
|
||||
eng "Incorrect number of elements in the order list for '%s'"
|
||||
ER_WRONG_TYPE_FOR_PERCENTILE_CONT
|
||||
eng "Numeric datatype is required for Percentile_CONT function"
|
||||
ER_WRONG_TYPE_FOR_PERCENTILE_FUNC
|
||||
eng "Numeric datatype is required for %s function"
|
||||
ER_ARGUMENT_NOT_CONSTANT
|
||||
eng "Argument to the percentile functions is not a constant"
|
||||
ER_ARGUMENT_OUT_OF_RANGE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue