Coverage Report

Created: 2026-02-10 05:04

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/root/doris/be/src/pipeline/dependency.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "dependency.h"
19
20
#include <memory>
21
#include <mutex>
22
23
#include "common/logging.h"
24
#include "exec/rowid_fetcher.h"
25
#include "pipeline/exec/multi_cast_data_streamer.h"
26
#include "pipeline/pipeline_fragment_context.h"
27
#include "pipeline/pipeline_task.h"
28
#include "runtime/exec_env.h"
29
#include "runtime/memory/mem_tracker.h"
30
#include "runtime_filter/runtime_filter_consumer.h"
31
#include "util/brpc_client_cache.h"
32
#include "vec/exec/scan/file_scanner.h"
33
#include "vec/exprs/vectorized_agg_fn.h"
34
#include "vec/exprs/vslot_ref.h"
35
#include "vec/spill/spill_stream_manager.h"
36
#include "vec/utils/util.hpp"
37
38
namespace doris::pipeline {
39
#include "common/compile_check_begin.h"
40
41
Dependency* BasicSharedState::create_source_dependency(int operator_id, int node_id,
42
519k
                                                       const std::string& name) {
43
519k
    source_deps.push_back(std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY"));
44
519k
    source_deps.back()->set_shared_state(this);
45
519k
    return source_deps.back().get();
46
519k
}
47
48
void BasicSharedState::create_source_dependencies(int num_sources, int operator_id, int node_id,
49
132k
                                                  const std::string& name) {
50
132k
    source_deps.resize(num_sources, nullptr);
51
961k
    for (auto& source_dep : source_deps) {
52
961k
        source_dep = std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY");
53
961k
        source_dep->set_shared_state(this);
54
961k
    }
55
132k
}
56
57
Dependency* BasicSharedState::create_sink_dependency(int dest_id, int node_id,
58
1.20M
                                                     const std::string& name) {
59
1.20M
    sink_deps.push_back(std::make_shared<Dependency>(dest_id, node_id, name + "_DEPENDENCY", true));
60
1.20M
    sink_deps.back()->set_shared_state(this);
61
1.20M
    return sink_deps.back().get();
62
1.20M
}
63
64
5.44M
void Dependency::_add_block_task(std::shared_ptr<PipelineTask> task) {
65
18.4E
    DCHECK(_blocked_task.empty() || _blocked_task[_blocked_task.size() - 1].lock() == nullptr ||
66
18.4E
           _blocked_task[_blocked_task.size() - 1].lock().get() != task.get())
67
18.4E
            << "Duplicate task: " << task->debug_string();
68
5.44M
    _blocked_task.push_back(task);
69
5.44M
}
70
71
27.2M
void Dependency::set_ready() {
72
27.2M
    if (_ready) {
73
22.3M
        return;
74
22.3M
    }
75
4.90M
    std::vector<std::weak_ptr<PipelineTask>> local_block_task {};
76
4.90M
    {
77
4.90M
        std::unique_lock<std::mutex> lc(_task_lock);
78
4.90M
        if (_ready) {
79
0
            return;
80
0
        }
81
4.90M
        _watcher.stop();
82
4.90M
        _ready = true;
83
4.90M
        local_block_task.swap(_blocked_task);
84
4.90M
    }
85
5.46M
    for (auto task : local_block_task) {
86
5.46M
        if (auto t = task.lock()) {
87
5.46M
            std::unique_lock<std::mutex> lc(_task_lock);
88
5.46M
            THROW_IF_ERROR(t->wake_up(this, lc));
89
5.46M
        }
90
5.46M
    }
91
4.90M
}
92
93
41.2M
Dependency* Dependency::is_blocked_by(std::shared_ptr<PipelineTask> task) {
94
41.2M
    std::unique_lock<std::mutex> lc(_task_lock);
95
41.2M
    auto ready = _ready.load();
96
41.2M
    if (!ready && task) {
97
5.46M
        _add_block_task(task);
98
5.46M
        start_watcher();
99
5.46M
        THROW_IF_ERROR(task->blocked(this, lc));
100
5.46M
    }
101
41.2M
    return ready ? nullptr : this;
102
41.2M
}
103
104
255k
std::string Dependency::debug_string(int indentation_level) {
105
255k
    fmt::memory_buffer debug_string_buffer;
106
255k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, block task = {}, ready={}, _always_ready={}",
107
255k
                   std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(),
108
255k
                   _ready, _always_ready);
109
255k
    return fmt::to_string(debug_string_buffer);
110
255k
}
111
112
204
std::string CountedFinishDependency::debug_string(int indentation_level) {
113
204
    fmt::memory_buffer debug_string_buffer;
114
204
    fmt::format_to(debug_string_buffer,
115
204
                   "{}{}: id={}, block_task={}, ready={}, _always_ready={}, count={}",
116
204
                   std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(),
117
204
                   _ready, _always_ready, _counter);
118
204
    return fmt::to_string(debug_string_buffer);
119
204
}
120
121
870
void RuntimeFilterTimer::call_timeout() {
122
870
    _parent->set_ready();
123
870
}
124
125
21.2k
void RuntimeFilterTimer::call_ready() {
126
21.2k
    _parent->set_ready();
127
21.2k
}
128
129
// should check rf timeout in two case:
130
// 1. the rf is ready just remove the wait queue
131
// 2. if the rf have local dependency, the rf should start wait when all local dependency is ready
132
1.82M
bool RuntimeFilterTimer::should_be_check_timeout() {
133
1.82M
    if (!_parent->ready() && !_local_runtime_filter_dependencies.empty()) {
134
13.2k
        bool all_ready = true;
135
13.2k
        for (auto& dep : _local_runtime_filter_dependencies) {
136
13.2k
            if (!dep->ready()) {
137
13.1k
                all_ready = false;
138
13.1k
                break;
139
13.1k
            }
140
13.2k
        }
141
13.2k
        if (all_ready) {
142
83
            _local_runtime_filter_dependencies.clear();
143
83
            _registration_time = MonotonicMillis();
144
83
        }
145
13.2k
        return all_ready;
146
13.2k
    }
147
1.81M
    return true;
148
1.82M
}
149
150
8
void RuntimeFilterTimerQueue::start() {
151
285k
    while (!_stop) {
152
285k
        std::unique_lock<std::mutex> lk(cv_m);
153
154
291k
        while (_que.empty() && !_stop) {
155
12.4k
            cv.wait_for(lk, std::chrono::seconds(3), [this] { return !_que.empty() || _stop; });
156
6.24k
        }
157
285k
        if (_stop) {
158
3
            break;
159
3
        }
160
285k
        {
161
285k
            std::unique_lock<std::mutex> lc(_que_lock);
162
285k
            std::list<std::shared_ptr<pipeline::RuntimeFilterTimer>> new_que;
163
1.82M
            for (auto& it : _que) {
164
1.82M
                if (it.use_count() == 1) {
165
                    // `use_count == 1` means this runtime filter has been released
166
1.82M
                } else if (it->should_be_check_timeout()) {
167
1.81M
                    if (it->force_wait_timeout() || it->_parent->is_blocked_by()) {
168
                        // This means runtime filter is not ready, so we call timeout or continue to poll this timer.
169
1.79M
                        int64_t ms_since_registration = MonotonicMillis() - it->registration_time();
170
1.79M
                        if (ms_since_registration > it->wait_time_ms()) {
171
870
                            it->call_timeout();
172
1.79M
                        } else {
173
1.79M
                            new_que.push_back(std::move(it));
174
1.79M
                        }
175
1.79M
                    }
176
1.81M
                } else {
177
13.1k
                    new_que.push_back(std::move(it));
178
13.1k
                }
179
1.82M
            }
180
285k
            new_que.swap(_que);
181
285k
        }
182
285k
        std::this_thread::sleep_for(std::chrono::milliseconds(interval));
183
285k
    }
184
8
    _shutdown = true;
185
8
}
186
187
388k
void LocalExchangeSharedState::sub_running_sink_operators() {
188
388k
    std::unique_lock<std::mutex> lc(le_lock);
189
388k
    if (exchanger->_running_sink_operators.fetch_sub(1) == 1) {
190
129k
        _set_always_ready();
191
129k
    }
192
388k
}
193
194
939k
void LocalExchangeSharedState::sub_running_source_operators() {
195
939k
    std::unique_lock<std::mutex> lc(le_lock);
196
939k
    if (exchanger->_running_source_operators.fetch_sub(1) == 1) {
197
129k
        _set_always_ready();
198
129k
        exchanger->finalize();
199
129k
    }
200
939k
}
201
202
128k
LocalExchangeSharedState::LocalExchangeSharedState(int num_instances) {
203
128k
    source_deps.resize(num_instances, nullptr);
204
128k
    mem_counters.resize(num_instances, nullptr);
205
128k
}
206
207
184
vectorized::MutableColumns AggSharedState::_get_keys_hash_table() {
208
184
    return std::visit(
209
184
            vectorized::Overload {
210
184
                    [&](std::monostate& arg) {
211
0
                        throw doris::Exception(ErrorCode::INTERNAL_ERROR, "uninited hash table");
212
0
                        return vectorized::MutableColumns();
213
0
                    },
214
184
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
184
                        vectorized::MutableColumns key_columns;
216
412
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
228
                            key_columns.emplace_back(
218
228
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
228
                        }
220
184
                        auto& data = *agg_method.hash_table;
221
184
                        bool has_null_key = data.has_null_key_data();
222
184
                        const auto size = data.size() - has_null_key;
223
184
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
184
                        std::vector<KeyType> keys(size);
225
226
184
                        uint32_t num_rows = 0;
227
184
                        auto iter = aggregate_data_container->begin();
228
184
                        {
229
38.2k
                            while (iter != aggregate_data_container->end()) {
230
38.0k
                                keys[num_rows] = iter.get_key<KeyType>();
231
38.0k
                                ++iter;
232
38.0k
                                ++num_rows;
233
38.0k
                            }
234
184
                        }
235
184
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
184
                        if (has_null_key) {
237
4
                            key_columns[0]->insert_data(nullptr, 0);
238
4
                        }
239
184
                        return key_columns;
240
184
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
Line
Count
Source
214
18
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
18
                        vectorized::MutableColumns key_columns;
216
58
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
40
                            key_columns.emplace_back(
218
40
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
40
                        }
220
18
                        auto& data = *agg_method.hash_table;
221
18
                        bool has_null_key = data.has_null_key_data();
222
18
                        const auto size = data.size() - has_null_key;
223
18
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
18
                        std::vector<KeyType> keys(size);
225
226
18
                        uint32_t num_rows = 0;
227
18
                        auto iter = aggregate_data_container->begin();
228
18
                        {
229
20.9k
                            while (iter != aggregate_data_container->end()) {
230
20.8k
                                keys[num_rows] = iter.get_key<KeyType>();
231
20.8k
                                ++iter;
232
20.8k
                                ++num_rows;
233
20.8k
                            }
234
18
                        }
235
18
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
18
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
18
                        return key_columns;
240
18
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_
Line
Count
Source
214
4
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
4
                        vectorized::MutableColumns key_columns;
216
8
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
4
                            key_columns.emplace_back(
218
4
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
4
                        }
220
4
                        auto& data = *agg_method.hash_table;
221
4
                        bool has_null_key = data.has_null_key_data();
222
4
                        const auto size = data.size() - has_null_key;
223
4
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
4
                        std::vector<KeyType> keys(size);
225
226
4
                        uint32_t num_rows = 0;
227
4
                        auto iter = aggregate_data_container->begin();
228
4
                        {
229
12
                            while (iter != aggregate_data_container->end()) {
230
8
                                keys[num_rows] = iter.get_key<KeyType>();
231
8
                                ++iter;
232
8
                                ++num_rows;
233
8
                            }
234
4
                        }
235
4
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
4
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
4
                        return key_columns;
240
4
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_
Line
Count
Source
214
2
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
2
                        vectorized::MutableColumns key_columns;
216
4
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
2
                            key_columns.emplace_back(
218
2
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
2
                        }
220
2
                        auto& data = *agg_method.hash_table;
221
2
                        bool has_null_key = data.has_null_key_data();
222
2
                        const auto size = data.size() - has_null_key;
223
2
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
2
                        std::vector<KeyType> keys(size);
225
226
2
                        uint32_t num_rows = 0;
227
2
                        auto iter = aggregate_data_container->begin();
228
2
                        {
229
12
                            while (iter != aggregate_data_container->end()) {
230
10
                                keys[num_rows] = iter.get_key<KeyType>();
231
10
                                ++iter;
232
10
                                ++num_rows;
233
10
                            }
234
2
                        }
235
2
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
2
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
2
                        return key_columns;
240
2
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISI_EESaISL_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISI_EESaISL_EEOT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISH_EESaISK_EEOT_
Line
Count
Source
214
4
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
4
                        vectorized::MutableColumns key_columns;
216
8
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
4
                            key_columns.emplace_back(
218
4
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
4
                        }
220
4
                        auto& data = *agg_method.hash_table;
221
4
                        bool has_null_key = data.has_null_key_data();
222
4
                        const auto size = data.size() - has_null_key;
223
4
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
4
                        std::vector<KeyType> keys(size);
225
226
4
                        uint32_t num_rows = 0;
227
4
                        auto iter = aggregate_data_container->begin();
228
4
                        {
229
8
                            while (iter != aggregate_data_container->end()) {
230
4
                                keys[num_rows] = iter.get_key<KeyType>();
231
4
                                ++iter;
232
4
                                ++num_rows;
233
4
                            }
234
4
                        }
235
4
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
4
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
4
                        return key_columns;
240
4
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISH_EESaISK_EEOT_
Line
Count
Source
214
6
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
6
                        vectorized::MutableColumns key_columns;
216
12
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
6
                            key_columns.emplace_back(
218
6
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
6
                        }
220
6
                        auto& data = *agg_method.hash_table;
221
6
                        bool has_null_key = data.has_null_key_data();
222
6
                        const auto size = data.size() - has_null_key;
223
6
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
6
                        std::vector<KeyType> keys(size);
225
226
6
                        uint32_t num_rows = 0;
227
6
                        auto iter = aggregate_data_container->begin();
228
6
                        {
229
28
                            while (iter != aggregate_data_container->end()) {
230
22
                                keys[num_rows] = iter.get_key<KeyType>();
231
22
                                ++iter;
232
22
                                ++num_rows;
233
22
                            }
234
6
                        }
235
6
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
6
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
6
                        return key_columns;
240
6
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_
Line
Count
Source
214
2
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
2
                        vectorized::MutableColumns key_columns;
216
4
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
2
                            key_columns.emplace_back(
218
2
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
2
                        }
220
2
                        auto& data = *agg_method.hash_table;
221
2
                        bool has_null_key = data.has_null_key_data();
222
2
                        const auto size = data.size() - has_null_key;
223
2
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
2
                        std::vector<KeyType> keys(size);
225
226
2
                        uint32_t num_rows = 0;
227
2
                        auto iter = aggregate_data_container->begin();
228
2
                        {
229
17
                            while (iter != aggregate_data_container->end()) {
230
15
                                keys[num_rows] = iter.get_key<KeyType>();
231
15
                                ++iter;
232
15
                                ++num_rows;
233
15
                            }
234
2
                        }
235
2
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
2
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
2
                        return key_columns;
240
2
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_
Line
Count
Source
214
2
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
2
                        vectorized::MutableColumns key_columns;
216
4
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
2
                            key_columns.emplace_back(
218
2
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
2
                        }
220
2
                        auto& data = *agg_method.hash_table;
221
2
                        bool has_null_key = data.has_null_key_data();
222
2
                        const auto size = data.size() - has_null_key;
223
2
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
2
                        std::vector<KeyType> keys(size);
225
226
2
                        uint32_t num_rows = 0;
227
2
                        auto iter = aggregate_data_container->begin();
228
2
                        {
229
2.31k
                            while (iter != aggregate_data_container->end()) {
230
2.30k
                                keys[num_rows] = iter.get_key<KeyType>();
231
2.30k
                                ++iter;
232
2.30k
                                ++num_rows;
233
2.30k
                            }
234
2
                        }
235
2
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
2
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
2
                        return key_columns;
240
2
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_
Line
Count
Source
214
2
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
2
                        vectorized::MutableColumns key_columns;
216
4
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
2
                            key_columns.emplace_back(
218
2
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
2
                        }
220
2
                        auto& data = *agg_method.hash_table;
221
2
                        bool has_null_key = data.has_null_key_data();
222
2
                        const auto size = data.size() - has_null_key;
223
2
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
2
                        std::vector<KeyType> keys(size);
225
226
2
                        uint32_t num_rows = 0;
227
2
                        auto iter = aggregate_data_container->begin();
228
2
                        {
229
2.04k
                            while (iter != aggregate_data_container->end()) {
230
2.03k
                                keys[num_rows] = iter.get_key<KeyType>();
231
2.03k
                                ++iter;
232
2.03k
                                ++num_rows;
233
2.03k
                            }
234
2
                        }
235
2
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
2
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
2
                        return key_columns;
240
2
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISL_EESaISO_EEOT_
Line
Count
Source
214
62
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
62
                        vectorized::MutableColumns key_columns;
216
124
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
62
                            key_columns.emplace_back(
218
62
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
62
                        }
220
62
                        auto& data = *agg_method.hash_table;
221
62
                        bool has_null_key = data.has_null_key_data();
222
62
                        const auto size = data.size() - has_null_key;
223
62
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
62
                        std::vector<KeyType> keys(size);
225
226
62
                        uint32_t num_rows = 0;
227
62
                        auto iter = aggregate_data_container->begin();
228
62
                        {
229
5.29k
                            while (iter != aggregate_data_container->end()) {
230
5.23k
                                keys[num_rows] = iter.get_key<KeyType>();
231
5.23k
                                ++iter;
232
5.23k
                                ++num_rows;
233
5.23k
                            }
234
62
                        }
235
62
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
62
                        if (has_null_key) {
237
3
                            key_columns[0]->insert_data(nullptr, 0);
238
3
                        }
239
62
                        return key_columns;
240
62
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISL_EESaISO_EEOT_
Line
Count
Source
214
36
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
36
                        vectorized::MutableColumns key_columns;
216
72
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
36
                            key_columns.emplace_back(
218
36
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
36
                        }
220
36
                        auto& data = *agg_method.hash_table;
221
36
                        bool has_null_key = data.has_null_key_data();
222
36
                        const auto size = data.size() - has_null_key;
223
36
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
36
                        std::vector<KeyType> keys(size);
225
226
36
                        uint32_t num_rows = 0;
227
36
                        auto iter = aggregate_data_container->begin();
228
36
                        {
229
3.81k
                            while (iter != aggregate_data_container->end()) {
230
3.78k
                                keys[num_rows] = iter.get_key<KeyType>();
231
3.78k
                                ++iter;
232
3.78k
                                ++num_rows;
233
3.78k
                            }
234
36
                        }
235
36
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
36
                        if (has_null_key) {
237
1
                            key_columns[0]->insert_data(nullptr, 0);
238
1
                        }
239
36
                        return key_columns;
240
36
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISM_EESaISP_EEOT_
Line
Count
Source
214
2
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
2
                        vectorized::MutableColumns key_columns;
216
4
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
2
                            key_columns.emplace_back(
218
2
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
2
                        }
220
2
                        auto& data = *agg_method.hash_table;
221
2
                        bool has_null_key = data.has_null_key_data();
222
2
                        const auto size = data.size() - has_null_key;
223
2
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
2
                        std::vector<KeyType> keys(size);
225
226
2
                        uint32_t num_rows = 0;
227
2
                        auto iter = aggregate_data_container->begin();
228
2
                        {
229
12
                            while (iter != aggregate_data_container->end()) {
230
10
                                keys[num_rows] = iter.get_key<KeyType>();
231
10
                                ++iter;
232
10
                                ++num_rows;
233
10
                            }
234
2
                        }
235
2
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
2
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
2
                        return key_columns;
240
2
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISM_EESaISP_EEOT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISK_EESaISN_EEOT_
Line
Count
Source
214
32
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
32
                        vectorized::MutableColumns key_columns;
216
64
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
32
                            key_columns.emplace_back(
218
32
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
32
                        }
220
32
                        auto& data = *agg_method.hash_table;
221
32
                        bool has_null_key = data.has_null_key_data();
222
32
                        const auto size = data.size() - has_null_key;
223
32
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
32
                        std::vector<KeyType> keys(size);
225
226
32
                        uint32_t num_rows = 0;
227
32
                        auto iter = aggregate_data_container->begin();
228
32
                        {
229
1.48k
                            while (iter != aggregate_data_container->end()) {
230
1.45k
                                keys[num_rows] = iter.get_key<KeyType>();
231
1.45k
                                ++iter;
232
1.45k
                                ++num_rows;
233
1.45k
                            }
234
32
                        }
235
32
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
32
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
32
                        return key_columns;
240
32
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_6UInt72EPc9HashCRC32IS7_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_6UInt96EPc9HashCRC32IS7_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt104EPc9HashCRC32IS7_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISI_EESaISL_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISI_EESaISL_EEOT_
Line
Count
Source
214
12
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
12
                        vectorized::MutableColumns key_columns;
216
46
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
34
                            key_columns.emplace_back(
218
34
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
34
                        }
220
12
                        auto& data = *agg_method.hash_table;
221
12
                        bool has_null_key = data.has_null_key_data();
222
12
                        const auto size = data.size() - has_null_key;
223
12
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
12
                        std::vector<KeyType> keys(size);
225
226
12
                        uint32_t num_rows = 0;
227
12
                        auto iter = aggregate_data_container->begin();
228
12
                        {
229
2.26k
                            while (iter != aggregate_data_container->end()) {
230
2.25k
                                keys[num_rows] = iter.get_key<KeyType>();
231
2.25k
                                ++iter;
232
2.25k
                                ++num_rows;
233
2.25k
                            }
234
12
                        }
235
12
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
12
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
12
                        return key_columns;
240
12
                    }},
241
184
            agg_data->method_variant);
242
184
}
243
244
184
void AggSharedState::build_limit_heap(size_t hash_table_size) {
245
184
    limit_columns = _get_keys_hash_table();
246
38.1k
    for (size_t i = 0; i < hash_table_size; ++i) {
247
37.9k
        limit_heap.emplace(i, limit_columns, order_directions, null_directions);
248
37.9k
    }
249
37.0k
    while (hash_table_size > limit) {
250
36.8k
        limit_heap.pop();
251
36.8k
        hash_table_size--;
252
36.8k
    }
253
184
    limit_columns_min = limit_heap.top()._row_id;
254
184
}
255
256
bool AggSharedState::do_limit_filter(vectorized::Block* block, size_t num_rows,
257
416
                                     const std::vector<int>* key_locs) {
258
416
    if (num_rows) {
259
416
        cmp_res.resize(num_rows);
260
416
        need_computes.resize(num_rows);
261
416
        memset(need_computes.data(), 0, need_computes.size());
262
416
        memset(cmp_res.data(), 0, cmp_res.size());
263
264
416
        const auto key_size = null_directions.size();
265
1.10k
        for (int i = 0; i < key_size; i++) {
266
684
            block->get_by_position(key_locs ? key_locs->operator[](i) : i)
267
684
                    .column->compare_internal(limit_columns_min, *limit_columns[i],
268
684
                                              null_directions[i], order_directions[i], cmp_res,
269
684
                                              need_computes.data());
270
684
        }
271
272
416
        auto set_computes_arr = [](auto* __restrict res, auto* __restrict computes, size_t rows) {
273
867k
            for (size_t i = 0; i < rows; ++i) {
274
867k
                computes[i] = computes[i] == res[i];
275
867k
            }
276
416
        };
277
416
        set_computes_arr(cmp_res.data(), need_computes.data(), num_rows);
278
279
416
        return std::find(need_computes.begin(), need_computes.end(), 0) != need_computes.end();
280
416
    }
281
282
0
    return false;
283
416
}
284
285
2.84k
Status AggSharedState::reset_hash_table() {
286
2.84k
    return std::visit(
287
2.84k
            vectorized::Overload {
288
2.84k
                    [&](std::monostate& arg) -> Status {
289
0
                        return Status::InternalError("Uninited hash table");
290
0
                    },
291
2.84k
                    [&](auto& agg_method) {
292
2.84k
                        auto& hash_table = *agg_method.hash_table;
293
2.84k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
2.84k
                        agg_method.arena.clear();
296
2.84k
                        agg_method.inited_iterator = false;
297
298
1.26M
                        hash_table.for_each_mapped([&](auto& mapped) {
299
1.26M
                            if (mapped) {
300
1.26M
                                _destroy_agg_status(mapped);
301
1.26M
                                mapped = nullptr;
302
1.26M
                            }
303
1.26M
                        });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
298
264
                        hash_table.for_each_mapped([&](auto& mapped) {
299
264
                            if (mapped) {
300
264
                                _destroy_agg_status(mapped);
301
264
                                mapped = nullptr;
302
264
                            }
303
264
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
298
618
                        hash_table.for_each_mapped([&](auto& mapped) {
299
618
                            if (mapped) {
300
618
                                _destroy_agg_status(mapped);
301
618
                                mapped = nullptr;
302
618
                            }
303
618
                        });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
298
488
                        hash_table.for_each_mapped([&](auto& mapped) {
299
488
                            if (mapped) {
300
488
                                _destroy_agg_status(mapped);
301
488
                                mapped = nullptr;
302
488
                            }
303
488
                        });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEDaRT_ENKUlSE_E_clIS7_EEDaSE_
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_
Line
Count
Source
298
282
                        hash_table.for_each_mapped([&](auto& mapped) {
299
282
                            if (mapped) {
300
282
                                _destroy_agg_status(mapped);
301
282
                                mapped = nullptr;
302
282
                            }
303
282
                        });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEDaRT_ENKUlSF_E_clIS7_EEDaSF_
Line
Count
Source
298
1.04M
                        hash_table.for_each_mapped([&](auto& mapped) {
299
1.04M
                            if (mapped) {
300
1.04M
                                _destroy_agg_status(mapped);
301
1.04M
                                mapped = nullptr;
302
1.04M
                            }
303
1.04M
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEDaRT_ENKUlSF_E_clIS7_EEDaSF_
Line
Count
Source
298
964
                        hash_table.for_each_mapped([&](auto& mapped) {
299
964
                            if (mapped) {
300
964
                                _destroy_agg_status(mapped);
301
964
                                mapped = nullptr;
302
964
                            }
303
964
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
298
8
                        hash_table.for_each_mapped([&](auto& mapped) {
299
8
                            if (mapped) {
300
8
                                _destroy_agg_status(mapped);
301
8
                                mapped = nullptr;
302
8
                            }
303
8
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
298
506
                        hash_table.for_each_mapped([&](auto& mapped) {
299
506
                            if (mapped) {
300
506
                                _destroy_agg_status(mapped);
301
506
                                mapped = nullptr;
302
506
                            }
303
506
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
298
688
                        hash_table.for_each_mapped([&](auto& mapped) {
299
688
                            if (mapped) {
300
688
                                _destroy_agg_status(mapped);
301
688
                                mapped = nullptr;
302
688
                            }
303
688
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
298
954
                        hash_table.for_each_mapped([&](auto& mapped) {
299
954
                            if (mapped) {
300
954
                                _destroy_agg_status(mapped);
301
954
                                mapped = nullptr;
302
954
                            }
303
954
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_ENKUlSJ_E_clIS9_EEDaSJ_
Line
Count
Source
298
214k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
214k
                            if (mapped) {
300
214k
                                _destroy_agg_status(mapped);
301
214k
                                mapped = nullptr;
302
214k
                            }
303
214k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_ENKUlSJ_E_clIS9_EEDaSJ_
Line
Count
Source
298
1.16k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
1.16k
                            if (mapped) {
300
1.16k
                                _destroy_agg_status(mapped);
301
1.16k
                                mapped = nullptr;
302
1.16k
                            }
303
1.16k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ENKUlSK_E_clISC_EEDaSK_
Line
Count
Source
298
626
                        hash_table.for_each_mapped([&](auto& mapped) {
299
626
                            if (mapped) {
300
626
                                _destroy_agg_status(mapped);
301
626
                                mapped = nullptr;
302
626
                            }
303
626
                        });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ENKUlSK_E_clISC_EEDaSK_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEEEEEDaRT_ENKUlSI_E_clIS9_EEDaSI_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_6UInt72EPc9HashCRC32IS7_EEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_6UInt96EPc9HashCRC32IS7_EEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt104EPc9HashCRC32IS7_EEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_
304
305
2.84k
                        if (hash_table.has_null_key_data()) {
306
0
                            _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                vectorized::AggregateDataPtr>());
308
0
                        }
309
310
2.84k
                        aggregate_data_container.reset(new AggregateDataContainer(
311
2.84k
                                sizeof(typename HashTableType::key_type),
312
2.84k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
2.84k
                                 align_aggregate_states) *
314
2.84k
                                        align_aggregate_states));
315
2.84k
                        agg_method.hash_table.reset(new HashTableType());
316
2.84k
                        return Status::OK();
317
2.84k
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEDaRT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEDaRT_
Line
Count
Source
291
96
                    [&](auto& agg_method) {
292
96
                        auto& hash_table = *agg_method.hash_table;
293
96
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
96
                        agg_method.arena.clear();
296
96
                        agg_method.inited_iterator = false;
297
298
96
                        hash_table.for_each_mapped([&](auto& mapped) {
299
96
                            if (mapped) {
300
96
                                _destroy_agg_status(mapped);
301
96
                                mapped = nullptr;
302
96
                            }
303
96
                        });
304
305
96
                        if (hash_table.has_null_key_data()) {
306
0
                            _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                vectorized::AggregateDataPtr>());
308
0
                        }
309
310
96
                        aggregate_data_container.reset(new AggregateDataContainer(
311
96
                                sizeof(typename HashTableType::key_type),
312
96
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
96
                                 align_aggregate_states) *
314
96
                                        align_aggregate_states));
315
96
                        agg_method.hash_table.reset(new HashTableType());
316
96
                        return Status::OK();
317
96
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_
Line
Count
Source
291
154
                    [&](auto& agg_method) {
292
154
                        auto& hash_table = *agg_method.hash_table;
293
154
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
154
                        agg_method.arena.clear();
296
154
                        agg_method.inited_iterator = false;
297
298
154
                        hash_table.for_each_mapped([&](auto& mapped) {
299
154
                            if (mapped) {
300
154
                                _destroy_agg_status(mapped);
301
154
                                mapped = nullptr;
302
154
                            }
303
154
                        });
304
305
154
                        if (hash_table.has_null_key_data()) {
306
0
                            _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                vectorized::AggregateDataPtr>());
308
0
                        }
309
310
154
                        aggregate_data_container.reset(new AggregateDataContainer(
311
154
                                sizeof(typename HashTableType::key_type),
312
154
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
154
                                 align_aggregate_states) *
314
154
                                        align_aggregate_states));
315
154
                        agg_method.hash_table.reset(new HashTableType());
316
154
                        return Status::OK();
317
154
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEDaRT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_
Line
Count
Source
291
136
                    [&](auto& agg_method) {
292
136
                        auto& hash_table = *agg_method.hash_table;
293
136
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
136
                        agg_method.arena.clear();
296
136
                        agg_method.inited_iterator = false;
297
298
136
                        hash_table.for_each_mapped([&](auto& mapped) {
299
136
                            if (mapped) {
300
136
                                _destroy_agg_status(mapped);
301
136
                                mapped = nullptr;
302
136
                            }
303
136
                        });
304
305
136
                        if (hash_table.has_null_key_data()) {
306
0
                            _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                vectorized::AggregateDataPtr>());
308
0
                        }
309
310
136
                        aggregate_data_container.reset(new AggregateDataContainer(
311
136
                                sizeof(typename HashTableType::key_type),
312
136
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
136
                                 align_aggregate_states) *
314
136
                                        align_aggregate_states));
315
136
                        agg_method.hash_table.reset(new HashTableType());
316
136
                        return Status::OK();
317
136
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEDaRT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_
Line
Count
Source
291
78
                    [&](auto& agg_method) {
292
78
                        auto& hash_table = *agg_method.hash_table;
293
78
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
78
                        agg_method.arena.clear();
296
78
                        agg_method.inited_iterator = false;
297
298
78
                        hash_table.for_each_mapped([&](auto& mapped) {
299
78
                            if (mapped) {
300
78
                                _destroy_agg_status(mapped);
301
78
                                mapped = nullptr;
302
78
                            }
303
78
                        });
304
305
78
                        if (hash_table.has_null_key_data()) {
306
0
                            _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                vectorized::AggregateDataPtr>());
308
0
                        }
309
310
78
                        aggregate_data_container.reset(new AggregateDataContainer(
311
78
                                sizeof(typename HashTableType::key_type),
312
78
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
78
                                 align_aggregate_states) *
314
78
                                        align_aggregate_states));
315
78
                        agg_method.hash_table.reset(new HashTableType());
316
78
                        return Status::OK();
317
78
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEDaRT_
Line
Count
Source
291
91
                    [&](auto& agg_method) {
292
91
                        auto& hash_table = *agg_method.hash_table;
293
91
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
91
                        agg_method.arena.clear();
296
91
                        agg_method.inited_iterator = false;
297
298
91
                        hash_table.for_each_mapped([&](auto& mapped) {
299
91
                            if (mapped) {
300
91
                                _destroy_agg_status(mapped);
301
91
                                mapped = nullptr;
302
91
                            }
303
91
                        });
304
305
91
                        if (hash_table.has_null_key_data()) {
306
0
                            _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                vectorized::AggregateDataPtr>());
308
0
                        }
309
310
91
                        aggregate_data_container.reset(new AggregateDataContainer(
311
91
                                sizeof(typename HashTableType::key_type),
312
91
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
91
                                 align_aggregate_states) *
314
91
                                        align_aggregate_states));
315
91
                        agg_method.hash_table.reset(new HashTableType());
316
91
                        return Status::OK();
317
91
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEDaRT_
Line
Count
Source
291
376
                    [&](auto& agg_method) {
292
376
                        auto& hash_table = *agg_method.hash_table;
293
376
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
376
                        agg_method.arena.clear();
296
376
                        agg_method.inited_iterator = false;
297
298
376
                        hash_table.for_each_mapped([&](auto& mapped) {
299
376
                            if (mapped) {
300
376
                                _destroy_agg_status(mapped);
301
376
                                mapped = nullptr;
302
376
                            }
303
376
                        });
304
305
376
                        if (hash_table.has_null_key_data()) {
306
0
                            _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                vectorized::AggregateDataPtr>());
308
0
                        }
309
310
376
                        aggregate_data_container.reset(new AggregateDataContainer(
311
376
                                sizeof(typename HashTableType::key_type),
312
376
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
376
                                 align_aggregate_states) *
314
376
                                        align_aggregate_states));
315
376
                        agg_method.hash_table.reset(new HashTableType());
316
376
                        return Status::OK();
317
376
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_
Line
Count
Source
291
8
                    [&](auto& agg_method) {
292
8
                        auto& hash_table = *agg_method.hash_table;
293
8
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
8
                        agg_method.arena.clear();
296
8
                        agg_method.inited_iterator = false;
297
298
8
                        hash_table.for_each_mapped([&](auto& mapped) {
299
8
                            if (mapped) {
300
8
                                _destroy_agg_status(mapped);
301
8
                                mapped = nullptr;
302
8
                            }
303
8
                        });
304
305
8
                        if (hash_table.has_null_key_data()) {
306
0
                            _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                vectorized::AggregateDataPtr>());
308
0
                        }
309
310
8
                        aggregate_data_container.reset(new AggregateDataContainer(
311
8
                                sizeof(typename HashTableType::key_type),
312
8
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
8
                                 align_aggregate_states) *
314
8
                                        align_aggregate_states));
315
8
                        agg_method.hash_table.reset(new HashTableType());
316
8
                        return Status::OK();
317
8
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_
Line
Count
Source
291
164
                    [&](auto& agg_method) {
292
164
                        auto& hash_table = *agg_method.hash_table;
293
164
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
164
                        agg_method.arena.clear();
296
164
                        agg_method.inited_iterator = false;
297
298
164
                        hash_table.for_each_mapped([&](auto& mapped) {
299
164
                            if (mapped) {
300
164
                                _destroy_agg_status(mapped);
301
164
                                mapped = nullptr;
302
164
                            }
303
164
                        });
304
305
164
                        if (hash_table.has_null_key_data()) {
306
0
                            _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                vectorized::AggregateDataPtr>());
308
0
                        }
309
310
164
                        aggregate_data_container.reset(new AggregateDataContainer(
311
164
                                sizeof(typename HashTableType::key_type),
312
164
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
164
                                 align_aggregate_states) *
314
164
                                        align_aggregate_states));
315
164
                        agg_method.hash_table.reset(new HashTableType());
316
164
                        return Status::OK();
317
164
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_
Line
Count
Source
291
206
                    [&](auto& agg_method) {
292
206
                        auto& hash_table = *agg_method.hash_table;
293
206
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
206
                        agg_method.arena.clear();
296
206
                        agg_method.inited_iterator = false;
297
298
206
                        hash_table.for_each_mapped([&](auto& mapped) {
299
206
                            if (mapped) {
300
206
                                _destroy_agg_status(mapped);
301
206
                                mapped = nullptr;
302
206
                            }
303
206
                        });
304
305
206
                        if (hash_table.has_null_key_data()) {
306
0
                            _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                vectorized::AggregateDataPtr>());
308
0
                        }
309
310
206
                        aggregate_data_container.reset(new AggregateDataContainer(
311
206
                                sizeof(typename HashTableType::key_type),
312
206
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
206
                                 align_aggregate_states) *
314
206
                                        align_aggregate_states));
315
206
                        agg_method.hash_table.reset(new HashTableType());
316
206
                        return Status::OK();
317
206
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_
Line
Count
Source
291
274
                    [&](auto& agg_method) {
292
274
                        auto& hash_table = *agg_method.hash_table;
293
274
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
274
                        agg_method.arena.clear();
296
274
                        agg_method.inited_iterator = false;
297
298
274
                        hash_table.for_each_mapped([&](auto& mapped) {
299
274
                            if (mapped) {
300
274
                                _destroy_agg_status(mapped);
301
274
                                mapped = nullptr;
302
274
                            }
303
274
                        });
304
305
274
                        if (hash_table.has_null_key_data()) {
306
0
                            _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                vectorized::AggregateDataPtr>());
308
0
                        }
309
310
274
                        aggregate_data_container.reset(new AggregateDataContainer(
311
274
                                sizeof(typename HashTableType::key_type),
312
274
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
274
                                 align_aggregate_states) *
314
274
                                        align_aggregate_states));
315
274
                        agg_method.hash_table.reset(new HashTableType());
316
274
                        return Status::OK();
317
274
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_
Line
Count
Source
291
554
                    [&](auto& agg_method) {
292
554
                        auto& hash_table = *agg_method.hash_table;
293
554
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
554
                        agg_method.arena.clear();
296
554
                        agg_method.inited_iterator = false;
297
298
554
                        hash_table.for_each_mapped([&](auto& mapped) {
299
554
                            if (mapped) {
300
554
                                _destroy_agg_status(mapped);
301
554
                                mapped = nullptr;
302
554
                            }
303
554
                        });
304
305
554
                        if (hash_table.has_null_key_data()) {
306
0
                            _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                vectorized::AggregateDataPtr>());
308
0
                        }
309
310
554
                        aggregate_data_container.reset(new AggregateDataContainer(
311
554
                                sizeof(typename HashTableType::key_type),
312
554
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
554
                                 align_aggregate_states) *
314
554
                                        align_aggregate_states));
315
554
                        agg_method.hash_table.reset(new HashTableType());
316
554
                        return Status::OK();
317
554
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_
Line
Count
Source
291
538
                    [&](auto& agg_method) {
292
538
                        auto& hash_table = *agg_method.hash_table;
293
538
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
538
                        agg_method.arena.clear();
296
538
                        agg_method.inited_iterator = false;
297
298
538
                        hash_table.for_each_mapped([&](auto& mapped) {
299
538
                            if (mapped) {
300
538
                                _destroy_agg_status(mapped);
301
538
                                mapped = nullptr;
302
538
                            }
303
538
                        });
304
305
538
                        if (hash_table.has_null_key_data()) {
306
0
                            _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                vectorized::AggregateDataPtr>());
308
0
                        }
309
310
538
                        aggregate_data_container.reset(new AggregateDataContainer(
311
538
                                sizeof(typename HashTableType::key_type),
312
538
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
538
                                 align_aggregate_states) *
314
538
                                        align_aggregate_states));
315
538
                        agg_method.hash_table.reset(new HashTableType());
316
538
                        return Status::OK();
317
538
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_
Line
Count
Source
291
170
                    [&](auto& agg_method) {
292
170
                        auto& hash_table = *agg_method.hash_table;
293
170
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
170
                        agg_method.arena.clear();
296
170
                        agg_method.inited_iterator = false;
297
298
170
                        hash_table.for_each_mapped([&](auto& mapped) {
299
170
                            if (mapped) {
300
170
                                _destroy_agg_status(mapped);
301
170
                                mapped = nullptr;
302
170
                            }
303
170
                        });
304
305
170
                        if (hash_table.has_null_key_data()) {
306
0
                            _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                vectorized::AggregateDataPtr>());
308
0
                        }
309
310
170
                        aggregate_data_container.reset(new AggregateDataContainer(
311
170
                                sizeof(typename HashTableType::key_type),
312
170
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
170
                                 align_aggregate_states) *
314
170
                                        align_aggregate_states));
315
170
                        agg_method.hash_table.reset(new HashTableType());
316
170
                        return Status::OK();
317
170
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_6UInt72EPc9HashCRC32IS7_EEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_6UInt96EPc9HashCRC32IS7_EEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt104EPc9HashCRC32IS7_EEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEEDaRT_
318
2.84k
            agg_data->method_variant);
319
2.84k
}
320
321
270
void PartitionedAggSharedState::init_spill_params(size_t spill_partition_count) {
322
270
    partition_count = spill_partition_count;
323
270
    max_partition_index = partition_count - 1;
324
325
8.91k
    for (int i = 0; i < partition_count; ++i) {
326
8.64k
        spill_partitions.emplace_back(std::make_shared<AggSpillPartition>());
327
8.64k
    }
328
270
}
329
330
258
void PartitionedAggSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {
331
8.25k
    for (auto& partition : spill_partitions) {
332
8.25k
        if (partition->spilling_stream_) {
333
0
            partition->spilling_stream_->update_shared_profiles(source_profile);
334
0
        }
335
8.25k
        for (auto& stream : partition->spill_streams_) {
336
1.83k
            if (stream) {
337
1.83k
                stream->update_shared_profiles(source_profile);
338
1.83k
            }
339
1.83k
        }
340
8.25k
    }
341
258
}
342
343
Status AggSpillPartition::get_spill_stream(RuntimeState* state, int node_id,
344
                                           RuntimeProfile* profile,
345
7.41k
                                           vectorized::SpillStreamSPtr& spill_stream) {
346
7.41k
    if (spilling_stream_) {
347
5.49k
        spill_stream = spilling_stream_;
348
5.49k
        return Status::OK();
349
5.49k
    }
350
1.91k
    RETURN_IF_ERROR(ExecEnv::GetInstance()->spill_stream_mgr()->register_spill_stream(
351
1.91k
            state, spilling_stream_, print_id(state->query_id()), "agg", node_id,
352
1.91k
            std::numeric_limits<int32_t>::max(), std::numeric_limits<size_t>::max(), profile));
353
1.91k
    spill_streams_.emplace_back(spilling_stream_);
354
1.91k
    spill_stream = spilling_stream_;
355
1.91k
    return Status::OK();
356
1.91k
}
357
5.90k
void AggSpillPartition::close() {
358
5.90k
    if (spilling_stream_) {
359
1
        spilling_stream_.reset();
360
1
    }
361
5.90k
    for (auto& stream : spill_streams_) {
362
5
        (void)ExecEnv::GetInstance()->spill_stream_mgr()->delete_spill_stream(stream);
363
5
    }
364
5.90k
    spill_streams_.clear();
365
5.90k
}
366
367
290
void PartitionedAggSharedState::close() {
368
    // need to use CAS instead of only `if (!is_closed)` statement,
369
    // to avoid concurrent entry of close() both pass the if statement
370
290
    bool false_close = false;
371
290
    if (!is_closed.compare_exchange_strong(false_close, true)) {
372
27
        return;
373
27
    }
374
290
    DCHECK(!false_close && is_closed);
375
5.90k
    for (auto partition : spill_partitions) {
376
5.90k
        partition->close();
377
5.90k
    }
378
263
    spill_partitions.clear();
379
263
}
380
381
17
void SpillSortSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {
382
28
    for (auto& stream : sorted_streams) {
383
28
        if (stream) {
384
28
            stream->update_shared_profiles(source_profile);
385
28
        }
386
28
    }
387
17
}
388
389
19
void SpillSortSharedState::close() {
390
    // need to use CAS instead of only `if (!is_closed)` statement,
391
    // to avoid concurrent entry of close() both pass the if statement
392
19
    bool false_close = false;
393
19
    if (!is_closed.compare_exchange_strong(false_close, true)) {
394
1
        return;
395
1
    }
396
19
    DCHECK(!false_close && is_closed);
397
18
    for (auto& stream : sorted_streams) {
398
1
        (void)ExecEnv::GetInstance()->spill_stream_mgr()->delete_spill_stream(stream);
399
1
    }
400
18
    sorted_streams.clear();
401
18
}
402
403
MultiCastSharedState::MultiCastSharedState(ObjectPool* pool, int cast_sender_count, int node_id)
404
2.86k
        : multi_cast_data_streamer(std::make_unique<pipeline::MultiCastDataStreamer>(
405
2.86k
                  pool, cast_sender_count, node_id)) {}
406
407
0
void MultiCastSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {}
408
409
143k
int AggSharedState::get_slot_column_id(const vectorized::AggFnEvaluator* evaluator) {
410
143k
    auto ctxs = evaluator->input_exprs_ctxs();
411
18.4E
    CHECK(ctxs.size() == 1 && ctxs[0]->root()->is_slot_ref())
412
18.4E
            << "input_exprs_ctxs is invalid, input_exprs_ctx[0]="
413
18.4E
            << ctxs[0]->root()->debug_string();
414
143k
    return ((vectorized::VSlotRef*)ctxs[0]->root().get())->column_id();
415
143k
}
416
417
6.94M
void AggSharedState::_destroy_agg_status(vectorized::AggregateDataPtr data) {
418
14.5M
    for (int i = 0; i < aggregate_evaluators.size(); ++i) {
419
7.63M
        aggregate_evaluators[i]->function()->destroy(data + offsets_of_aggregate_states[i]);
420
7.63M
    }
421
6.94M
}
422
423
129k
LocalExchangeSharedState::~LocalExchangeSharedState() = default;
424
425
12.6k
Status SetSharedState::update_build_not_ignore_null(const vectorized::VExprContextSPtrs& ctxs) {
426
12.6k
    if (ctxs.size() > build_not_ignore_null.size()) {
427
0
        return Status::InternalError("build_not_ignore_null not initialized");
428
0
    }
429
430
99.4k
    for (int i = 0; i < ctxs.size(); ++i) {
431
86.8k
        build_not_ignore_null[i] = build_not_ignore_null[i] || ctxs[i]->root()->is_nullable();
432
86.8k
    }
433
434
12.6k
    return Status::OK();
435
12.6k
}
436
437
20.2k
size_t SetSharedState::get_hash_table_size() const {
438
20.2k
    size_t hash_table_size = 0;
439
20.2k
    std::visit(
440
20.3k
            [&](auto&& arg) {
441
20.3k
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
20.3k
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
20.3k
                    hash_table_size = arg.hash_table->size();
444
20.3k
                }
445
20.3k
            },
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRSt9monostateEEDaOT_
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS7_vEEEEEEDaOT_
Line
Count
Source
440
17.3k
            [&](auto&& arg) {
441
17.3k
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
17.3k
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
17.3k
                    hash_table_size = arg.hash_table->size();
444
17.3k
                }
445
17.3k
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized19MethodStringNoCacheI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS7_vEEEEEEDaOT_
Line
Count
Source
440
194
            [&](auto&& arg) {
441
194
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
194
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
194
                    hash_table_size = arg.hash_table->size();
444
194
                }
445
194
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS9_vEEEEEEEEEEDaOT_
Line
Count
Source
440
82
            [&](auto&& arg) {
441
82
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
82
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
82
                    hash_table_size = arg.hash_table->size();
444
82
                }
445
82
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhNS_14RowRefWithFlagE9HashCRC32IhEEEEEEEEEEDaOT_
Line
Count
Source
440
81
            [&](auto&& arg) {
441
81
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
81
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
81
                    hash_table_size = arg.hash_table->size();
444
81
                }
445
81
            },
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItNS_14RowRefWithFlagE9HashCRC32ItEEEEEEEEEEDaOT_
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjNS_14RowRefWithFlagE9HashCRC32IjEEEEEEEEEEDaOT_
Line
Count
Source
440
1.68k
            [&](auto&& arg) {
441
1.68k
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
1.68k
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
1.68k
                    hash_table_size = arg.hash_table->size();
444
1.68k
                }
445
1.68k
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEEEEEDaOT_
Line
Count
Source
440
364
            [&](auto&& arg) {
441
364
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
364
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
364
                    hash_table_size = arg.hash_table->size();
444
364
                }
445
364
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_NS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEEEEEDaOT_
Line
Count
Source
440
192
            [&](auto&& arg) {
441
192
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
192
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
192
                    hash_table_size = arg.hash_table->size();
444
192
                }
445
192
            },
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_NS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEEEEEDaOT_
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIh9PHHashMapIhNS_14RowRefWithFlagE9HashCRC32IhEEEEEEDaOT_
Line
Count
Source
440
96
            [&](auto&& arg) {
441
96
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
96
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
96
                    hash_table_size = arg.hash_table->size();
444
96
                }
