diff options
author | Igor Babaev <igor@askmonty.org> | 2016-03-18 10:52:02 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2016-03-18 10:52:02 -0700 |
commit | a74e8d36dde934b72b230b6d50b89f8e1ec034ae (patch) | |
tree | 73fec3db264449f9e40732f27db6708cfc8228dd /sql/item_windowfunc.h | |
parent | 13f9535f2d03a02b923d1d4e8a345f7e730ed084 (diff) | |
download | mariadb-git-a74e8d36dde934b72b230b6d50b89f8e1ec034ae.tar.gz |
For some window functions an order list must be present.
Diffstat (limited to 'sql/item_windowfunc.h')
-rw-r--r-- | sql/item_windowfunc.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h index 4e0ba7fc43b..983f196a86c 100644 --- a/sql/item_windowfunc.h +++ b/sql/item_windowfunc.h @@ -448,6 +448,19 @@ public: default: return false; } + } + + bool is_order_list_mandatory() + { + switch (window_func->sum_func()) { + case Item_sum::RANK_FUNC: + case Item_sum::DENSE_RANK_FUNC: + case Item_sum::PERCENT_RANK_FUNC: + case Item_sum::CUME_DIST_FUNC: + return true; + default: + return false; + } } /* |