Found in stress test: https://gist.github.com/alesapin/5cd6b8901488a1f170d5ef389900a534
Report: https://s3.amazonaws.com/clickhouse-test-reports/31158/7fb9a42b119b6c3eba1784caaabde51c1ded3384/stress_tests__debug__actions_.html
static Int64 getCurrentMemoryUsage()
{
    Int64 current_memory_usage = 0;
    if (auto * memory_tracker = CurrentThread::getMemoryTracker())
        current_memory_usage = memory_tracker->get();
    return current_memory_usage;
}
void AggregatingInOrderTransform::consume(Chunk chunk)
{
    Int64 initial_memory_usage = getCurrentMemoryUsage();
    size_t rows = chunk.getNumRows();
    if (rows == 0)
        return;
    if (!is_consume_started)
    {
        LOG_TRACE(log, "Aggregating in order");
        is_consume_started = true;
    }
    src_rows += rows;
    src_bytes += chunk.bytes();
    Columns materialized_columns;
    Columns key_columns(params->params.keys_size);