445
96
            },
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIt9PHHashMapItNS_14RowRefWithFlagE9HashCRC32ItEEEEEEDaOT_
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIj9PHHashMapIjNS_14RowRefWithFlagE9HashCRC32IjEEEEEEDaOT_
Line
Count
Source
440
30
            [&](auto&& arg) {
441
30
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
30
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
30
                    hash_table_size = arg.hash_table->size();
444
30
                }
445
30
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEDaOT_
Line
Count
Source
440
28
            [&](auto&& arg) {
441
28
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
28
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
28
                    hash_table_size = arg.hash_table->size();
444
28
                }
445
28
            },
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_NS_14RowRefWithFlagE9HashCRC32IS8_EEEEEEDaOT_
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_NS_14RowRefWithFlagE9HashCRC32IS8_EEEEEEDaOT_
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEDaOT_
Line
Count
Source
440
129
            [&](auto&& arg) {
441
129
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
129
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
129
                    hash_table_size = arg.hash_table->size();
444
129
                }
445
129
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_6UInt72ENS_14RowRefWithFlagE9HashCRC32IS7_EEEEEEDaOT_
Line
Count
Source
440
51
            [&](auto&& arg) {
441
51
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
51
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
51
                    hash_table_size = arg.hash_table->size();
444
51
                }
