MySQL 9.1.0
Source Code Documentation
|
The pass-through aggregator. More...
#include <item_sum.h>
Public Member Functions | |
Aggregator_simple (Item_sum *sum) | |
Aggregator_type | Aggrtype () override |
bool | setup (THD *thd) override |
Called before adding the first row. More... | |
void | clear () override |
Called when we need to wipe out all the data from the aggregator: all the values accumulated and all the state. More... | |
bool | add () override |
Called when there's a new value to be aggregated. More... | |
void | endup () override |
Called when there are no more data and the final value is to be retrieved. More... | |
my_decimal * | arg_val_decimal (my_decimal *value) override |
Decimal value of being-aggregated argument. More... | |
double | arg_val_real () override |
Floating point value of being-aggregated argument. More... | |
bool | arg_is_null (bool use_null_value) override |
NULLness of being-aggregated argument. More... | |
Public Member Functions inherited from Aggregator | |
Aggregator (Item_sum *arg) | |
virtual | ~Aggregator ()=default |
Additional Inherited Members | |
Public Types inherited from Aggregator | |
enum | Aggregator_type { SIMPLE_AGGREGATOR , DISTINCT_AGGREGATOR } |
Protected Attributes inherited from Aggregator | |
Item_sum * | item_sum |
The pass-through aggregator.
Implements AGGFN (DISTINCT ..) by knowing it gets distinct data on input. So it just pumps them back to the Item_sum descendant class.
|
inline |
|
inlineoverridevirtual |
Called when there's a new value to be aggregated.
Updates the internal state of the aggregator to reflect the new value.
Implements Aggregator.
|
inlineoverridevirtual |
Implements Aggregator.
|
overridevirtual |
NULLness of being-aggregated argument.
use_null_value | Optimization: to determine if the argument is NULL we must, in the general case, call is_null() on it, which itself might call val_*() on it, which might be costly. If you just have called arg_val*(), you can pass use_null_value=true; this way, arg_is_null() might avoid is_null() and instead do a cheap read of the Item's null_value (updated by arg_val*()). |
Implements Aggregator.
|
overridevirtual |
Decimal value of being-aggregated argument.
Implements Aggregator.
|
overridevirtual |
Floating point value of being-aggregated argument.
Implements Aggregator.
|
inlineoverridevirtual |
Called when we need to wipe out all the data from the aggregator: all the values accumulated and all the state.
Cleans up the internal structures and resets them to their initial state.
Implements Aggregator.
|
inlineoverridevirtual |
Called when there are no more data and the final value is to be retrieved.
Finalises the state of the aggregator, so the final result can be retrieved.
Implements Aggregator.
|
inlineoverridevirtual |
Called before adding the first row.
Allocates and sets up the internal aggregation structures used, e.g. the Unique instance used to calculate distinct.
Implements Aggregator.