diff --git a/src/Interpreters/Aggregator.cpp b/src/Interpreters/Aggregator.cpp index e2ddfbe3418..c3cfd0647be 100644 --- a/src/Interpreters/Aggregator.cpp +++ b/src/Interpreters/Aggregator.cpp @@ -11,11 +11,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -23,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -37,13 +34,13 @@ #include #include #include -#include #include #include #include + namespace ProfileEvents { extern const Event ExternalAggregationWritePart; @@ -1123,7 +1120,9 @@ void NO_INLINE Aggregator::executeImplBatch( return; /// For all rows. - AggregateDataPtr place = aggregates_pool->alloc(0); + + /// This pointer is unused, but the logic will compare it for nullptr to check if the cell is set. + AggregateDataPtr place = reinterpret_cast(0x1); if (all_keys_are_const) { state.emplaceKey(method.data, 0, *aggregates_pool).setMapped(place);