[MDEV-11503] Introduce Type_handler::make_in_vector() and Item_func_in_fix_comparator_compatible_types() Created: 2016-12-08  Updated: 2017-04-07  Resolved: 2016-12-10

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   

This task will:

1. Introduce new Type_handler methods:

virtual in_vector *make_in_vector(THD *thd, const Item_func_in *func, uint nargs) const;
virtual bool Item_func_in_fix_comparator_compatible_types(THD *thd, Item_func_in *) const;

2. Remove these data type conditions in Item_func_in::fix_length_and_dec()

  • switch (m_comparator.cmp_type())
  • if (m_comparator.cmp_type() == STRING_RESULT
  • if (m_comparator.cmp_type() == ROW_RESULT)
  • if ... m_comparator.cmp_type() != INT_RESULT

and use the new Type_handler methods instead.

3. Split in_datetime (which now covers all temporal data types: DATETIME, DATE, TIME) into an abstract parent class in_temporal and two instantiable classes in_datetime (for DATETIME and DATE) and in_time (for TIME).

After this change the behavior of the code responsible for IN bisection search will be fully handled by Type_handler.

There will some explicit XXX_RESULT conditions be left though, in the code responsible for the cmp_items based IN search. This code will be cleaned-up in a separate patch.


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