summaryrefslogtreecommitdiff
path: root/sql/item_windowfunc.h
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2016-09-20 22:12:48 +0200
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2016-09-24 15:12:34 +0200
commita2bafbabe2c1335bd411daf85dde8908e55dab62 (patch)
treea7a08b9a3701d2f9aa23957a3bc5f7d58167b85d /sql/item_windowfunc.h
parent15b8a772ccd39bad6d391f7e49733730e0eefae0 (diff)
downloadmariadb-git-a2bafbabe2c1335bd411daf85dde8908e55dab62.tar.gz
Make first_value and last_value computation efficient
With clever use of partition bounds, we only need to add one row to the items at a time. This way we remove the need to "reset" the item and run through the full partition again.
Diffstat (limited to 'sql/item_windowfunc.h')
-rw-r--r--sql/item_windowfunc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h
index 6333207ebb6..ba5955084e2 100644
--- a/sql/item_windowfunc.h
+++ b/sql/item_windowfunc.h
@@ -657,6 +657,8 @@ public:
case Item_sum::PERCENT_RANK_FUNC:
case Item_sum::CUME_DIST_FUNC:
case Item_sum::NTILE_FUNC:
+ case Item_sum::FIRST_VALUE_FUNC:
+ case Item_sum::LAST_VALUE_FUNC:
return true;
default:
return false;