mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
dbms: fixed error [#METR-11220].
This commit is contained in:
parent
0f5e847172
commit
c815fe7a6f
@ -59,7 +59,7 @@ public:
|
||||
virtual void create(AggregateDataPtr place) const = 0;
|
||||
|
||||
/// Уничтожить данные для агрегации.
|
||||
virtual void destroy(AggregateDataPtr place) const = 0;
|
||||
virtual void destroy(AggregateDataPtr place) const noexcept = 0;
|
||||
|
||||
/// Уничтожать данные не обязательно.
|
||||
virtual bool hasTrivialDestructor() const = 0;
|
||||
@ -118,7 +118,7 @@ public:
|
||||
new (place) Data;
|
||||
}
|
||||
|
||||
void destroy(AggregateDataPtr place) const
|
||||
void destroy(AggregateDataPtr place) const noexcept
|
||||
{
|
||||
data(place).~Data();
|
||||
}
|
||||
|
@ -265,14 +265,15 @@ void Aggregator::mergeDataImpl(
|
||||
if (!inserted)
|
||||
{
|
||||
for (size_t i = 0; i < aggregates_size; ++i)
|
||||
{
|
||||
aggregate_functions[i]->merge(
|
||||
Method::getAggregateData(res_it->second) + offsets_of_aggregate_states[i],
|
||||
Method::getAggregateData(it->second) + offsets_of_aggregate_states[i]);
|
||||
|
||||
for (size_t i = 0; i < aggregates_size; ++i)
|
||||
aggregate_functions[i]->destroy(
|
||||
Method::getAggregateData(it->second) + offsets_of_aggregate_states[i]);
|
||||
}
|
||||
|
||||
Method::getAggregateData(it->second) = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -668,10 +669,10 @@ AggregatedDataVariantsPtr Aggregator::merge(ManyAggregatedDataVariants & data_va
|
||||
AggregatedDataWithoutKey & current_data = current.without_key;
|
||||
|
||||
for (size_t i = 0; i < aggregates_size; ++i)
|
||||
{
|
||||
aggregate_functions[i]->merge(res_data + offsets_of_aggregate_states[i], current_data + offsets_of_aggregate_states[i]);
|
||||
|
||||
for (size_t i = 0; i < aggregates_size; ++i)
|
||||
aggregate_functions[i]->destroy(current_data + offsets_of_aggregate_states[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (res->type == AggregatedDataVariants::KEY_64)
|
||||
|
Loading…
Reference in New Issue
Block a user