[MDEV-11344] Split Arg_comparator::set_compare_func() into virtual methods in Type_handler Created: 2016-11-24  Updated: 2017-04-07  Resolved: 2016-11-25

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

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

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

 Description   

There is a code in item_cmpfunc.cc:

int Arg_comparator::set_compare_func(Item_func_or_sum *item, Item_result type)
{
  owner= item;
  func= comparator_matrix[type]
                         [is_owner_equal_func()];
 
  switch (type) {
  case TIME_RESULT:
  ..
  case INT_RESULT:
  ..
  case STRING_RESULT:
  ..
  case DECIMAL_RESULT:
  ..
  case REAL_RESULT:
  }

Under terms of this task we'll decompose this switch into a new virtual method in Type_handler:

  virtual bool set_comparator_func(Arg_comparator *cmp) const;

Pieces of the code from every XXX_RESULT in the switch will go to the corresponding Type_handler.
E.g. the code from STRING_RESULT will go to Type_handler_string_result::set_comparator_func.



 Comments   
Comment by Alexander Barkov [ 2016-11-25 ]

Approved by Sanja.

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