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

Move Item_func::count_xxx_length() to Type_std_attributes

    XMLWordPrintable

Details

    Description

      Item_func has the following methods:

      void count_only_length(Item **item, uint nitems);
      void count_octet_length(Item **item, uint nitems);
      void count_real_length(Item **item, uint nitems);
      void count_decimal_length(Item **item, uint nitems);
      bool count_string_length(Item **item, uint nitems);
      uint count_max_decimals(Item **item, uint nitems)
      {
        uint res= 0;
        for (uint i= 0; i < nitems; i++)
          set_if_bigger(res, item[i]->decimals);
        return res;
      }
      void aggregate_attributes_int(Item **items, uint nitems);
      void aggregate_attributes_real(Item **items, uint nitems);
      void aggregate_attributes_decimal(Item **items, uint nitems);
      bool aggregate_attributes_string(Item **item, uint nitems);
      void aggregate_attributes_temporal(uint int_part_length,
                                         Item **item, uint nitems);
      

      Soon we'll reuse these methods for UNION purposes and remove the duplicate code in Item_type_holder::join_types.

      In order to reuse the code, we'll move these methods from Item_func to Type_std_attributes.

      Attachments

        Issue Links

          Activity

            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.