[MDEV-12655] Move Item_func::count_xxx_length() to Type_std_attributes Created: 2017-05-02  Updated: 2017-05-02  Resolved: 2017-05-02

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Fix Version/s: 10.3.1

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: datatype, refactoring

Issue Links:
Blocks
blocks MDEV-4912 Data type plugin API version 1 Closed

 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.



 Comments   
Comment by Alexander Barkov [ 2017-05-02 ]

Pushed to bb-10.2-ext

Generated at Thu Feb 08 07:59:25 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.