[MDEV-12239] Add Type_handler::Item_sum_{sum|avg|variance}_fix_length_and_dec() Created: 2017-03-13  Updated: 2017-04-07  Resolved: 2017-03-19

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
Sprint: 10.2.6-1

 Description   

The following methods:

Item_sum_sum::fix_length_and_dec()
Item_sum_avg::fix_length_and_dec()
Item_sum_variance::fix_length_and_dec()

use methods cmp_type() and result_type() of their arguments.
The is not friendly to pluggable data types.
Pluggable data types should be able to define their own fix_length_and_dec() logic.

Under term of this task we'll split implementations of these methods into new methods in Type_handler:

virtual bool Item_sum_sum_fix_length_and_dec(Item_sum_sum *) const;
virtual bool Item_sum_avg_fix_length_and_dec(Item_sum_avg *) const;
virtual bool Item_sum_variance_fix_length_and_dec(Item_sum_variance *) const;

We'll also make the server return an error when a GOMETRY type expression appears as an argument of the affected operations.



 Comments   
Comment by Alexander Barkov [ 2017-03-19 ]

Pushed to bb-10.2-ext

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