summaryrefslogtreecommitdiff
path: root/sql/item_windowfunc.h
diff options
context:
space:
mode:
authorVarun Gupta <varunraiko1803@gmail.com>2017-07-17 15:02:22 +0530
committerVarun Gupta <varunraiko1803@gmail.com>2017-11-01 23:13:01 +0530
commit96565ac3118c936e81969cb68e3d1c6fa34c4114 (patch)
tree618532af47eac608159d6f8171ecff0224c527a8 /sql/item_windowfunc.h
parent330577988f23bcee35fb3956d35d9c51f410ea46 (diff)
downloadmariadb-git-96565ac3118c936e81969cb68e3d1c6fa34c4114.tar.gz
Added the function setting_handler_for_percentile_function() for the percentile_disc function that would
set the type of the result field for percentile_disc. Percentile_cont would habe double precision result type
Diffstat (limited to 'sql/item_windowfunc.h')
-rw-r--r--sql/item_windowfunc.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h
index c5c2c0aa004..a83147fc7a1 100644
--- a/sql/item_windowfunc.h
+++ b/sql/item_windowfunc.h
@@ -1137,6 +1137,21 @@ public:
}
}
+ void setting_handler_for_percentile_functions(Item_result rtype) const
+ {
+ switch(window_func()->sum_func()){
+ case Item_sum::PERCENTILE_DISC_FUNC:
+ ((Item_sum_percentile_disc* ) window_func())->set_handler_by_cmp_type(rtype);
+ break;
+ default:
+ return;
+ }
+ }
+
+ bool check_result_type_of_order_item();
+
+
+
/*
Computation functions.
TODO: consoder merging these with class Group_bound_tracker.