summaryrefslogtreecommitdiff
path: root/sql/item_windowfunc.cc
diff options
context:
space:
mode:
authorVarun Gupta <varunraiko1803@gmail.com>2017-10-27 00:10:22 +0530
committerVarun Gupta <varunraiko1803@gmail.com>2017-11-01 23:17:15 +0530
commit0ef6127c291c1b2ce2650c9ea4213293c8058741 (patch)
treeb499be4245dace0d2a2e2629e8f3f2cfd4ef456d /sql/item_windowfunc.cc
parent58a6e43513bd9b8ee6cc58ddf3d8aee5fe0eb279 (diff)
downloadmariadb-git-0ef6127c291c1b2ce2650c9ea4213293c8058741.tar.gz
Date-time fields are disabled currently for the result type of percentile function
Diffstat (limited to 'sql/item_windowfunc.cc')
-rw-r--r--sql/item_windowfunc.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/item_windowfunc.cc b/sql/item_windowfunc.cc
index 8d835eac903..d38befa66bc 100644
--- a/sql/item_windowfunc.cc
+++ b/sql/item_windowfunc.cc
@@ -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);