445
51
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_6UInt96ENS_14RowRefWithFlagE9HashCRC32IS7_EEEEEEDaOT_
Line
Count
Source
440
6
            [&](auto&& arg) {
441
6
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
6
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
6
                    hash_table_size = arg.hash_table->size();
444
6
                }
445
6
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt104ENS_14RowRefWithFlagE9HashCRC32IS7_EEEEEEDaOT_
Line
Count
Source
440
9
            [&](auto&& arg) {
441
9
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
9
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
9
                    hash_table_size = arg.hash_table->size();
444
9
                }
445
9
            },
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEENS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEDaOT_
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEENS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEDaOT_
Line
Count
Source
440
4
            [&](auto&& arg) {
441
4
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
4
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
4
                    hash_table_size = arg.hash_table->size();
444
4
                }
445
4
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136ENS_14RowRefWithFlagE9HashCRC32IS7_EEEEEEDaOT_
Line
Count
Source
440
50
            [&](auto&& arg) {
441
50
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
50
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
50
                    hash_table_size = arg.hash_table->size();
444
50
                }
445
50
            },
446
20.2k
            hash_table_variants->method_variant);
447
20.2k
    return hash_table_size;
448
20.2k
}
449
450
5.19k
Status SetSharedState::hash_table_init() {
451
5.19k
    std::vector<vectorized::DataTypePtr> data_types;
452
40.5k
    for (size_t i = 0; i != child_exprs_lists[0].size(); ++i) {
453
35.3k
        auto& ctx = child_exprs_lists[0][i];
454
35.3k
        auto data_type = ctx->root()->data_type();
455
35.3k
        if (build_not_ignore_null[i]) {
456
35.1k
            data_type = vectorized::make_nullable(data_type);
457
35.1k
        }
458
35.3k
        data_types.emplace_back(std::move(data_type));
459
35.3k
    }
460
5.19k
    return init_hash_method<SetDataVariants>(hash_table_variants.get(), data_types, true);
461
5.19k
}
462
463
void AggSharedState::refresh_top_limit(size_t row_id,
464
257
                                       const vectorized::ColumnRawPtrs& key_columns) {
465
786
    for (int j = 0; j < key_columns.size(); ++j) {
466
529
        limit_columns[j]->insert_from(*key_columns[j], row_id);
467
529
    }
468
257
    limit_heap.emplace(limit_columns[0]->size() - 1, limit_columns, order_directions,
469
257
                       null_directions);
470
471
257
    limit_heap.pop();
472
257
    limit_columns_min = limit_heap.top()._row_id;
473
257
}
474
475
} // namespace doris::pipeline