Commit faca7b9b authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru Committed by Vicențiu Ciorbaru

Fixup

parent a38ffa40
......@@ -712,7 +712,7 @@ class Item_func_json_arrayagg : public Item_func_group_concat
protected:
String *get_str_from_item(Item *i, String *tmp) override;
String *get_str_from_field(Item *i, Field *f, String *tmp,
const uchar *key, size_t offset,
const uchar *key,
bool is_null) override;
void cut_max_length(String *result,
uint old_length, uint max_length) const override;
......
......@@ -601,6 +601,16 @@ class Item_sum :public Item_func_or_sum
bool is_window_func_sum_expr() { return window_func_sum_expr_flag; }
virtual void setup_caches(THD *thd) {};
virtual void set_partition_row_count(ulonglong count) { DBUG_ASSERT(0); }
/*
While most Item_sum descendants employ standard aggregators configured
through Item_sum::set_aggregator() call, there are exceptions like
Item_func_group_concat, which implements its own custom aggregators for
deduplication values.
This function distinguishes between the use of standard and custom
aggregators by the object
*/
virtual bool uses_non_standard_aggregator_for_distinct() const
{ return false; }
virtual Keys_descriptor *get_keys_descriptor(uint orig_key_size) const;
protected:
virtual bool is_packing_allowed(uint *total_length) const;
......@@ -2013,6 +2023,8 @@ class Item_func_group_concat : public Item_sum
virtual void cut_max_length(String *result,
uint old_length, uint max_length) const;
bool uses_non_standard_aggregator_for_distinct() const override
{ return distinct; }
bool setup(THD *thd, bool exclude_nulls);
public:
// Methods used by ColumnStore
......
......@@ -2549,7 +2549,7 @@ void Column_statistics_collected::init(THD *thd, Field *table_field)
table_field->type() == MYSQL_TYPE_BIT ?
new (thd->mem_root) Count_distinct_field_bit(table_field) :
new (thd->mem_root) Count_distinct_field(table_field);
if (count_distinct && !count_distinct->setup(thd, max_heap_table_size))
if (count_distinct && count_distinct->setup(thd, max_heap_table_size))
{
/* Allocation failed */
delete count_distinct;
......
......@@ -309,23 +309,11 @@ static double get_merge_many_buffs_cost(THD *thd,
these will be random seeks.
*/
<<<<<<< HEAD
double Unique_impl::get_use_cost(THD *thd,
uint *buffer, size_t nkeys, uint key_size,
size_t max_in_memory_size,
double compare_factor,
bool intersect_fl, bool *in_memory)
||||||| parent of 2ff87b8cf9a (Add Unique support for packed keys)
double Unique_impl::get_use_cost(uint *buffer, size_t nkeys, uint key_size,
double Unique::get_use_cost(THD *thd,
uint *buffer, size_t nkeys, uint key_size,
size_t max_in_memory_size,
double compare_factor,
bool intersect_fl, bool *in_memory)
=======
double Unique::get_use_cost(uint *buffer, size_t nkeys, uint key_size,
size_t max_in_memory_size,
double compare_factor,
bool intersect_fl, bool *in_memory)
>>>>>>> 2ff87b8cf9a (Add Unique support for packed keys)
{
size_t max_elements_in_tree;
size_t last_tree_elems;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment