diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-05-06 19:12:59 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-05-06 19:12:59 +0400 |
commit | 46239f29c6e624da3b516a25433b5dfb97fe12ea (patch) | |
tree | ef896007e3aed74bb7345fe0a5fb2b8322adb5c8 /sql/item_windowfunc.h | |
parent | 5a644e177f152af6904160259b5e0afac2307747 (diff) | |
download | mariadb-git-46239f29c6e624da3b516a25433b5dfb97fe12ea.tar.gz |
MDEV-12713 Define virtual type_handler() for all Item classes
Diffstat (limited to 'sql/item_windowfunc.h')
-rw-r--r-- | sql/item_windowfunc.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h index 59b98c93a23..ab480539583 100644 --- a/sql/item_windowfunc.h +++ b/sql/item_windowfunc.h @@ -309,6 +309,8 @@ class Item_sum_hybrid_simple : public Item_sum, { return Type_handler_hybrid_field_type::cmp_type(); } enum enum_field_types field_type() const { return Type_handler_hybrid_field_type::field_type(); } + const Type_handler *type_handler() const + { return Type_handler_hybrid_field_type::type_handler(); } void update_field(); Field *create_tmp_field(bool group, TABLE *table); void clear() @@ -513,6 +515,7 @@ class Item_sum_percent_rank: public Item_sum_window_with_row_count bool add(); enum Item_result result_type () const { return REAL_RESULT; } enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; } + const Type_handler *type_handler() const { return &type_handler_double; } void fix_length_and_dec() { @@ -599,6 +602,7 @@ class Item_sum_cume_dist: public Item_sum_window_with_row_count void update_field() {} enum Item_result result_type () const { return REAL_RESULT; } enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; } + const Type_handler *type_handler() const { return &type_handler_double; } void fix_length_and_dec() { @@ -676,6 +680,7 @@ class Item_sum_ntile : public Item_sum_window_with_row_count enum Item_result result_type () const { return INT_RESULT; } enum_field_types field_type() const { return MYSQL_TYPE_LONGLONG; } + const Type_handler *type_handler() const { return &type_handler_longlong; } Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return get_item_copy<Item_sum_ntile>(thd, mem_root, this); } @@ -804,6 +809,10 @@ public: { return ((Item_sum *) args[0])->field_type(); } + const Type_handler *type_handler() const + { + return ((Item_sum *) args[0])->type_handler(); + } enum Item::Type type() const { return Item::WINDOW_FUNC_ITEM; } private: |