Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-15758

Split Item_bool_func::get_mm_leaf() into virtual methods in Field and Type_handler

    XMLWordPrintable

    Details

      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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: