[MDEV-15758] Split Item_bool_func::get_mm_leaf() into virtual methods in Field and Type_handler Created: 2018-04-03  Updated: 2018-07-20  Resolved: 2018-07-20

Status: Closed
Project: MariaDB Server
Component/s: Data types, Optimizer
Fix Version/s: 10.4.0

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-4912 Data type plugin API version 1 Closed
blocks MDEV-13995 MAX(timestamp) returns a wrong result... Closed
Relates
relates to MDEV-8787 Return Impossible WHERE instead of Fu... Open
relates to MDEV-15759 Expect "Impossible WHERE" for indexed... Closed
relates to MDEV-16784 Range search does not work well for d... Open

 Description   

The code in Item_bool_func::get_mm_leaf() and stored_field_cmp_to_item() has tests for Field::type_handler(), Field::cmp_type(), Field::type().
This is not friendly to pluggable data types.

Under terms of this task we'll split the code into new virtual methods with approximately these prototypes:

virtual SEL_ARG *Field::get_mm_leaf(RANGE_OPT_PARAM *param, KEY_PART *key_part,
                                    const Item_bool_func *cond,
                                    int op, Item *value);
virtual int Type_handler::stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const;

and move data-type specific pieces of Item_bool_func::get_mm_leaf() and stored_field_cmp_to_item() into virtual implementations of the new methods.

With this approach, pluggable data types will be able to implement their own methods to control the range optimizer


Generated at Thu Feb 08 08:23:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.