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

Split Item_func_min_max::val_xxx() and Item_func_min_max::get_date() into methods in Type_handler

Details

    Description

      Under term of this tasks we'll remove tests for cmp_type() and result_type() in Item_func_min_max::val_xxx() and Item_func_min_max::get_date() and introduce instead new methods in Type_handler, e.g.:

      class Type_handler
      {
        ...
        virtual
        String *Item_func_min_max_val_str(Item_func_min_max *,
                                          String *) const;
      }
      

      The methods Item_func_hybrid_min_max::val_xxx() and Item_func_min_max::get_date() will call the corresponding new methods in Type_handler:

      class Item_func_min_max: public Item_hybrid_func
      {
        ...
        String *val_str(String*str)
        {
          return Item_func_min_max::type_handler()->
                   Item_func_min_max_val_str(this, str);
        }
        ...
      }
      

      For performance purposes, the change should try not to introduce new virtual calls.
      One virtual call for xxx_type() should be replaced to one virtual call in Type_handler.
      All possible calls inside the new methods should be done statically.

      Attachments

        Issue Links

          Activity

            bar Alexander Barkov created issue -
            bar Alexander Barkov made changes -
            Field Original Value New Value
            bar Alexander Barkov made changes -
            Description Under term of this tasks we'll remove tests for {{cmp_type())}} and {{result_type()}} in {{Item_func_min_max::val_xxx()}} and {{Item_func_min_max::get_date()}} and introduce instead new methods in {{Type_handler}}, e.g.:
            {code:cpp}
            class Type_handler
            {
              ...
              virtual
              String *Item_func_min_max_val_str(Item_func_min_max *,
                                                String *) const;
            }
            {code}

            The methods {{Item_func_hybrid_min_max::val_xxx()}} and {{Item_func_min_max::get_date()}} will call the corresponding new methods in {{Type_handler}}:
            {code:cpp}
            class Item_func_min_max: public Item_hybrid_func
            {
              ...
              String *val_str(String*str)
              {
                return Item_func_min_max::type_handler()->
                         Item_func_min_max_val_str(this, str);
              }
              ...
            }
            {code}

            For performance purposes, the change should try not to introduce new virtual calls.
            One virtual call in {{switch(xxx_type())}} should be replaced to one virtual call in {{Type_handler}}.
            Calls inside the new methods in {{Type_handler}} should be done statically.
            Under term of this tasks we'll remove tests for {{cmp_type()}} and {{result_type()}} in {{Item_func_min_max::val_xxx()}} and {{Item_func_min_max::get_date()}} and introduce instead new methods in {{Type_handler}}, e.g.:
            {code:cpp}
            class Type_handler
            {
              ...
              virtual
              String *Item_func_min_max_val_str(Item_func_min_max *,
                                                String *) const;
            }
            {code}

            The methods {{Item_func_hybrid_min_max::val_xxx()}} and {{Item_func_min_max::get_date()}} will call the corresponding new methods in {{Type_handler}}:
            {code:cpp}
            class Item_func_min_max: public Item_hybrid_func
            {
              ...
              String *val_str(String*str)
              {
                return Item_func_min_max::type_handler()->
                         Item_func_min_max_val_str(this, str);
              }
              ...
            }
            {code}

            For performance purposes, the change should try not to introduce new virtual calls.
            One virtual call in {{switch(xxx_type())}} should be replaced to one virtual call in {{Type_handler}}.
            Calls inside the new methods in {{Type_handler}} should be done statically.
            bar Alexander Barkov made changes -
            Description Under term of this tasks we'll remove tests for {{cmp_type()}} and {{result_type()}} in {{Item_func_min_max::val_xxx()}} and {{Item_func_min_max::get_date()}} and introduce instead new methods in {{Type_handler}}, e.g.:
            {code:cpp}
            class Type_handler
            {
              ...
              virtual
              String *Item_func_min_max_val_str(Item_func_min_max *,
                                                String *) const;
            }
            {code}

            The methods {{Item_func_hybrid_min_max::val_xxx()}} and {{Item_func_min_max::get_date()}} will call the corresponding new methods in {{Type_handler}}:
            {code:cpp}
            class Item_func_min_max: public Item_hybrid_func
            {
              ...
              String *val_str(String*str)
              {
                return Item_func_min_max::type_handler()->
                         Item_func_min_max_val_str(this, str);
              }
              ...
            }
            {code}

            For performance purposes, the change should try not to introduce new virtual calls.
            One virtual call in {{switch(xxx_type())}} should be replaced to one virtual call in {{Type_handler}}.
            Calls inside the new methods in {{Type_handler}} should be done statically.
            Under term of this tasks we'll remove tests for {{cmp_type()}} and {{result_type()}} in {{Item_func_min_max::val_xxx()}} and {{Item_func_min_max::get_date()}} and introduce instead new methods in {{Type_handler}}, e.g.:
            {code:cpp}
            class Type_handler
            {
              ...
              virtual
              String *Item_func_min_max_val_str(Item_func_min_max *,
                                                String *) const;
            }
            {code}

            The methods {{Item_func_hybrid_min_max::val_xxx()}} and {{Item_func_min_max::get_date()}} will call the corresponding new methods in {{Type_handler}}:
            {code:cpp}
            class Item_func_min_max: public Item_hybrid_func
            {
              ...
              String *val_str(String*str)
              {
                return Item_func_min_max::type_handler()->
                         Item_func_min_max_val_str(this, str);
              }
              ...
            }
            {code}

            For performance purposes, the change should try not to introduce new virtual calls.
            One virtual call in {{switch(xxx_type())}} should be replaced to one virtual call in {{Type_handler}}.
            All possible calls inside the new methods should be done statically.
            bar Alexander Barkov made changes -
            Description Under term of this tasks we'll remove tests for {{cmp_type()}} and {{result_type()}} in {{Item_func_min_max::val_xxx()}} and {{Item_func_min_max::get_date()}} and introduce instead new methods in {{Type_handler}}, e.g.:
            {code:cpp}
            class Type_handler
            {
              ...
              virtual
              String *Item_func_min_max_val_str(Item_func_min_max *,
                                                String *) const;
            }
            {code}

            The methods {{Item_func_hybrid_min_max::val_xxx()}} and {{Item_func_min_max::get_date()}} will call the corresponding new methods in {{Type_handler}}:
            {code:cpp}
            class Item_func_min_max: public Item_hybrid_func
            {
              ...
              String *val_str(String*str)
              {
                return Item_func_min_max::type_handler()->
                         Item_func_min_max_val_str(this, str);
              }
              ...
            }
            {code}

            For performance purposes, the change should try not to introduce new virtual calls.
            One virtual call in {{switch(xxx_type())}} should be replaced to one virtual call in {{Type_handler}}.
            All possible calls inside the new methods should be done statically.
            Under term of this tasks we'll remove tests for {{cmp_type()}} and {{result_type()}} in {{Item_func_min_max::val_xxx()}} and {{Item_func_min_max::get_date()}} and introduce instead new methods in {{Type_handler}}, e.g.:
            {code:cpp}
            class Type_handler
            {
              ...
              virtual
              String *Item_func_min_max_val_str(Item_func_min_max *,
                                                String *) const;
            }
            {code}

            The methods {{Item_func_hybrid_min_max::val_xxx()}} and {{Item_func_min_max::get_date()}} will call the corresponding new methods in {{Type_handler}}:
            {code:cpp}
            class Item_func_min_max: public Item_hybrid_func
            {
              ...
              String *val_str(String*str)
              {
                return Item_func_min_max::type_handler()->
                         Item_func_min_max_val_str(this, str);
              }
              ...
            }
            {code}

            For performance purposes, the change should try not to introduce new virtual calls.
            One virtual call for {{xxx_type()}} should be replaced to one virtual call in {{Type_handler}}.
            All possible calls inside the new methods should be done statically.
            bar Alexander Barkov made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            bar Alexander Barkov made changes -
            Assignee Alexander Barkov [ bar ] Alexey Botchkov [ holyfoot ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            holyfoot Alexey Botchkov made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            bar Alexander Barkov made changes -
            Fix Version/s 10.3.0 [ 22127 ]
            Fix Version/s 10.3 [ 22126 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            bar Alexander Barkov made changes -
            Assignee Alexey Botchkov [ holyfoot ] Alexander Barkov [ bar ]
            bar Alexander Barkov made changes -
            Labels datatype
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 78708 ] MariaDB v4 [ 133070 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.