mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Fix comments
This commit is contained in:
parent
92979af3bf
commit
c9a9ef5b7e
@ -145,7 +145,7 @@ public:
|
||||
return nested_func->getDefaultVersion();
|
||||
}
|
||||
|
||||
template <bool up_tp_state>
|
||||
template <bool up_to_state>
|
||||
void destroyImpl(AggregateDataPtr __restrict place) const noexcept
|
||||
{
|
||||
AggregateFunctionForEachData & state = data(place);
|
||||
@ -153,7 +153,7 @@ public:
|
||||
char * nested_state = state.array_of_aggregate_datas;
|
||||
for (size_t i = 0; i < state.dynamic_array_size; ++i)
|
||||
{
|
||||
if constexpr (up_tp_state)
|
||||
if constexpr (up_to_state)
|
||||
nested_func->destroyUpToState(nested_state);
|
||||
else
|
||||
nested_func->destroy(nested_state);
|
||||
|
@ -225,8 +225,7 @@ public:
|
||||
nested_func->destroy(nested_place);
|
||||
}
|
||||
|
||||
auto to_destroy = std::move(state.merged_maps);
|
||||
this->data(place).~Data();
|
||||
state.~Data();
|
||||
}
|
||||
|
||||
void destroy(AggregateDataPtr __restrict place) const noexcept override
|
||||
|
@ -1756,6 +1756,9 @@ inline void Aggregator::insertAggregatesIntoColumns(Mapped & mapped, MutableColu
|
||||
* and ColumnAggregateFunction will take ownership of this state.
|
||||
* So, for aggregate functions with "-State" modifier, only states of all combinators that are used
|
||||
* after -State will be destroyed after result has been transferred to ColumnAggregateFunction.
|
||||
* For example, if we have function `uniqStateForEachMap` after aggregation we should destroy all states that
|
||||
* were created by combinators `-ForEach` and `-Map`, because resulting ColumnAggregateFunction will be
|
||||
* responsible only for destruction of the states created by `uniq` function.
|
||||
* But we should mark that the data no longer owns these states.
|
||||
*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user