Coverage Report

Created: 2026-02-06 11:38

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
381k
                                                       const std::string& name) {
43
381k
    source_deps.push_back(std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY"));
44
381k
    source_deps.back()->set_shared_state(this);
45
381k
    return source_deps.back().get();
46
381k
}
47
48
void BasicSharedState::create_source_dependencies(int num_sources, int operator_id, int node_id,
49
117k
                                                  const std::string& name) {
50
117k
    source_deps.resize(num_sources, nullptr);
51
774k
    for (auto& source_dep : source_deps) {
52
774k
        source_dep = std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY");
53
774k
        source_dep->set_shared_state(this);
54
774k
    }
55
117k
}
56
57
Dependency* BasicSharedState::create_sink_dependency(int dest_id, int node_id,
58
943k
                                                     const std::string& name) {
59
943k
    sink_deps.push_back(std::make_shared<Dependency>(dest_id, node_id, name + "_DEPENDENCY", true));
60
943k
    sink_deps.back()->set_shared_state(this);
61
943k
    return sink_deps.back().get();
62
943k
}
63
64
4.30M
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
4.30M
    _blocked_task.push_back(task);
69
4.30M
}
70
71
15.3M
void Dependency::set_ready() {
72
15.3M
    if (_ready) {
73
11.3M
        return;
74
11.3M
    }
75
4.01M
    std::vector<std::weak_ptr<PipelineTask>> local_block_task {};
76
4.01M
    {
77
4.01M
        std::unique_lock<std::mutex> lc(_task_lock);
78
4.01M
        if (_ready) {
79
2
            return;
80
2
        }
81
4.01M
        _watcher.stop();
82
4.01M
        _ready = true;
83
4.01M
        local_block_task.swap(_blocked_task);
84
4.01M
    }
85
4.31M
    for (auto task : local_block_task) {
86
4.31M
        if (auto t = task.lock()) {
87
4.31M
            std::unique_lock<std::mutex> lc(_task_lock);
88
4.31M
            THROW_IF_ERROR(t->wake_up(this, lc));
89
4.31M
        }
90
4.31M
    }
91
4.01M
}
92
93
35.7M
Dependency* Dependency::is_blocked_by(std::shared_ptr<PipelineTask> task) {
94
35.7M
    std::unique_lock<std::mutex> lc(_task_lock);
95
35.7M
    auto ready = _ready.load();
96
35.7M
    if (!ready && task) {
97
4.31M
        _add_block_task(task);
98
4.31M
        start_watcher();
99
4.31M
        THROW_IF_ERROR(task->blocked(this, lc));
100
4.31M
    }
101
35.7M
    return ready ? nullptr : this;
102
35.7M
}
103
104
226k
std::string Dependency::debug_string(int indentation_level) {
105
226k
    fmt::memory_buffer debug_string_buffer;
106
226k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, block task = {}, ready={}, _always_ready={}",
107
226k
                   std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(),
108
226k
                   _ready, _always_ready);
109
226k
    return fmt::to_string(debug_string_buffer);
110
226k
}
111
112
0
std::string CountedFinishDependency::debug_string(int indentation_level) {
113
0
    fmt::memory_buffer debug_string_buffer;
114
0
    fmt::format_to(debug_string_buffer,
115
0
                   "{}{}: id={}, block_task={}, ready={}, _always_ready={}, count={}",
116
0
                   std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(),
117
0
                   _ready, _always_ready, _counter);
118
0
    return fmt::to_string(debug_string_buffer);
119
0
}
120
121
412
void RuntimeFilterTimer::call_timeout() {
122
412
    _parent->set_ready();
123
412
}
124
125
16.8k
void RuntimeFilterTimer::call_ready() {
126
16.8k
    _parent->set_ready();
127
16.8k
}
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
2.76M
bool RuntimeFilterTimer::should_be_check_timeout() {
133
2.76M
    if (!_parent->ready() && !_local_runtime_filter_dependencies.empty()) {
134
5.17k
        bool all_ready = true;
135
5.18k
        for (auto& dep : _local_runtime_filter_dependencies) {
136
5.18k
            if (!dep->ready()) {
137
5.14k
                all_ready = false;
138
5.14k
                break;
139
5.14k
            }
140
5.18k
        }
141
5.17k
        if (all_ready) {
142
24
            _local_runtime_filter_dependencies.clear();
143
24
            _registration_time = MonotonicMillis();
144
24
        }
145
5.17k
        return all_ready;
146
5.17k
    }
147
2.75M
    return true;
148
2.76M
}
149
150
8
void RuntimeFilterTimerQueue::start() {
151
152k
    while (!_stop) {
152
152k
        std::unique_lock<std::mutex> lk(cv_m);
153
154
156k
        while (_que.empty() && !_stop) {
155
6.81k
            cv.wait_for(lk, std::chrono::seconds(3), [this] { return !_que.empty() || _stop; });
156
3.41k
        }
157
152k
        if (_stop) {
158
3
            break;
159
3
        }
160
152k
        {
161
152k
            std::unique_lock<std::mutex> lc(_que_lock);
162
152k
            std::list<std::shared_ptr<pipeline::RuntimeFilterTimer>> new_que;
163
2.76M
            for (auto& it : _que) {
164
2.76M
                if (it.use_count() == 1) {
165
                    // `use_count == 1` means this runtime filter has been released
166
2.76M
                } else if (it->should_be_check_timeout()) {
167
2.75M
                    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
2.74M
                        int64_t ms_since_registration = MonotonicMillis() - it->registration_time();
170
2.74M
                        if (ms_since_registration > it->wait_time_ms()) {
171
412
                            it->call_timeout();
172
2.74M
                        } else {
173
2.74M
                            new_que.push_back(std::move(it));
174
2.74M
                        }
175
2.74M
                    }
176
2.75M
                } else {
177
5.14k
                    new_que.push_back(std::move(it));
178
5.14k
                }
179
2.76M
            }
180
152k
            new_que.swap(_que);
181
152k
        }
182
152k
        std::this_thread::sleep_for(std::chrono::milliseconds(interval));
183
152k
    }
