Commit 0ef6127c authored by Varun Gupta's avatar Varun Gupta

Date-time fields are disabled currently for the result type of percentile function

parent 58a6e435
...@@ -176,10 +176,9 @@ bool Item_window_func::check_result_type_of_order_item() ...@@ -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(); Item_result rtype= window_spec->order_list->first->item[0]->cmp_type();
// TODO (varun) : support date type in percentile_cont function // TODO (varun) : support date type in percentile_cont function
if (rtype != REAL_RESULT && rtype != INT_RESULT && if (rtype != REAL_RESULT && rtype != INT_RESULT &&
rtype != DECIMAL_RESULT && rtype != TIME_RESULT && rtype != DECIMAL_RESULT && rtype != TIME_RESULT)
window_func()->sum_func() == Item_sum::PERCENTILE_CONT_FUNC)
{ {
my_error(ER_WRONG_TYPE_FOR_PERCENTILE_CONT, MYF(0)); my_error(ER_WRONG_TYPE_FOR_PERCENTILE_FUNC, MYF(0));
return TRUE; return TRUE;
} }
setting_handler_for_percentile_functions(rtype); setting_handler_for_percentile_functions(rtype);
......
...@@ -7788,8 +7788,8 @@ ER_UNKNOWN_COMPRESSION_METHOD ...@@ -7788,8 +7788,8 @@ ER_UNKNOWN_COMPRESSION_METHOD
eng "Unknown compression method: %s" eng "Unknown compression method: %s"
ER_NOT_SINGLE_ELEMENT_ORDER_LIST ER_NOT_SINGLE_ELEMENT_ORDER_LIST
eng "Incorrect number of elements in the order list for '%s'" eng "Incorrect number of elements in the order list for '%s'"
ER_WRONG_TYPE_FOR_PERCENTILE_CONT ER_WRONG_TYPE_FOR_PERCENTILE_FUNC
eng "Numeric datatype is required for Percentile_CONT function" eng "Numeric datatype is required for %s function"
ER_ARGUMENT_NOT_CONSTANT ER_ARGUMENT_NOT_CONSTANT
eng "Argument to the percentile functions is not a constant" eng "Argument to the percentile functions is not a constant"
ER_ARGUMENT_OUT_OF_RANGE ER_ARGUMENT_OUT_OF_RANGE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment