MySQL 8.0.39
Source Code Documentation
item_sum.h File Reference
#include <assert.h>
#include <sys/types.h>
#include <climits>
#include <cmath>
#include <cstdio>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include "field_types.h"
#include "m_ctype.h"
#include "m_string.h"
#include "my_alloc.h"
#include "my_compiler.h"
#include "my_inttypes.h"
#include "my_sys.h"
#include "my_table_map.h"
#include "my_time.h"
#include "my_tree.h"
#include "mysql/udf_registration_types.h"
#include "mysql_time.h"
#include "mysqld_error.h"
#include "sql/enum_query_type.h"
#include "sql/gis/geometries_cs.h"
#include "sql/gis/wkb.h"
#include "sql/item.h"
#include "sql/item_func.h"
#include "sql/mem_root_array.h"
#include "sql/my_decimal.h"
#include "sql/parse_location.h"
#include "sql/parse_tree_window.h"
#include "sql/sql_base.h"
#include "sql/sql_const.h"
#include "sql/sql_list.h"
#include "sql/sql_udf.h"
#include "sql/thr_malloc.h"
#include "sql/window_lex.h"
#include "sql_string.h"
#include "template_utils.h"

Go to the source code of this file.

Classes

class  Aggregator
 The abstract base class for the Aggregator_* classes. More...
 
class  Item_sum
 Class Item_sum is the base class used for special expressions that SQL calls 'set functions'. More...
 
struct  Item_sum::Collect_grouped_aggregate_info
 argument used by walk method collect_grouped_aggregates ("cga") More...
 
class  Aggregator_distinct
 The distinct aggregator. More...
 
class  Aggregator_simple
 The pass-through aggregator. More...
 
class  Item_sum_num
 
class  Item_sum_int
 
class  Item_sum_sum
 
class  Item_sum_count
 
class  Item_sum_hybrid_field
 This is used in connection which a parent Item_sum: More...
 
class  Item_sum_num_field
 Common abstract class for: Item_avg_field Item_variance_field. More...
 
class  Item_avg_field
 
class  Item_sum_bit_field
 This is used in connection with an Item_sum_bit,. More...
 
class  Item_sum_json
 Common abstraction for Item_sum_json_array and Item_sum_json_object. More...
 
class  Item_sum_json_array
 Implements aggregation of values into an array. More...
 
class  Item_sum_json_object
 Implements aggregation of values into an object. More...
 
class  Item_sum_avg
 
class  Item_variance_field
 
class  Item_sum_variance
 
class  Item_std_field
 
class  Item_sum_std
 
class  Item_sum_hybrid
 Abstract base class for the MIN and MAX aggregate functions. More...
 
class  Item_sum_min
 
class  Item_sum_max
 
class  Item_sum_bit
 Base class used to implement BIT_AND, BIT_OR and BIT_XOR. More...
 
class  Item_sum_or
 
class  Item_sum_and
 
class  Item_sum_xor
 
class  Item_udf_sum
 
class  Item_sum_udf_float
 
class  Item_sum_udf_int
 
class  Item_sum_udf_str
 
class  Item_sum_udf_decimal
 
class  Item_func_group_concat
 
class  Item_non_framing_wf
 Common parent class for window functions that always work on the entire partition, even if a frame is defined. More...
 
class  Item_row_number
 ROW_NUMBER window function, cf. More...
 
class  Item_rank
 RANK or DENSE_RANK window function, cf. More...
 
class  Item_cume_dist
 CUME_DIST window function, cf. More...
 
class  Item_percent_rank
 PERCENT_RANK window function, cf. More...
 
class  Item_ntile
 NTILE window function, cf. More...
 
class  Item_lead_lag
 LEAD/LAG window functions, cf. More...
 
class  Item_first_last_value
 FIRST_VALUE/LAST_VALUE window functions, cf. More...
 
class  Item_nth_value
 NTH_VALUE window function, cf. More...
 
class  Item_func_grouping
 Class for implementation of the GROUPING function. More...
 
class  Item_rollup_sum_switcher
 A wrapper Item that contains a number of aggregate items, one for each level of rollup (see Item_rollup_group_item for numbering conventions). More...
 
class  Item_sum_collect
 Implements ST_Collect which aggregates geometries into Multipoints, Multilinestrings, Multipolygons and Geometrycollections. More...
 

Functions

int group_concat_key_cmp_with_distinct (const void *arg, const void *key1, const void *key2)
 Compares the values for fields in expr list of GROUP_CONCAT. More...
 
int group_concat_key_cmp_with_order (const void *arg, const void *key1, const void *key2)
 function of sort for syntax: GROUP_CONCAT(expr,... ORDER BY col,... ) More...
 
int dump_leaf_key (void *key_arg, element_count count, void *item_arg)
 Append data from current leaf to item->result. More...
 

Function Documentation

◆ dump_leaf_key()

int dump_leaf_key ( void *  key_arg,
element_count  count,
void *  item_arg 
)

Append data from current leaf to item->result.

To avoid duplicated warnings in Item_func_group_concat::val_str()

To avoid duplicated warnings in Item_func_group_concat::val_str()

◆ group_concat_key_cmp_with_distinct()

int group_concat_key_cmp_with_distinct ( const void *  arg,
const void *  key1,
const void *  key2 
)

Compares the values for fields in expr list of GROUP_CONCAT.

GROUP_CONCAT([DISTINCT] expr [,expr ...]
[ORDER BY {unsigned_integer | col_name | expr}
[ASC | DESC] [,col_name ...]]
[SEPARATOR str_val])
@ ASC
Definition: sql_yacc.h:67
@ BY
Definition: sql_yacc.h:93
@ DISTINCT
Definition: sql_yacc.h:185
@ DESC
Definition: sql_yacc.h:176
Definition: table.h:282
Return values
-1: key1 < key2
0: key1 = key2
1: key1 > key2

◆ group_concat_key_cmp_with_order()

int group_concat_key_cmp_with_order ( const void *  arg,
const void *  key1,
const void *  key2 
)

function of sort for syntax: GROUP_CONCAT(expr,... ORDER BY col,... )