184
8
    _shutdown = true;
185
8
}
186
187
341k
void LocalExchangeSharedState::sub_running_sink_operators() {
188
341k
    std::unique_lock<std::mutex> lc(le_lock);
189
341k
    if (exchanger->_running_sink_operators.fetch_sub(1) == 1) {
190
113k
        _set_always_ready();
191
113k
    }
192
341k
}
193
194
758k
void LocalExchangeSharedState::sub_running_source_operators() {
195
758k
    std::unique_lock<std::mutex> lc(le_lock);
196
758k
    if (exchanger->_running_source_operators.fetch_sub(1) == 1) {
197
113k
        _set_always_ready();
198
113k
        exchanger->finalize();
199
113k
    }
200
758k
}
201
202
113k
LocalExchangeSharedState::LocalExchangeSharedState(int num_instances) {
203
113k
    source_deps.resize(num_instances, nullptr);
204
113k
    mem_counters.resize(num_instances, nullptr);
205
113k
}
206
207
150
vectorized::MutableColumns AggSharedState::_get_keys_hash_table() {
208
150
    return std::visit(
209
150
            vectorized::Overload {
210
150
                    [&](std::monostate& arg) {
211
0
                        throw doris::Exception(ErrorCode::INTERNAL_ERROR, "uninited hash table");
212
0
                        return vectorized::MutableColumns();
213
0
                    },
214
150
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
150
                        vectorized::MutableColumns key_columns;
216
495
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
345
                            key_columns.emplace_back(
218
345
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
345
                        }
220
150
                        auto& data = *agg_method.hash_table;
221
150
                        bool has_null_key = data.has_null_key_data();
222
150
                        const auto size = data.size() - has_null_key;
223
150
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
150
                        std::vector<KeyType> keys(size);
225
226
150
                        uint32_t num_rows = 0;
227
150
                        auto iter = aggregate_data_container->begin();
228
150
                        {
229
18.1k
                            while (iter != aggregate_data_container->end()) {
230
17.9k
                                keys[num_rows] = iter.get_key<KeyType>();
231
17.9k
                                ++iter;
232
17.9k
                                ++num_rows;
233
17.9k
                            }
234
150
                        }
235
150
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
150
                        if (has_null_key) {
237
2
                            key_columns[0]->insert_data(nullptr, 0);
238
2
                        }
239
150
                        return key_columns;
240
150
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
Line
Count
Source
214
14
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
14
                        vectorized::MutableColumns key_columns;
216
70
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
56
                            key_columns.emplace_back(
218
56
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
56
                        }
220
14
                        auto& data = *agg_method.hash_table;
221
14
                        bool has_null_key = data.has_null_key_data();
222
14
                        const auto size = data.size() - has_null_key;
223
14
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
14
                        std::vector<KeyType> keys(size);
225
226
14
                        uint32_t num_rows = 0;
227
14
                        auto iter = aggregate_data_container->begin();
228
14
                        {
229
9.94k
                            while (iter != aggregate_data_container->end()) {
230
9.93k
                                keys[num_rows] = iter.get_key<KeyType>();
231
9.93k
                                ++iter;
232
9.93k
                                ++num_rows;
233
9.93k
                            }
234
14
                        }
235
14
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
14
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
14
                        return key_columns;
240
14
                    }},
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_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_
Line
Count
Source
214
3
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
3
                        vectorized::MutableColumns key_columns;
216
6
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
3
                            key_columns.emplace_back(
218
3
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
3
                        }
220
3
                        auto& data = *agg_method.hash_table;
221
3
                        bool has_null_key = data.has_null_key_data();
222
3
                        const auto size = data.size() - has_null_key;
223
3
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
3
                        std::vector<KeyType> keys(size);
225
226
3
                        uint32_t num_rows = 0;
227
3
                        auto iter = aggregate_data_container->begin();
228
3
                        {
229
17
                            while (iter != aggregate_data_container->end()) {
230
14
                                keys[num_rows] = iter.get_key<KeyType>();
231
14
                                ++iter;
232
14
                                ++num_rows;
233
14
                            }
234
3
                        }
235
3
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
3
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
3
                        return key_columns;
240
3
                    }},
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
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
12
                            while (iter != aggregate_data_container->end()) {
230
6
                                keys[num_rows] = iter.get_key<KeyType>();
231
6
                                ++iter;
232
6
                                ++num_rows;
233
6
                            }
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_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
1
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
1
                        vectorized::MutableColumns key_columns;
216
2
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
1
                            key_columns.emplace_back(
218
1
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
1
                        }
220
1
                        auto& data = *agg_method.hash_table;
221
1
                        bool has_null_key = data.has_null_key_data();
222
1
                        const auto size = data.size() - has_null_key;
223
1
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
1
                        std::vector<KeyType> keys(size);
225
226
1
                        uint32_t num_rows = 0;
227
1
                        auto iter = aggregate_data_container->begin();
228
1
                        {
229
4
                            while (iter != aggregate_data_container->end()) {
230
3
                                keys[num_rows] = iter.get_key<KeyType>();
231
3
                                ++iter;
232
3
                                ++num_rows;
233
3
                            }
234
1
                        }
235
1
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
1
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
1
                        return key_columns;
240
1
                    }},
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
7
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
7
                        vectorized::MutableColumns key_columns;
216
14
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
7
                            key_columns.emplace_back(
218
7
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
7
                        }
220
7
                        auto& data = *agg_method.hash_table;
221
7
                        bool has_null_key = data.has_null_key_data();
222
7
                        const auto size = data.size() - has_null_key;
223
7
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
7
                        std::vector<KeyType> keys(size);
225
226
7
                        uint32_t num_rows = 0;
227
7
                        auto iter = aggregate_data_container->begin();
228
7
                        {
229
2.35k
                            while (iter != aggregate_data_container->end()) {
230
2.34k
                                keys[num_rows] = iter.get_key<KeyType>();
231
2.34k
                                ++iter;
232
2.34k
                                ++num_rows;
233
2.34k
                            }
234
7
                        }
235
7
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
7
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
7
                        return key_columns;
240
7
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_
Line
Count
Source
214
7
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
7
                        vectorized::MutableColumns key_columns;
216
14
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
7
                            key_columns.emplace_back(
218
7
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
7
                        }
220
7
                        auto& data = *agg_method.hash_table;
221
7
                        bool has_null_key = data.has_null_key_data();
222
7
                        const auto size = data.size() - has_null_key;
223
7
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
7
                        std::vector<KeyType> keys(size);
225
226
7
                        uint32_t num_rows = 0;
227
7
                        auto iter = aggregate_data_container->begin();
228
7
                        {
229
2.36k
                            while (iter != aggregate_data_container->end()) {
230
2.35k
                                keys[num_rows] = iter.get_key<KeyType>();
231
2.35k
                                ++iter;
232
2.35k
                                ++num_rows;
233
2.35k
                            }
234
7
                        }
235
7
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
7
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
7
                        return key_columns;
240
7
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISL_EESaISO_EEOT_
Line
Count
Source
214
9
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
9
                        vectorized::MutableColumns key_columns;
216
18
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
9
                            key_columns.emplace_back(
218
9
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
9
                        }
220
9
                        auto& data = *agg_method.hash_table;
221
9
                        bool has_null_key = data.has_null_key_data();
222
9
                        const auto size = data.size() - has_null_key;
223
9
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
9
                        std::vector<KeyType> keys(size);
225
226
9
                        uint32_t num_rows = 0;
227
9
                        auto iter = aggregate_data_container->begin();
228
9
                        {
229
31
                            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
9
                        }
235
9
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
9
                        if (has_null_key) {
237
1
                            key_columns[0]->insert_data(nullptr, 0);
238
1
                        }
239
9
                        return key_columns;
240
9
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISL_EESaISO_EEOT_
Line
Count
Source
214
14
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
14
                        vectorized::MutableColumns key_columns;
216
28
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
14
                            key_columns.emplace_back(
218
14
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
14
                        }
220
14
                        auto& data = *agg_method.hash_table;
221
14
                        bool has_null_key = data.has_null_key_data();
222
14
                        const auto size = data.size() - has_null_key;
223
14
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
14
                        std::vector<KeyType> keys(size);
225
226
14
                        uint32_t num_rows = 0;
227
14
                        auto iter = aggregate_data_container->begin();
228
14
                        {
229
921
                            while (iter != aggregate_data_container->end()) {
230
907
                                keys[num_rows] = iter.get_key<KeyType>();
231
907
                                ++iter;
232
907
                                ++num_rows;
233
907
                            }
234
14
                        }
235
14
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
14
                        if (has_null_key) {
237
1
                            key_columns[0]->insert_data(nullptr, 0);
238
1
                        }
239
14
                        return key_columns;
240
14
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISM_EESaISP_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISM_EESaISP_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISK_EESaISN_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_6UInt72EPc9HashCRC32IS7_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
Line
Count
Source
214
1
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
1
                        vectorized::MutableColumns key_columns;
216
3
                        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
1
                        auto& data = *agg_method.hash_table;
221
1
                        bool has_null_key = data.has_null_key_data();
222
1
                        const auto size = data.size() - has_null_key;
223
1
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
1
                        std::vector<KeyType> keys(size);
225
226
1
                        uint32_t num_rows = 0;
227
1
                        auto iter = aggregate_data_container->begin();
228
1
                        {
229
7
                            while (iter != aggregate_data_container->end()) {
230
6
                                keys[num_rows] = iter.get_key<KeyType>();
231
6
                                ++iter;
232
6
                                ++num_rows;
233
6
                            }
234
1
                        }
235
1
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
1
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
1
                        return key_columns;
240
1
                    }},
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
82
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
82
                        vectorized::MutableColumns key_columns;
216
316
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
234
                            key_columns.emplace_back(
218
234
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
234
                        }
220
82
                        auto& data = *agg_method.hash_table;
221
82
                        bool has_null_key = data.has_null_key_data();
222
82
                        const auto size = data.size() - has_null_key;
