[MDEV-12001] Split Item_func_round::fix_length_and_dec to virtual methods in Type_handler Created: 2017-02-06  Updated: 2017-04-07  Resolved: 2017-02-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
Relates
relates to MDEV-12000 ROUND(expr,const_expr_returning_NULL)... Closed

 Description   

Future new data types might want the function ROUND:

  • to do something different than INT,DECIMAL,DOUBLE rounding
  • or even return an error (if this operation is not applicable)

We'll split the following switch in Item_func_round::fix_length_and_dec

switch (args[0]->result_type())

to virtial methods in Type_handler.

Also, we'll disallow ROUND for the GEOMETRY type, as it's useless. So GEOMETRY will be an example of a type whose ROUND operation is not applicable.


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