summaryrefslogtreecommitdiff
path: root/sql/item_sum.h
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2016-02-18 01:25:26 +0300
committerSergei Petrunia <psergey@askmonty.org>2016-02-18 01:25:26 +0300
commitbe15858245fc7c23ba14e26d4cead6f7312711dd (patch)
treed51f86c5075b10fce36c171ac6210b388c733fc6 /sql/item_sum.h
parent0c223a96c12689157894c09f91aa2a5500937afb (diff)
downloadmariadb-git-be15858245fc7c23ba14e26d4cead6f7312711dd.tar.gz
MDEV-9526: Compute Aggregate functions as window functions
- Add temporary code: clone_read_record() clones READ_RECORD structure, as long as it is used for reading filesort() result that fits into memory. - Add frame bounds for ROWS-type frames. ROWS n PRECEDING|FOLLOWING, ROWS UNBOUNDED PRECEDING|FOLLOWING, CURRENT ROW are supported. - Add Item_sum_count::remove() which allows "streaming" computation of COUNT() over a moving frame.
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r--sql/item_sum.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h
index e0e74efef28..c01735b00ff 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -545,6 +545,9 @@ public:
virtual void clear()= 0;
virtual bool add()= 0;
virtual bool setup(THD *thd) { return false; }
+
+ //psergey: for window functions:
+ virtual void remove() { DBUG_ASSERT(0); }
virtual void cleanup();
bool check_vcol_func_processor(uchar *int_arg)
@@ -784,6 +787,8 @@ class Item_sum_count :public Item_sum_int
void clear();
bool add();
void cleanup();
+ // psergey-added:
+ void remove();
public:
Item_sum_count(THD *thd, Item *item_par):