223
82
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
82
                        std::vector<KeyType> keys(size);
225
226
82
                        uint32_t num_rows = 0;
227
82
                        auto iter = aggregate_data_container->begin();
228
82
                        {
229
2.45k
                            while (iter != aggregate_data_container->end()) {
230
2.37k
                                keys[num_rows] = iter.get_key<KeyType>();
231
2.37k
                                ++iter;
232
2.37k
                                ++num_rows;
233
2.37k
                            }
234
82
                        }
235
82
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
82
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
82
                        return key_columns;
240
82
                    }},
241
150
            agg_data->method_variant);
242
150
}
243
244
150
void AggSharedState::build_limit_heap(size_t hash_table_size) {
245
150
    limit_columns = _get_keys_hash_table();
246
17.6k
    for (size_t i = 0; i < hash_table_size; ++i) {
247
17.5k
        limit_heap.emplace(i, limit_columns, order_directions, null_directions);
248
17.5k
    }
249
17.6k
    while (hash_table_size > limit) {
250
17.4k
        limit_heap.pop();
251
17.4k
        hash_table_size--;
252
17.4k
    }
253
150
    limit_columns_min = limit_heap.top()._row_id;
254
150
}
255
256
bool AggSharedState::do_limit_filter(vectorized::Block* block, size_t num_rows,
257
621
                                     const std::vector<int>* key_locs) {
258
621
    if (num_rows) {
259
621
        cmp_res.resize(num_rows);
260
621
        need_computes.resize(num_rows);
261
621
        memset(need_computes.data(), 0, need_computes.size());
262
621
        memset(cmp_res.data(), 0, cmp_res.size());
263
264
621
        const auto key_size = null_directions.size();
265
2.13k
        for (int i = 0; i < key_size; i++) {
266
1.50k
            block->get_by_position(key_locs ? key_locs->operator[](i) : i)
267
1.50k
                    .column->compare_internal(limit_columns_min, *limit_columns[i],
268
1.50k
                                              null_directions[i], order_directions[i], cmp_res,
269
1.50k
                                              need_computes.data());
270
1.50k
        }
271
272
621
        auto set_computes_arr = [](auto* __restrict res, auto* __restrict computes, size_t rows) {
273
478k
            for (size_t i = 0; i < rows; ++i) {
274
477k
                computes[i] = computes[i] == res[i];
275
477k
            }
276
621
        };
277
621
        set_computes_arr(cmp_res.data(), need_computes.data(), num_rows);
278
279
621
        return std::find(need_computes.begin(), need_computes.end(), 0) != need_computes.end();
280
621
    }
281
282
0
    return false;
283
621
}
284
285
2.89k
Status AggSharedState::reset_hash_table() {
286
2.89k
    return std::visit(
287
2.89k
            vectorized::Overload {
288
2.89k
                    [&](std::monostate& arg) -> Status {
289
0
                        return Status::InternalError("Uninited hash table");
290
0
                    },
291
2.89k
                    [&](auto& agg_method) {
292
2.89k
                        auto& hash_table = *agg_method.hash_table;
293
2.89k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
2.89k
                        agg_method.arena.clear();
296
2.89k
                        agg_method.inited_iterator = false;
297
298
1.05M
                        hash_table.for_each_mapped([&](auto& mapped) {
299
1.05M
                            if (mapped) {
300
1.05M
                                _destroy_agg_status(mapped);
301
1.05M
                                mapped = nullptr;
302
1.05M
                            }
303
1.05M
                        });
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
238
                        hash_table.for_each_mapped([&](auto& mapped) {
299
238
                            if (mapped) {
300
238
                                _destroy_agg_status(mapped);
301
238
                                mapped = nullptr;
302
238
                            }
303
238
                        });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
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
730
                        hash_table.for_each_mapped([&](auto& mapped) {
299
730
                            if (mapped) {
300
730
                                _destroy_agg_status(mapped);
301
730
                                mapped = nullptr;
302
730
                            }
303
730
                        });
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
536
                        hash_table.for_each_mapped([&](auto& mapped) {
299
536
                            if (mapped) {
300
536
                                _destroy_agg_status(mapped);
301
536
                                mapped = nullptr;
302
536
                            }
303
536
                        });
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
1.83k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
1.83k
                            if (mapped) {
300
1.83k
                                _destroy_agg_status(mapped);
301
1.83k
                                mapped = nullptr;
302
1.83k
                            }
303
1.83k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
298
326
                        hash_table.for_each_mapped([&](auto& mapped) {
299
326
                            if (mapped) {
300
326
                                _destroy_agg_status(mapped);
301
326
                                mapped = nullptr;
302
326
                            }
303
326
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
298
1.04k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
1.04k
                            if (mapped) {
300
1.04k
                                _destroy_agg_status(mapped);
301
1.04k
                                mapped = nullptr;
302
1.04k
                            }
303
1.04k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
298
573
                        hash_table.for_each_mapped([&](auto& mapped) {
299
573
                            if (mapped) {
300
573
                                _destroy_agg_status(mapped);
301
573
                                mapped = nullptr;
302
573
                            }
303
573
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
298
462
                        hash_table.for_each_mapped([&](auto& mapped) {
299
462
                            if (mapped) {
300
462
                                _destroy_agg_status(mapped);
301
462
                                mapped = nullptr;
302
462
                            }
303
462
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_ENKUlSJ_E_clIS9_EEDaSJ_
Line
Count
Source
298
551
                        hash_table.for_each_mapped([&](auto& mapped) {
299
551
                            if (mapped) {
300
551
                                _destroy_agg_status(mapped);
301
551
                                mapped = nullptr;
302
551
                            }
303
551
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_ENKUlSJ_E_clIS9_EEDaSJ_
Line
Count
Source
298
942
                        hash_table.for_each_mapped([&](auto& mapped) {
299
942
                            if (mapped) {
300
942
                                _destroy_agg_status(mapped);
301
942
                                mapped = nullptr;
302
942
                            }
303
942
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ENKUlSK_E_clISC_EEDaSK_
Line
Count
Source
298
570
                        hash_table.for_each_mapped([&](auto& mapped) {
299
570
                            if (mapped) {
300
570
                                _destroy_agg_status(mapped);
301
570
                                mapped = nullptr;
302
570
                            }
303
570
                        });
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.89k
                        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.89k
                        aggregate_data_container.reset(new AggregateDataContainer(
311
2.89k
                                sizeof(typename HashTableType::key_type),
312
2.89k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
2.89k
                                 align_aggregate_states) *
314
2.89k
                                        align_aggregate_states));
315
2.89k
                        agg_method.hash_table.reset(new HashTableType());
316
2.89k
                        return Status::OK();
317
2.89k
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEDaRT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEDaRT_
Line
Count
Source
291
70
                    [&](auto& agg_method) {
292
70
                        auto& hash_table = *agg_method.hash_table;
293
70
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
70
                        agg_method.arena.clear();
296
70
                        agg_method.inited_iterator = false;
297
298
70
                        hash_table.for_each_mapped([&](auto& mapped) {
299
70
                            if (mapped) {
300
70
                                _destroy_agg_status(mapped);
301
70
                                mapped = nullptr;
302
70
                            }
303
70
                        });
304
305
70
                        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
70
                        aggregate_data_container.reset(new AggregateDataContainer(
311
70
                                sizeof(typename HashTableType::key_type),
312
70
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
70
                                 align_aggregate_states) *
314
70
                                        align_aggregate_states));
315
70
                        agg_method.hash_table.reset(new HashTableType());
316
70
                        return Status::OK();
317
70
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEDaRT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_
Line
Count
Source
291
210
                    [&](auto& agg_method) {
292
210
                        auto& hash_table = *agg_method.hash_table;
293
210
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
210
                        agg_method.arena.clear();
296
210
                        agg_method.inited_iterator = false;
297
298
210
                        hash_table.for_each_mapped([&](auto& mapped) {
299
210
                            if (mapped) {
300
210
                                _destroy_agg_status(mapped);
301
210
                                mapped = nullptr;
302
210
                            }
303
210
                        });
304
305
210
                        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
210
                        aggregate_data_container.reset(new AggregateDataContainer(
311
210
                                sizeof(typename HashTableType::key_type),
312
210
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
210
                                 align_aggregate_states) *
314
210
                                        align_aggregate_states));
315
210
                        agg_method.hash_table.reset(new HashTableType());
316
210
                        return Status::OK();
317
210
                    }},
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
146
                    [&](auto& agg_method) {
292
146
                        auto& hash_table = *agg_method.hash_table;
293
146
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
146
                        agg_method.arena.clear();
296
146
                        agg_method.inited_iterator = false;
297
298
146
                        hash_table.for_each_mapped([&](auto& mapped) {
299
146
                            if (mapped) {
300
146
                                _destroy_agg_status(mapped);
301
146
                                mapped = nullptr;
302
146
                            }
303
146
                        });
304
305
146
                        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
146
                        aggregate_data_container.reset(new AggregateDataContainer(
311
146
                                sizeof(typename HashTableType::key_type),
312
146
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
146
                                 align_aggregate_states) *
314
146
                                        align_aggregate_states));
315
146
                        agg_method.hash_table.reset(new HashTableType());
316
146
                        return Status::OK();
317
146
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEDaRT_
Line
Count
Source
291
81
                    [&](auto& agg_method) {
292
81
                        auto& hash_table = *agg_method.hash_table;
293
81
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
81
                        agg_method.arena.clear();
296
81
                        agg_method.inited_iterator = false;
297
298
81
                        hash_table.for_each_mapped([&](auto& mapped) {
299
81
                            if (mapped) {
300
81
                                _destroy_agg_status(mapped);
301
81
                                mapped = nullptr;
302
81
                            }
303
81
                        });
304
305
81
                        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
81
                        aggregate_data_container.reset(new AggregateDataContainer(
311
81
                                sizeof(typename HashTableType::key_type),
312
81
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
81
                                 align_aggregate_states) *
314
81
                                        align_aggregate_states));
315
81
                        agg_method.hash_table.reset(new HashTableType());
316
81
                        return Status::OK();
317
81
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEDaRT_
Line
Count
Source
291
683
                    [&](auto& agg_method) {
292
683
                        auto& hash_table = *agg_method.hash_table;
293
683
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
683
                        agg_method.arena.clear();
296
683
                        agg_method.inited_iterator = false;
297
298
683
                        hash_table.for_each_mapped([&](auto& mapped) {
299
683
                            if (mapped) {
300
683
                                _destroy_agg_status(mapped);
301
683
                                mapped = nullptr;
302
683
                            }
303
683
                        });
304
305
683
                        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
683
                        aggregate_data_container.reset(new AggregateDataContainer(
311
683
                                sizeof(typename HashTableType::key_type),
312
683
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
683
                                 align_aggregate_states) *
314
683
                                        align_aggregate_states));
315
683
                        agg_method.hash_table.reset(new HashTableType());
316
683
                        return Status::OK();
317
683
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_
Line
Count
Source
291
148
                    [&](auto& agg_method) {
292
148
                        auto& hash_table = *agg_method.hash_table;
293
148
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
148
                        agg_method.arena.clear();
296
148
                        agg_method.inited_iterator = false;
297
298
148
                        hash_table.for_each_mapped([&](auto& mapped) {
299
148
                            if (mapped) {
300
148
                                _destroy_agg_status(mapped);
301
148
                                mapped = nullptr;
302
148
                            }
303
148
                        });
304
305
148
                        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
148
                        aggregate_data_container.reset(new AggregateDataContainer(
311
148
                                sizeof(typename HashTableType::key_type),
312
148
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
148
                                 align_aggregate_states) *
314
148
                                        align_aggregate_states));
315
148
                        agg_method.hash_table.reset(new HashTableType());
316
148
                        return Status::OK();
317
148
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_
Line
Count
Source
291
337
                    [&](auto& agg_method) {
292
337
                        auto& hash_table = *agg_method.hash_table;
293
337
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
337
                        agg_method.arena.clear();
296
337
                        agg_method.inited_iterator = false;
297
298
337
                        hash_table.for_each_mapped([&](auto& mapped) {
299
337
                            if (mapped) {
300
337
                                _destroy_agg_status(mapped);
301
337
                                mapped = nullptr;
302
337
                            }
303
337
                        });
304
305
337
                        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
337
                        aggregate_data_container.reset(new AggregateDataContainer(
311
337
                                sizeof(typename HashTableType::key_type),
312
337
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
337
                                 align_aggregate_states) *
314
337
                                        align_aggregate_states));
315
337
                        agg_method.hash_table.reset(new HashTableType());
316
337
                        return Status::OK();
317
337
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_
Line
Count
Source
291
172
                    [&](auto& agg_method) {
292
172
                        auto& hash_table = *agg_method.hash_table;
293
172
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
172
                        agg_method.arena.clear();
296
172
                        agg_method.inited_iterator = false;
297
298
172
                        hash_table.for_each_mapped([&](auto& mapped) {
299
172
                            if (mapped) {
300
172
                                _destroy_agg_status(mapped);
301
172
                                mapped = nullptr;
302
172
                            }
303
172
                        });
304
305
172
                        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
172
                        aggregate_data_container.reset(new AggregateDataContainer(
311
172
                                sizeof(typename HashTableType::key_type),
312
172
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
172
                                 align_aggregate_states) *
314
172
                                        align_aggregate_states));
315
172
                        agg_method.hash_table.reset(new HashTableType());
316
172
                        return Status::OK();
317
172
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_
Line
Count
Source
291
142
                    [&](auto& agg_method) {
292
142
                        auto& hash_table = *agg_method.hash_table;
293
142
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
142
                        agg_method.arena.clear();
296
142
                        agg_method.inited_iterator = false;
297
298
142
                        hash_table.for_each_mapped([&](auto& mapped) {
299
142
                            if (mapped) {
300
142
                                _destroy_agg_status(mapped);
301
142
                                mapped = nullptr;
302
142
                            }
303
142
                        });
304
305
142
                        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
142
                        aggregate_data_container.reset(new AggregateDataContainer(
311
142
                                sizeof(typename HashTableType::key_type),
312
142
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
142
                                 align_aggregate_states) *
314
142
                                        align_aggregate_states));
315
142
                        agg_method.hash_table.reset(new HashTableType());
316
142
                        return Status::OK();
317
142
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_
Line
Count
Source
291
290
                    [&](auto& agg_method) {
292
290
                        auto& hash_table = *agg_method.hash_table;
293
290
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
290
                        agg_method.arena.clear();
296
290
                        agg_method.inited_iterator = false;
297
298
290
                        hash_table.for_each_mapped([&](auto& mapped) {
299
290
                            if (mapped) {
300
290
                                _destroy_agg_status(mapped);
301
290
                                mapped = nullptr;
302
290
                            }
303
290
                        });
304
305
290
                        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
290
                        aggregate_data_container.reset(new AggregateDataContainer(
311
290
                                sizeof(typename HashTableType::key_type),
312
290
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
290
                                 align_aggregate_states) *
314
290
                                        align_aggregate_states));
315
290
                        agg_method.hash_table.reset(new HashTableType());
316
290
                        return Status::OK();
317
290
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_
Line
Count
Source
291
390
                    [&](auto& agg_method) {
292
390
                        auto& hash_table = *agg_method.hash_table;
293
390
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
390
                        agg_method.arena.clear();
296
390
                        agg_method.inited_iterator = false;
297
298
390
                        hash_table.for_each_mapped([&](auto& mapped) {
299
390
                            if (mapped) {
300
390
                                _destroy_agg_status(mapped);
301
390
                                mapped = nullptr;
302
390
                            }
303
390
                        });
304
305
390
                        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
390
                        aggregate_data_container.reset(new AggregateDataContainer(
311
390
                                sizeof(typename HashTableType::key_type),
312
390
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
390
                                 align_aggregate_states) *
314
390
                                        align_aggregate_states));
315
390
                        agg_method.hash_table.reset(new HashTableType());
316
390
                        return Status::OK();
317
390
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_
Line
Count
Source
291
222
                    [&](auto& agg_method) {
292
222
                        auto& hash_table = *agg_method.hash_table;
293
222
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
222
                        agg_method.arena.clear();
296
222
                        agg_method.inited_iterator = false;
297
298
222
                        hash_table.for_each_mapped([&](auto& mapped) {
299
222
                            if (mapped) {
300
222
                                _destroy_agg_status(mapped);
301
222
                                mapped = nullptr;
302
222
                            }
303
222
                        });
304
305
222
                        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
222
                        aggregate_data_container.reset(new AggregateDataContainer(
311
222
                                sizeof(typename HashTableType::key_type),
312
222
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
313
222
                                 align_aggregate_states) *
314
222
                                        align_aggregate_states));
315
222
                        agg_method.hash_table.reset(new HashTableType());
316
222
                        return Status::OK();
317
222
                    }},
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.89k
            agg_data->method_variant);
319
2.89k
}
320
321
257
void PartitionedAggSharedState::init_spill_params(size_t spill_partition_count) {
322
257
    partition_count = spill_partition_count;
323
257
    max_partition_index = partition_count - 1;
324
325
8.48k
    for (int i = 0; i < partition_count; ++i) {
326
8.22k
        spill_partitions.emplace_back(std::make_shared<AggSpillPartition>());
327
8.22k
    }
328
257
}
329
330
245
void PartitionedAggSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {
331
7.83k
    for (auto& partition : spill_partitions) {
332
7.83k
        if (partition->spilling_stream_) {
333
0
            partition->spilling_stream_->update_shared_profiles(source_profile);
334
0
        }
335
7.83k
        for (auto& stream : partition->spill_streams_) {
336
1.88k
            if (stream) {
337
1.88k
                stream->update_shared_profiles(source_profile);
338
1.88k
            }
339
1.88k
        }
340
7.83k
    }
341
245
}
342
343
Status AggSpillPartition::get_spill_stream(RuntimeState* state, int node_id,
344
                                           RuntimeProfile* profile,
345
3.94k
                                           vectorized::SpillStreamSPtr& spill_stream) {
346
3.94k
    if (spilling_stream_) {
347
1.99k
        spill_stream = spilling_stream_;
348
1.99k
        return Status::OK();
349
1.99k
    }
350
1.95k
    RETURN_IF_ERROR(ExecEnv::GetInstance()->spill_stream_mgr()->register_spill_stream(
351
1.95k
            state, spilling_stream_, print_id(state->query_id()), "agg", node_id,
352
1.95k
            std::numeric_limits<int32_t>::max(), std::numeric_limits<size_t>::max(), profile));
353
1.95k
    spill_streams_.emplace_back(spilling_stream_);
354
1.95k
    spill_stream = spilling_stream_;
355
1.95k
    return Status::OK();
356
1.95k
}
357
5.45k
void AggSpillPartition::close() {
358
5.45k
    if (spilling_stream_) {
359
1
        spilling_stream_.reset();
360
1
    }
361
5.45k
    for (auto& stream : spill_streams_) {
362
5
        (void)ExecEnv::GetInstance()->spill_stream_mgr()->delete_spill_stream(stream);
363
5
    }
364
5.45k
    spill_streams_.clear();
365
5.45k
}
366
367
277
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
277
    bool false_close = false;
371
277
    if (!is_closed.compare_exchange_strong(false_close, true)) {
372
28
        return;
373
28
    }
374
277
    DCHECK(!false_close && is_closed);
375
5.45k
    for (auto partition : spill_partitions) {
376
5.45k
        partition->close();
377
5.45k
    }
378
249
    spill_partitions.clear();
379
249
}
380
381
19
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
19
}
388
389
21
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
21
    bool false_close = false;
393
21
    if (!is_closed.compare_exchange_strong(false_close, true)) {
394
1
        return;
395
1
    }
396
21
    DCHECK(!false_close && is_closed);
397
20
    for (auto& stream : sorted_streams) {
398
1
        (void)ExecEnv::GetInstance()->spill_stream_mgr()->delete_spill_stream(stream);
399
1
    }
400
20
    sorted_streams.clear();
401
20
}
402
403
MultiCastSharedState::MultiCastSharedState(ObjectPool* pool, int cast_sender_count, int node_id)
404
1.78k
        : multi_cast_data_streamer(std::make_unique<pipeline::MultiCastDataStreamer>(
405
1.78k
                  pool, cast_sender_count, node_id)) {}
406
407
0
void MultiCastSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {}
408
409
108k
int AggSharedState::get_slot_column_id(const vectorized::AggFnEvaluator* evaluator) {
410
108k
    auto ctxs = evaluator->input_exprs_ctxs();
411
108k
    CHECK(ctxs.size() == 1 && ctxs[0]->root()->is_slot_ref())
412
1
            << "input_exprs_ctxs is invalid, input_exprs_ctx[0]="
413
1
            << ctxs[0]->root()->debug_string();
414
108k
    return ((vectorized::VSlotRef*)ctxs[0]->root().get())->column_id();
415
108k
}
416
417
2.46M
void AggSharedState::_destroy_agg_status(vectorized::AggregateDataPtr data) {
418
5.20M
    for (int i = 0; i < aggregate_evaluators.size(); ++i) {
419
2.73M
        aggregate_evaluators[i]->function()->destroy(data + offsets_of_aggregate_states[i]);
420
2.73M
    }
421
2.46M
}
422
423
113k
LocalExchangeSharedState::~LocalExchangeSharedState() = default;
424
425
11.9k
Status SetSharedState::update_build_not_ignore_null(const vectorized::VExprContextSPtrs& ctxs) {
426
11.9k
    if (ctxs.size() > build_not_ignore_null.size()) {
427
0
        return Status::InternalError("build_not_ignore_null not initialized");
428
0
    }
429
430
99.3k
    for (int i = 0; i < ctxs.size(); ++i) {
431
87.3k
        build_not_ignore_null[i] = build_not_ignore_null[i] || ctxs[i]->root()->is_nullable();
432
87.3k
    }
433
434
11.9k
    return Status::OK();
435
11.9k
}
436
437
18.9k
size_t SetSharedState::get_hash_table_size() const {
438
18.9k
    size_t hash_table_size = 0;
439
18.9k
    std::visit(
440
19.0k
            [&](auto&& arg) {
441
19.0k
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
19.0k
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
19.0k
                    hash_table_size = arg.hash_table->size();
444
19.0k
                }
445
19.0k
            },
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.5k
            [&](auto&& arg) {
441
17.5k
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
17.5k
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
17.5k
                    hash_table_size = arg.hash_table->size();
444
17.5k
                }
445
17.5k
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized19MethodStringNoCacheI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS7_vEEEEEEDaOT_
Line
Count
Source
440
260
            [&](auto&& arg) {
441
260
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
260
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
260
                    hash_table_size = arg.hash_table->size();
444
260
                }
445
260
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS9_vEEEEEEEEEEDaOT_
Line
Count
Source
440
157
            [&](auto&& arg) {
441
157
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
157
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
157
                    hash_table_size = arg.hash_table->size();
444
157
                }
445
157
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhNS_14RowRefWithFlagE9HashCRC32IhEEEEEEEEEEDaOT_
Line
Count
Source
440
63
            [&](auto&& arg) {
441
63
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
63
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
63
                    hash_table_size = arg.hash_table->size();
444
63
                }
445
63
            },
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
411
            [&](auto&& arg) {
441
411
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
411
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
411
                    hash_table_size = arg.hash_table->size();
444
411
                }
445
411
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEEEEEDaOT_
Line
Count
Source
440
70
            [&](auto&& arg) {
441
70
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
70
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
70
                    hash_table_size = arg.hash_table->size();
444
70
                }
445
70
            },
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_
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIh9PHHashMapIhNS_14RowRefWithFlagE9HashCRC32IhEEEEEEDaOT_
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
16
            [&](auto&& arg) {
441
16
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
16
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
16
                    hash_table_size = arg.hash_table->size();
444
16
                }
445
16
            },
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
60
            [&](auto&& arg) {
441
60
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
60
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
60
                    hash_table_size = arg.hash_table->size();
444
60
                }
445
60
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_6UInt72ENS_14RowRefWithFlagE9HashCRC32IS7_EEEEEEDaOT_
Line
Count
Source
440
33
            [&](auto&& arg) {
441
33
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
33
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
33
                    hash_table_size = arg.hash_table->size();
444
33
                }
445
33
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_6UInt96ENS_14RowRefWithFlagE9HashCRC32IS7_EEEEEEDaOT_
Line
Count
Source
440
94
            [&](auto&& arg) {
441
94
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
94
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
94
                    hash_table_size = arg.hash_table->size();
444
94
                }
445
94
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt104ENS_14RowRefWithFlagE9HashCRC32IS7_EEEEEEDaOT_
Line
Count
Source
440
36
            [&](auto&& arg) {
441
36
                using HashTableCtxType = std::decay_t<decltype(arg)>;
442
36
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
443
36
                    hash_table_size = arg.hash_table->size();
444
36
                }
445
36
            },
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
18.9k
            hash_table_variants->method_variant);
