Skip to content
Permalink
Browse files
Date-time fields are disabled currently for the result type of percen…
…tile function
  • Loading branch information
varunraiko committed Nov 1, 2017
1 parent 58a6e43 commit 0ef6127
Show file tree
Hide file tree
Showing 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

0 comments on commit 0ef6127

Please sign in to comment.