[MDEV-12775] Reuse data type aggregation code for hybrid functions and UNION Created: 2017-05-10  Updated: 2020-12-10  Resolved: 2017-05-15

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
Relates
relates to MDEV-9495 Wrong field type for a UNION of a sig... Closed
relates to MDEV-9497 UNION and COALESCE produce different ... Closed
relates to MDEV-12594 UNION between fixed length double col... Closed
relates to MDEV-12595 UNION converts INT to BIGINT Closed
relates to MDEV-12599 UNION is not symmetric when mixing IN... Closed
relates to MDEV-9234 Add Type_handler::union_element_final... Closed
relates to MDEV-21662 UNION to sub-query with constant NULL... Open
relates to MDEV-24387 Wrong number of decimal digits in cer... Closed

 Description   

Currently we have two versions of data type attribute aggregation code:

  • For hybrid functions, implemented in Type_handler::Item_hybrid_func_fix_attributes()
  • For UNION, implemented in Item_type_holder::join_types()

Both versions do the same thing, but in some cases UNION is not precise enough.
See bugs: MDEV-9495, MDEV-9497, MDEV-12594, MDEV-12595, MDEV-12599.

Under terms of this task we'll make the UNION related code reuse the code implemented in Type_handler::Item_hybrid_func_fix_attributes() and get rid of the second implementation in Item_type_holder::join_types().

This, among fixing the mentioned bugs, will simplify development of data type plugins, as the implementer will have to do less coding.



 Comments   
Comment by Oleksandr Byelkin [ 2017-05-15 ]

ok to push

Comment by Alexander Barkov [ 2017-05-15 ]

Pushed to bb-10.2-ext.

Generated at Thu Feb 08 08:00:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.