447
18.9k
    return hash_table_size;
448
18.9k
}
449
450
4.85k
Status SetSharedState::hash_table_init() {
451
4.85k
    std::vector<vectorized::DataTypePtr> data_types;
452
39.8k
    for (size_t i = 0; i != child_exprs_lists[0].size(); ++i) {
453
34.9k
        auto& ctx = child_exprs_lists[0][i];
454
34.9k
        auto data_type = ctx->root()->data_type();
455
34.9k
        if (build_not_ignore_null[i]) {
456
34.6k
            data_type = vectorized::make_nullable(data_type);
457
34.6k
        }
458
34.9k
        data_types.emplace_back(std::move(data_type));
459
34.9k
    }
460
4.85k
    return init_hash_method<SetDataVariants>(hash_table_variants.get(), data_types, true);
461
4.85k
}
462
463
void AggSharedState::refresh_top_limit(size_t row_id,
464
1.08k
                                       const vectorized::ColumnRawPtrs& key_columns) {
465
2.28k
    for (int j = 0; j < key_columns.size(); ++j) {
466
1.20k
        limit_columns[j]->insert_from(*key_columns[j], row_id);
467
1.20k
    }
468
1.08k
    limit_heap.emplace(limit_columns[0]->size() - 1, limit_columns, order_directions,
469
1.08k
                       null_directions);
470
471
1.08k
    limit_heap.pop();
472
1.08k
    limit_columns_min = limit_heap.top()._row_id;
473
1.08k
}
474
475
} // namespace doris::pipeline