diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2016-09-22 18:26:55 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2016-09-24 15:12:34 +0200 |
commit | 53cf265b3b6be949a19294661cb3e0ce25d9c712 (patch) | |
tree | 4d80b82ecc26a88e94c3afb5056fac9b742023ea /sql/item_sum.h | |
parent | 29b227c33565596f903cc6ef5aa2d8a76324e28c (diff) | |
download | mariadb-git-53cf265b3b6be949a19294661cb3e0ce25d9c712.tar.gz |
Implement LEAD and LAG and NTH_VALUE functions
Refactour out (into a copy for now) the logic of Item_sum_hybrid, to
allow for multiple arguments. It does not contain the comparator
members. The result is the class Item_sum_hybrid_simple.
LEAD and LAG make use of this Item to store previous rows in a chache.
It also helps in specifying the field type. Currently LEAD/LAG do not
support default values.
NTH_VALUE behaves identical to LEAD and LAG, except that the starting
position cursor is placed on the top of the frame instead of the current
row.
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r-- | sql/item_sum.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h index d7d583a6fed..b9075db0196 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -350,7 +350,8 @@ public: AVG_DISTINCT_FUNC, MIN_FUNC, MAX_FUNC, STD_FUNC, VARIANCE_FUNC, SUM_BIT_FUNC, UDF_SUM_FUNC, GROUP_CONCAT_FUNC, ROW_NUMBER_FUNC, RANK_FUNC, DENSE_RANK_FUNC, PERCENT_RANK_FUNC, - CUME_DIST_FUNC, NTILE_FUNC, FIRST_VALUE_FUNC, LAST_VALUE_FUNC + CUME_DIST_FUNC, NTILE_FUNC, FIRST_VALUE_FUNC, LAST_VALUE_FUNC, + NTH_VALUE_FUNC, LEAD_FUNC, LAG_FUNC }; Item **ref_by; /* pointer to a ref to the object used to register it */ |