Coverage Report

Created: 2025-09-12 12:27

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
537k
                                                       const std::string& name) {
43
537k
    source_deps.push_back(std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY"));
44
537k
    source_deps.back()->set_shared_state(this);
45
537k
    return source_deps.back().get();
46
537k
}
47
48
void BasicSharedState::create_source_dependencies(int num_sources, int operator_id, int node_id,
49
49.4k
                                                  const std::string& name) {
50
49.4k
    source_deps.resize(num_sources, nullptr);
51
312k
    for (auto& source_dep : source_deps) {
52
312k
        source_dep = std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY");
53
312k
        source_dep->set_shared_state(this);
54
312k
    }
55
49.4k
}
56
57
Dependency* BasicSharedState::create_sink_dependency(int dest_id, int node_id,
58
740k
                                                     const std::string& name) {
59
740k
    sink_deps.push_back(std::make_shared<Dependency>(dest_id, node_id, name + "_DEPENDENCY", true));
60
740k
    sink_deps.back()->set_shared_state(this);
61
740k
    return sink_deps.back().get();
62
740k
}
63
64
3.00M
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
3.00M
    _blocked_task.push_back(task);
69
3.00M
}
70
71
11.6M
void Dependency::set_ready() {
72
11.6M
    if (_ready) {
73
8.64M
        return;
74
8.64M
    }
75
3.03M
    _watcher.stop();
76
3.03M
    std::vector<std::weak_ptr<PipelineTask>> local_block_task {};
77
3.03M
    {
78
3.03M
        std::unique_lock<std::mutex> lc(_task_lock);
79
3.03M
        if (_ready) {
80
8
            return;
81
8
        }
82
3.03M
        _ready = true;
83
3.03M
        local_block_task.swap(_blocked_task);
84
3.03M
    }
85
3.01M
    for (auto task : local_block_task) {
86
3.02M
        if (auto t = task.lock()) {
87
3.02M
            std::unique_lock<std::mutex> lc(_task_lock);
88
3.02M
            THROW_IF_ERROR(t->wake_up(this));
89
3.02M
        }
90
3.01M
    }
91
3.03M
}
92
93
41.6M
Dependency* Dependency::is_blocked_by(std::shared_ptr<PipelineTask> task) {
94
41.6M
    std::unique_lock<std::mutex> lc(_task_lock);
95
41.6M
    auto ready = _ready.load();
96
41.6M
    if (!ready && task) {
97
3.01M
        _add_block_task(task);
98
3.01M
        start_watcher();
99
3.01M
        THROW_IF_ERROR(task->blocked(this));
100
3.01M
    }
101
41.6M
    return ready ? nullptr : this;
102
41.6M
}
103
104
87.7k
std::string Dependency::debug_string(int indentation_level) {
105
87.7k
    fmt::memory_buffer debug_string_buffer;
106
87.7k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, block task = {}, ready={}, _always_ready={}",
107
87.7k
                   std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(),
108
87.7k
                   _ready, _always_ready);
109
87.7k
    return fmt::to_string(debug_string_buffer);
110
87.7k
}
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
3.18k
void RuntimeFilterTimer::call_timeout() {
122
3.18k
    _parent->set_ready();
123
3.18k
}
124
125
23.6k
void RuntimeFilterTimer::call_ready() {
126
23.6k
    _parent->set_ready();
127
23.6k
}
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
509k
bool RuntimeFilterTimer::should_be_check_timeout() {
133
509k
    if (!_parent->ready() && !_local_runtime_filter_dependencies.empty()) {
134
1.31k
        bool all_ready = true;
135
1.32k
        for (auto& dep : _local_runtime_filter_dependencies) {
136
1.32k
            if (!dep->ready()) {
137
1.26k
                all_ready = false;
138
1.26k
                break;
139
1.26k
            }
140
1.32k
        }
141
1.31k
        if (all_ready) {
142
58
            _local_runtime_filter_dependencies.clear();
143
58
            _registration_time = MonotonicMillis();
144
58
        }
145
1.31k
        return all_ready;
146
1.31k
    }
147
508k
    return true;
148
509k
}
149
150
8
void RuntimeFilterTimerQueue::start() {
151
94.5k
    while (!_stop) {
152
94.5k
        std::unique_lock<std::mutex> lk(cv_m);
153
154
98.3k
        while (_que.empty() && !_stop) {
155
7.60k
            cv.wait_for(lk, std::chrono::seconds(3), [this] { return !_que.empty() || _stop; });
156
3.80k
        }
157
94.5k
        if (_stop) {
158
3
            break;
159
3
        }
160
94.5k
        {
161
94.5k
            std::unique_lock<std::mutex> lc(_que_lock);
162
94.5k
            std::list<std::shared_ptr<pipeline::RuntimeFilterTimer>> new_que;
163
509k
            for (auto& it : _que) {
164
509k
                if (it.use_count() == 1) {
165
                    // `use_count == 1` means this runtime filter has been released
166
509k
                } else if (it->should_be_check_timeout()) {
167
508k
                    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
487k
                        int64_t ms_since_registration = MonotonicMillis() - it->registration_time();
170
487k
                        if (ms_since_registration > it->wait_time_ms()) {
171
3.18k
                            it->call_timeout();
172
484k
                        } else {
173
484k
                            new_que.push_back(std::move(it));
174
484k
                        }
175
487k
                    }
176
508k
                } else {
177
1.26k
                    new_que.push_back(std::move(it));
178
1.26k
                }
179
509k
            }
180
94.5k
            new_que.swap(_que);
181
94.5k
        }
182
94.5k
        std::this_thread::sleep_for(std::chrono::milliseconds(interval));
183
94.5k
    }
184
8
    _shutdown = true;
185
8
}
186
187
133k
void LocalExchangeSharedState::sub_running_sink_operators() {
188
133k
    std::unique_lock<std::mutex> lc(le_lock);
189
133k
    if (exchanger->_running_sink_operators.fetch_sub(1) == 1) {
190
46.9k
        _set_always_ready();
191
46.9k
    }
192
133k
}
193
194
298k
void LocalExchangeSharedState::sub_running_source_operators() {
195
298k
    std::unique_lock<std::mutex> lc(le_lock);
196
298k
    if (exchanger->_running_source_operators.fetch_sub(1) == 1) {
197
46.9k
        _set_always_ready();
198
46.9k
        exchanger->finalize();
199
46.9k
    }
200
298k
}
201
202
46.9k
LocalExchangeSharedState::LocalExchangeSharedState(int num_instances) {
203
46.9k
    source_deps.resize(num_instances, nullptr);
204
46.9k
    mem_counters.resize(num_instances, nullptr);
205
46.9k
}
206
207
287
vectorized::MutableColumns AggSharedState::_get_keys_hash_table() {
208
287
    return std::visit(
209
287
            vectorized::Overload {
210
287
                    [&](std::monostate& arg) {
211
0
                        throw doris::Exception(ErrorCode::INTERNAL_ERROR, "uninited hash table");
212
0
                        return vectorized::MutableColumns();
213
0
                    },
214
287
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
287
                        vectorized::MutableColumns key_columns;
216
997
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
710
                            key_columns.emplace_back(
218
710
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
710
                        }
220
287
                        auto& data = *agg_method.hash_table;
221
287
                        bool has_null_key = data.has_null_key_data();
222
287
                        const auto size = data.size() - has_null_key;
223
287
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
287
                        std::vector<KeyType> keys(size);
225
226
287
                        uint32_t num_rows = 0;
227
287
                        auto iter = aggregate_data_container->begin();
228
287
                        {
229
23.3k
                            while (iter != aggregate_data_container->end()) {
230
23.0k
                                keys[num_rows] = iter.get_key<KeyType>();
231
23.0k
                                ++iter;
232
23.0k
                                ++num_rows;
233
23.0k
                            }
234
287
                        }
235
287
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
287
                        if (has_null_key) {
237
2
                            key_columns[0]->insert_data(nullptr, 0);
238
2
                        }
239
287
                        return key_columns;
240
287
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
Line
Count
Source
214
32
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
32
                        vectorized::MutableColumns key_columns;
216
159
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
127
                            key_columns.emplace_back(
218
127
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
127
                        }
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
14.6k
                            while (iter != aggregate_data_container->end()) {
230
14.6k
                                keys[num_rows] = iter.get_key<KeyType>();
231
14.6k
                                ++iter;
232
14.6k
                                ++num_rows;
233
14.6k
                            }
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_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
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
24
                            while (iter != aggregate_data_container->end()) {
230
20
                                keys[num_rows] = iter.get_key<KeyType>();
231
20
                                ++iter;
232
20
                                ++num_rows;
233
20
                            }
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
                    }},
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
5
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
5
                        vectorized::MutableColumns key_columns;
216
10
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
5
                            key_columns.emplace_back(
218
5
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
5
                        }
220
5
                        auto& data = *agg_method.hash_table;
221
5
                        bool has_null_key = data.has_null_key_data();
222
5
                        const auto size = data.size() - has_null_key;
223
5
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
5
                        std::vector<KeyType> keys(size);
225
226
5
                        uint32_t num_rows = 0;
227
5
                        auto iter = aggregate_data_container->begin();
228
5
                        {
229
24
                            while (iter != aggregate_data_container->end()) {
230
19
                                keys[num_rows] = iter.get_key<KeyType>();
231
19
                                ++iter;
232
19
                                ++num_rows;
233
19
                            }
234
5
                        }
235
5
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
5
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
5
                        return key_columns;
240
5
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_
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
16
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
16
                        vectorized::MutableColumns key_columns;
216
32
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
16
                            key_columns.emplace_back(
218
16
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
16
                        }
220
16
                        auto& data = *agg_method.hash_table;
221
16
                        bool has_null_key = data.has_null_key_data();
222
16
                        const auto size = data.size() - has_null_key;
223
16
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
16
                        std::vector<KeyType> keys(size);
225
226
16
                        uint32_t num_rows = 0;
227
16
                        auto iter = aggregate_data_container->begin();
228
16
                        {
229
2.44k
                            while (iter != aggregate_data_container->end()) {
230
2.42k
                                keys[num_rows] = iter.get_key<KeyType>();
231
2.42k
                                ++iter;
232
2.42k
                                ++num_rows;
233
2.42k
                            }
234
16
                        }
235
16
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
16
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
16
                        return key_columns;
240
16
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_
Line
Count
Source
214
16
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
16
                        vectorized::MutableColumns key_columns;
216
32
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
16
                            key_columns.emplace_back(
218
16
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
16
                        }
220
16
                        auto& data = *agg_method.hash_table;
221
16
                        bool has_null_key = data.has_null_key_data();
222
16
                        const auto size = data.size() - has_null_key;
223
16
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
16
                        std::vector<KeyType> keys(size);
225
226
16
                        uint32_t num_rows = 0;
227
16
                        auto iter = aggregate_data_container->begin();
228
16
                        {
229
2.47k
                            while (iter != aggregate_data_container->end()) {
230
2.46k
                                keys[num_rows] = iter.get_key<KeyType>();
231
2.46k
                                ++iter;
232
2.46k
                                ++num_rows;
233
2.46k
                            }
234
16
                        }
235
16
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
16
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
16
                        return key_columns;
240
16
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISL_EESaISO_EEOT_
Line
Count
Source
214
18
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
18
                        vectorized::MutableColumns key_columns;
216
36
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
18
                            key_columns.emplace_back(
218
18
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
18
                        }
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
67
                            while (iter != aggregate_data_container->end()) {
230
49
                                keys[num_rows] = iter.get_key<KeyType>();
231
49
                                ++iter;
232
49
                                ++num_rows;
233
49
                            }
234
18
                        }
235
18
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
18
                        if (has_null_key) {
237
1
                            key_columns[0]->insert_data(nullptr, 0);
238
1
                        }
239
18
                        return key_columns;
240
18
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISL_EESaISO_EEOT_
Line
Count
Source
214
20
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
20
                        vectorized::MutableColumns key_columns;
216
40
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
20
                            key_columns.emplace_back(
218
20
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
20
                        }
220
20
                        auto& data = *agg_method.hash_table;
221
20
                        bool has_null_key = data.has_null_key_data();
222
20
                        const auto size = data.size() - has_null_key;
223
20
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
20
                        std::vector<KeyType> keys(size);
225
226
20
                        uint32_t num_rows = 0;
227
20
                        auto iter = aggregate_data_container->begin();
228
20
                        {
229
951
                            while (iter != aggregate_data_container->end()) {
230
931
                                keys[num_rows] = iter.get_key<KeyType>();
231
931
                                ++iter;
232
931
                                ++num_rows;
233
931
                            }
234
20
                        }
235
20
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
20
                        if (has_null_key) {
237
1
                            key_columns[0]->insert_data(nullptr, 0);
238
1
                        }
239
20
                        return key_columns;
240
20
                    }},
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_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISI_EESaISL_EEOT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISI_EESaISL_EEOT_
Line
Count
Source
214
168
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
215
168
                        vectorized::MutableColumns key_columns;
216
664
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
217
496
                            key_columns.emplace_back(
218
496
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
219
496
                        }
220
168
                        auto& data = *agg_method.hash_table;
221
168
                        bool has_null_key = data.has_null_key_data();
222
168
                        const auto size = data.size() - has_null_key;
223
168
                        using KeyType = std::decay_t<decltype(agg_method)>::Key;
224
168
                        std::vector<KeyType> keys(size);
225
226
168
                        uint32_t num_rows = 0;
227
168
                        auto iter = aggregate_data_container->begin();
228
168
                        {
229
2.64k
                            while (iter != aggregate_data_container->end()) {
230
2.48k
                                keys[num_rows] = iter.get_key<KeyType>();
231
2.48k
                                ++iter;
232
2.48k
                                ++num_rows;
233
2.48k
                            }
234
168
                        }
235
168
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
236
168
                        if (has_null_key) {
237
0
                            key_columns[0]->insert_data(nullptr, 0);
238
0
                        }
239
168
                        return key_columns;
240
168
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
241
287
            agg_data->method_variant);
242
287
}
243
244
287
void AggSharedState::build_limit_heap(size_t hash_table_size) {
245
287
    limit_columns = _get_keys_hash_table();
246
25.5k
    for (size_t i = 0; i < hash_table_size; ++i) {
247
25.2k
        limit_heap.emplace(i, limit_columns, order_directions, null_directions);
248
25.2k
    }
249
25.0k
    while (hash_table_size > limit) {
250
24.7k
        limit_heap.pop();
251
24.7k
        hash_table_size--;
252
24.7k
    }
253
287
    limit_columns_min = limit_heap.top()._row_id;
254
287
}
255
256
bool AggSharedState::do_limit_filter(vectorized::Block* block, size_t num_rows,
257
816
                                     const std::vector<int>* key_locs) {
258
816
    if (num_rows) {
259
816
        cmp_res.resize(num_rows);
260
816
        need_computes.resize(num_rows);
261
816
        memset(need_computes.data(), 0, need_computes.size());
262
816
        memset(cmp_res.data(), 0, cmp_res.size());
263
264
816
        const auto key_size = null_directions.size();
265
3.14k
        for (int i = 0; i < key_size; i++) {
266
2.33k
            block->get_by_position(key_locs ? key_locs->operator[](i) : i)
267
2.33k
                    .column->compare_internal(limit_columns_min, *limit_columns[i],
268
2.33k
                                              null_directions[i], order_directions[i], cmp_res,
269
2.33k
                                              need_computes.data());
270
2.33k
        }
271
272
817
        auto set_computes_arr = [](auto* __restrict res, auto* __restrict computes, size_t rows) {
273
236k
            for (size_t i = 0; i < rows; ++i) {
274
236k
                computes[i] = computes[i] == res[i];
275
236k
            }
276
817
        };
277
816
        set_computes_arr(cmp_res.data(), need_computes.data(), num_rows);
278
279
816
        return std::find(need_computes.begin(), need_computes.end(), 0) != need_computes.end();
280
816
    }
281
282
0
    return false;
283
816
}
284
285
21.5k
Status AggSharedState::reset_hash_table() {
286
21.5k
    return std::visit(
287
21.5k
            vectorized::Overload {
288
21.5k
                    [&](std::monostate& arg) -> Status {
289
0
                        return Status::InternalError("Uninited hash table");
290
0
                    },
291
21.6k
                    [&](auto& agg_method) {
292
21.6k
                        auto& hash_table = *agg_method.hash_table;
293
21.6k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
21.6k
                        agg_method.arena.clear();
296
21.6k
                        agg_method.inited_iterator = false;
297
298
2.63M
                        hash_table.for_each_mapped([&](auto& mapped) {
299
2.63M
                            if (mapped) {
300
2.63M
                                static_cast<void>(_destroy_agg_status(mapped));
301
2.63M
                                mapped = nullptr;
302
2.63M
                            }
303
2.63M
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_
Line
Count
Source
298
52.8k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
52.8k
                            if (mapped) {
300
52.8k
                                static_cast<void>(_destroy_agg_status(mapped));
301
52.8k
                                mapped = nullptr;
302
52.8k
                            }
303
52.8k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
298
7
                        hash_table.for_each_mapped([&](auto& mapped) {
299
7
                            if (mapped) {
300
7
                                static_cast<void>(_destroy_agg_status(mapped));
301
7
                                mapped = nullptr;
302
7
                            }
303
7
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
298
631
                        hash_table.for_each_mapped([&](auto& mapped) {
299
631
                            if (mapped) {
300
631
                                static_cast<void>(_destroy_agg_status(mapped));
301
631
                                mapped = nullptr;
302
631
                            }
303
631
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
298
5.66k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
5.66k
                            if (mapped) {
300
5.66k
                                static_cast<void>(_destroy_agg_status(mapped));
301
5.66k
                                mapped = nullptr;
302
5.66k
                            }
303
5.66k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
298
352
                        hash_table.for_each_mapped([&](auto& mapped) {
299
352
                            if (mapped) {
300
352
                                static_cast<void>(_destroy_agg_status(mapped));
301
352
                                mapped = nullptr;
302
352
                            }
303
352
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEDaRT_ENKUlSE_E_clIS7_EEDaSE_
Line
Count
Source
298
1.29k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
1.29k
                            if (mapped) {
300
1.29k
                                static_cast<void>(_destroy_agg_status(mapped));
301
1.29k
                                mapped = nullptr;
302
1.29k
                            }
303
1.29k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_
Line
Count
Source
298
6
                        hash_table.for_each_mapped([&](auto& mapped) {
299
6
                            if (mapped) {
300
6
                                static_cast<void>(_destroy_agg_status(mapped));
301
6
                                mapped = nullptr;
302
6
                            }
303
6
                        });
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
2.33M
                        hash_table.for_each_mapped([&](auto& mapped) {
299
2.33M
                            if (mapped) {
300
2.33M
                                static_cast<void>(_destroy_agg_status(mapped));
301
2.33M
                                mapped = nullptr;
302
2.33M
                            }
303
2.33M
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEDaRT_ENKUlSF_E_clIS7_EEDaSF_
Line
Count
Source
298
21.5k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
21.5k
                            if (mapped) {
300
21.5k
                                static_cast<void>(_destroy_agg_status(mapped));
301
21.5k
                                mapped = nullptr;
302
21.5k
                            }
303
21.5k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
298
75
                        hash_table.for_each_mapped([&](auto& mapped) {
299
75
                            if (mapped) {
300
75
                                static_cast<void>(_destroy_agg_status(mapped));
301
75
                                mapped = nullptr;
302
75
                            }
303
75
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
298
152
                        hash_table.for_each_mapped([&](auto& mapped) {
299
152
                            if (mapped) {
300
152
                                static_cast<void>(_destroy_agg_status(mapped));
301
152
                                mapped = nullptr;
302
152
                            }
303
152
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
298
3.96k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
3.96k
                            if (mapped) {
300
3.96k
                                static_cast<void>(_destroy_agg_status(mapped));
301
3.96k
                                mapped = nullptr;
302
3.96k
                            }
303
3.96k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
298
5.23k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
5.23k
                            if (mapped) {
300
5.23k
                                static_cast<void>(_destroy_agg_status(mapped));
301
5.23k
                                mapped = nullptr;
302
5.23k
                            }
303
5.23k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_ENKUlSJ_E_clIS9_EEDaSJ_
Line
Count
Source
298
10.0k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
10.0k
                            if (mapped) {
300
10.0k
                                static_cast<void>(_destroy_agg_status(mapped));
301
10.0k
                                mapped = nullptr;
302
10.0k
                            }
303
10.0k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_ENKUlSJ_E_clIS9_EEDaSJ_
Line
Count
Source
298
36.3k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
36.3k
                            if (mapped) {
300
36.3k
                                static_cast<void>(_destroy_agg_status(mapped));
301
36.3k
                                mapped = nullptr;
302
36.3k
                            }
303
36.3k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ENKUlSK_E_clISC_EEDaSK_
Line
Count
Source
298
436
                        hash_table.for_each_mapped([&](auto& mapped) {
299
436
                            if (mapped) {
300
436
                                static_cast<void>(_destroy_agg_status(mapped));
301
436
                                mapped = nullptr;
302
436
                            }
303
436
                        });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ENKUlSK_E_clISC_EEDaSK_
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEEEEEDaRT_ENKUlSI_E_clIS9_EEDaSI_
Line
Count
Source
298
568
                        hash_table.for_each_mapped([&](auto& mapped) {
299
568
                            if (mapped) {
300
568
                                static_cast<void>(_destroy_agg_status(mapped));
301
568
                                mapped = nullptr;
302
568
                            }
303
568
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
298
129k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
129k
                            if (mapped) {
300
129k
                                static_cast<void>(_destroy_agg_status(mapped));
301
129k
                                mapped = nullptr;
302
129k
                            }
303
129k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_
Line
Count
Source
298
29.5k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
29.5k
                            if (mapped) {
300
29.5k
                                static_cast<void>(_destroy_agg_status(mapped));
301
29.5k
                                mapped = nullptr;
302
29.5k
                            }
303
29.5k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_
Line
Count
Source
298
510
                        hash_table.for_each_mapped([&](auto& mapped) {
299
510
                            if (mapped) {
300
510
                                static_cast<void>(_destroy_agg_status(mapped));
301
510
                                mapped = nullptr;
302
510
                            }
303
510
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_
Line
Count
Source
298
2.44k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
2.44k
                            if (mapped) {
300
2.44k
                                static_cast<void>(_destroy_agg_status(mapped));
301
2.44k
                                mapped = nullptr;
302
2.44k
                            }
303
2.44k
                        });
304
305
21.6k
                        if (hash_table.has_null_key_data()) {
306
35
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
35
                                                          vectorized::AggregateDataPtr>());
308
35
                            RETURN_IF_ERROR(st);
309
35
                        }
310
311
21.6k
                        aggregate_data_container.reset(new AggregateDataContainer(
312
21.6k
                                sizeof(typename HashTableType::key_type),
313
21.6k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
21.6k
                                 align_aggregate_states) *
315
21.6k
                                        align_aggregate_states));
316
21.6k
                        agg_method.hash_table.reset(new HashTableType());
317
21.6k
                        return Status::OK();
318
21.6k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEDaRT_
Line
Count
Source
291
4.75k
                    [&](auto& agg_method) {
292
4.75k
                        auto& hash_table = *agg_method.hash_table;
293
4.75k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
4.75k
                        agg_method.arena.clear();
296
4.75k
                        agg_method.inited_iterator = false;
297
298
4.75k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
4.75k
                            if (mapped) {
300
4.75k
                                static_cast<void>(_destroy_agg_status(mapped));
301
4.75k
                                mapped = nullptr;
302
4.75k
                            }
303
4.75k
                        });
304
305
4.75k
                        if (hash_table.has_null_key_data()) {
306
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                          vectorized::AggregateDataPtr>());
308
0
                            RETURN_IF_ERROR(st);
309
0
                        }
310
311
4.75k
                        aggregate_data_container.reset(new AggregateDataContainer(
312
4.75k
                                sizeof(typename HashTableType::key_type),
313
4.75k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
4.75k
                                 align_aggregate_states) *
315
4.75k
                                        align_aggregate_states));
316
4.75k
                        agg_method.hash_table.reset(new HashTableType());
317
4.75k
                        return Status::OK();
318
4.75k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEDaRT_
Line
Count
Source
291
10
                    [&](auto& agg_method) {
292
10
                        auto& hash_table = *agg_method.hash_table;
293
10
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
10
                        agg_method.arena.clear();
296
10
                        agg_method.inited_iterator = false;
297
298
10
                        hash_table.for_each_mapped([&](auto& mapped) {
299
10
                            if (mapped) {
300
10
                                static_cast<void>(_destroy_agg_status(mapped));
301
10
                                mapped = nullptr;
302
10
                            }
303
10
                        });
304
305
10
                        if (hash_table.has_null_key_data()) {
306
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                          vectorized::AggregateDataPtr>());
308
0
                            RETURN_IF_ERROR(st);
309
0
                        }
310
311
10
                        aggregate_data_container.reset(new AggregateDataContainer(
312
10
                                sizeof(typename HashTableType::key_type),
313
10
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
10
                                 align_aggregate_states) *
315
10
                                        align_aggregate_states));
316
10
                        agg_method.hash_table.reset(new HashTableType());
317
10
                        return Status::OK();
318
10
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_
Line
Count
Source
291
208
                    [&](auto& agg_method) {
292
208
                        auto& hash_table = *agg_method.hash_table;
293
208
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
208
                        agg_method.arena.clear();
296
208
                        agg_method.inited_iterator = false;
297
298
208
                        hash_table.for_each_mapped([&](auto& mapped) {
299
208
                            if (mapped) {
300
208
                                static_cast<void>(_destroy_agg_status(mapped));
301
208
                                mapped = nullptr;
302
208
                            }
303
208
                        });
304
305
208
                        if (hash_table.has_null_key_data()) {
306
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                          vectorized::AggregateDataPtr>());
308
0
                            RETURN_IF_ERROR(st);
309
0
                        }
310
311
208
                        aggregate_data_container.reset(new AggregateDataContainer(
312
208
                                sizeof(typename HashTableType::key_type),
313
208
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
208
                                 align_aggregate_states) *
315
208
                                        align_aggregate_states));
316
208
                        agg_method.hash_table.reset(new HashTableType());
317
208
                        return Status::OK();
318
208
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEDaRT_
Line
Count
Source
291
606
                    [&](auto& agg_method) {
292
606
                        auto& hash_table = *agg_method.hash_table;
293
606
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
606
                        agg_method.arena.clear();
296
606
                        agg_method.inited_iterator = false;
297
298
606
                        hash_table.for_each_mapped([&](auto& mapped) {
299
606
                            if (mapped) {
300
606
                                static_cast<void>(_destroy_agg_status(mapped));
301
606
                                mapped = nullptr;
302
606
                            }
303
606
                        });
304
305
606
                        if (hash_table.has_null_key_data()) {
306
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                          vectorized::AggregateDataPtr>());
308
0
                            RETURN_IF_ERROR(st);
309
0
                        }
310
311
606
                        aggregate_data_container.reset(new AggregateDataContainer(
312
606
                                sizeof(typename HashTableType::key_type),
313
606
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
606
                                 align_aggregate_states) *
315
606
                                        align_aggregate_states));
316
606
                        agg_method.hash_table.reset(new HashTableType());
317
606
                        return Status::OK();
318
606
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_
Line
Count
Source
291
113
                    [&](auto& agg_method) {
292
113
                        auto& hash_table = *agg_method.hash_table;
293
113
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
113
                        agg_method.arena.clear();
296
113
                        agg_method.inited_iterator = false;
297
298
113
                        hash_table.for_each_mapped([&](auto& mapped) {
299
113
                            if (mapped) {
300
113
                                static_cast<void>(_destroy_agg_status(mapped));
301
113
                                mapped = nullptr;
302
113
                            }
303
113
                        });
304
305
113
                        if (hash_table.has_null_key_data()) {
306
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                          vectorized::AggregateDataPtr>());
308
0
                            RETURN_IF_ERROR(st);
309
0
                        }
310
311
113
                        aggregate_data_container.reset(new AggregateDataContainer(
312
113
                                sizeof(typename HashTableType::key_type),
313
113
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
113
                                 align_aggregate_states) *
315
113
                                        align_aggregate_states));
316
113
                        agg_method.hash_table.reset(new HashTableType());
317
113
                        return Status::OK();
318
113
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEDaRT_
Line
Count
Source
291
648
                    [&](auto& agg_method) {
292
648
                        auto& hash_table = *agg_method.hash_table;
293
648
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
648
                        agg_method.arena.clear();
296
648
                        agg_method.inited_iterator = false;
297
298
648
                        hash_table.for_each_mapped([&](auto& mapped) {
299
648
                            if (mapped) {
300
648
                                static_cast<void>(_destroy_agg_status(mapped));
301
648
                                mapped = nullptr;
302
648
                            }
303
648
                        });
304
305
648
                        if (hash_table.has_null_key_data()) {
306
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                          vectorized::AggregateDataPtr>());
308
0
                            RETURN_IF_ERROR(st);
309
0
                        }
310
311
648
                        aggregate_data_container.reset(new AggregateDataContainer(
312
648
                                sizeof(typename HashTableType::key_type),
313
648
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
648
                                 align_aggregate_states) *
315
648
                                        align_aggregate_states));
316
648
                        agg_method.hash_table.reset(new HashTableType());
317
648
                        return Status::OK();
318
648
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_
Line
Count
Source
291
5
                    [&](auto& agg_method) {
292
5
                        auto& hash_table = *agg_method.hash_table;
293
5
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
5
                        agg_method.arena.clear();
296
5
                        agg_method.inited_iterator = false;
297
298
5
                        hash_table.for_each_mapped([&](auto& mapped) {
299
5
                            if (mapped) {
300
5
                                static_cast<void>(_destroy_agg_status(mapped));
301
5
                                mapped = nullptr;
302
5
                            }
303
5
                        });
304
305
5
                        if (hash_table.has_null_key_data()) {
306
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                          vectorized::AggregateDataPtr>());
308
0
                            RETURN_IF_ERROR(st);
309
0
                        }
310
311
5
                        aggregate_data_container.reset(new AggregateDataContainer(
312
5
                                sizeof(typename HashTableType::key_type),
313
5
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
5
                                 align_aggregate_states) *
315
5
                                        align_aggregate_states));
316
5
                        agg_method.hash_table.reset(new HashTableType());
317
5
                        return Status::OK();
318
5
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEDaRT_
Line
Count
Source
291
3.33k
                    [&](auto& agg_method) {
292
3.33k
                        auto& hash_table = *agg_method.hash_table;
293
3.33k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
3.33k
                        agg_method.arena.clear();
296
3.33k
                        agg_method.inited_iterator = false;
297
298
3.33k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
3.33k
                            if (mapped) {
300
3.33k
                                static_cast<void>(_destroy_agg_status(mapped));
301
3.33k
                                mapped = nullptr;
302
3.33k
                            }
303
3.33k
                        });
304
305
3.33k
                        if (hash_table.has_null_key_data()) {
306
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                          vectorized::AggregateDataPtr>());
308
0
                            RETURN_IF_ERROR(st);
309
0
                        }
310
311
3.33k
                        aggregate_data_container.reset(new AggregateDataContainer(
312
3.33k
                                sizeof(typename HashTableType::key_type),
313
3.33k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
3.33k
                                 align_aggregate_states) *
315
3.33k
                                        align_aggregate_states));
316
3.33k
                        agg_method.hash_table.reset(new HashTableType());
317
3.33k
                        return Status::OK();
318
3.33k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEDaRT_
Line
Count
Source
291
838
                    [&](auto& agg_method) {
292
838
                        auto& hash_table = *agg_method.hash_table;
293
838
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
838
                        agg_method.arena.clear();
296
838
                        agg_method.inited_iterator = false;
297
298
838
                        hash_table.for_each_mapped([&](auto& mapped) {
299
838
                            if (mapped) {
300
838
                                static_cast<void>(_destroy_agg_status(mapped));
301
838
                                mapped = nullptr;
302
838
                            }
303
838
                        });
304
305
838
                        if (hash_table.has_null_key_data()) {
306
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                          vectorized::AggregateDataPtr>());
308
0
                            RETURN_IF_ERROR(st);
309
0
                        }
310
311
838
                        aggregate_data_container.reset(new AggregateDataContainer(
312
838
                                sizeof(typename HashTableType::key_type),
313
838
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
838
                                 align_aggregate_states) *
315
838
                                        align_aggregate_states));
316
838
                        agg_method.hash_table.reset(new HashTableType());
317
838
                        return Status::OK();
318
838
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_
Line
Count
Source
291
63
                    [&](auto& agg_method) {
292
63
                        auto& hash_table = *agg_method.hash_table;
293
63
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
63
                        agg_method.arena.clear();
296
63
                        agg_method.inited_iterator = false;
297
298
63
                        hash_table.for_each_mapped([&](auto& mapped) {
299
63
                            if (mapped) {
300
63
                                static_cast<void>(_destroy_agg_status(mapped));
301
63
                                mapped = nullptr;
302
63
                            }
303
63
                        });
304
305
63
                        if (hash_table.has_null_key_data()) {
306
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                          vectorized::AggregateDataPtr>());
308
0
                            RETURN_IF_ERROR(st);
309
0
                        }
310
311
63
                        aggregate_data_container.reset(new AggregateDataContainer(
312
63
                                sizeof(typename HashTableType::key_type),
313
63
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
63
                                 align_aggregate_states) *
315
63
                                        align_aggregate_states));
316
63
                        agg_method.hash_table.reset(new HashTableType());
317
63
                        return Status::OK();
318
63
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_
Line
Count
Source
291
196
                    [&](auto& agg_method) {
292
196
                        auto& hash_table = *agg_method.hash_table;
293
196
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
196
                        agg_method.arena.clear();
296
196
                        agg_method.inited_iterator = false;
297
298
196
                        hash_table.for_each_mapped([&](auto& mapped) {
299
196
                            if (mapped) {
300
196
                                static_cast<void>(_destroy_agg_status(mapped));
301
196
                                mapped = nullptr;
302
196
                            }
303
196
                        });
304
305
196
                        if (hash_table.has_null_key_data()) {
306
1
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
1
                                                          vectorized::AggregateDataPtr>());
308
1
                            RETURN_IF_ERROR(st);
309
1
                        }
310
311
196
                        aggregate_data_container.reset(new AggregateDataContainer(
312
196
                                sizeof(typename HashTableType::key_type),
313
196
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
196
                                 align_aggregate_states) *
315
196
                                        align_aggregate_states));
316
196
                        agg_method.hash_table.reset(new HashTableType());
317
196
                        return Status::OK();
318
196
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_
Line
Count
Source
291
459
                    [&](auto& agg_method) {
292
459
                        auto& hash_table = *agg_method.hash_table;
293
459
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
459
                        agg_method.arena.clear();
296
459
                        agg_method.inited_iterator = false;
297
298
459
                        hash_table.for_each_mapped([&](auto& mapped) {
299
459
                            if (mapped) {
300
459
                                static_cast<void>(_destroy_agg_status(mapped));
301
459
                                mapped = nullptr;
302
459
                            }
303
459
                        });
304
305
459
                        if (hash_table.has_null_key_data()) {
306
1
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
1
                                                          vectorized::AggregateDataPtr>());
308
1
                            RETURN_IF_ERROR(st);
309
1
                        }
310
311
459
                        aggregate_data_container.reset(new AggregateDataContainer(
312
459
                                sizeof(typename HashTableType::key_type),
313
459
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
459
                                 align_aggregate_states) *
315
459
                                        align_aggregate_states));
316
459
                        agg_method.hash_table.reset(new HashTableType());
317
459
                        return Status::OK();
318
459
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_
Line
Count
Source
291
593
                    [&](auto& agg_method) {
292
593
                        auto& hash_table = *agg_method.hash_table;
293
593
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
593
                        agg_method.arena.clear();
296
593
                        agg_method.inited_iterator = false;
297
298
593
                        hash_table.for_each_mapped([&](auto& mapped) {
299
593
                            if (mapped) {
300
593
                                static_cast<void>(_destroy_agg_status(mapped));
301
593
                                mapped = nullptr;
302
593
                            }
303
593
                        });
304
305
593
                        if (hash_table.has_null_key_data()) {
306
3
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
3
                                                          vectorized::AggregateDataPtr>());
308
3
                            RETURN_IF_ERROR(st);
309
3
                        }
310
311
593
                        aggregate_data_container.reset(new AggregateDataContainer(
312
593
                                sizeof(typename HashTableType::key_type),
313
593
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
593
                                 align_aggregate_states) *
315
593
                                        align_aggregate_states));
316
593
                        agg_method.hash_table.reset(new HashTableType());
317
593
                        return Status::OK();
318
593
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_
Line
Count
Source
291
1.84k
                    [&](auto& agg_method) {
292
1.84k
                        auto& hash_table = *agg_method.hash_table;
293
1.84k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
1.84k
                        agg_method.arena.clear();
296
1.84k
                        agg_method.inited_iterator = false;
297
298
1.84k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
1.84k
                            if (mapped) {
300
1.84k
                                static_cast<void>(_destroy_agg_status(mapped));
301
1.84k
                                mapped = nullptr;
302
1.84k
                            }
303
1.84k
                        });
304
305
1.84k
                        if (hash_table.has_null_key_data()) {
306
14
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
14
                                                          vectorized::AggregateDataPtr>());
308
14
                            RETURN_IF_ERROR(st);
309
14
                        }
310
311
1.84k
                        aggregate_data_container.reset(new AggregateDataContainer(
312
1.84k
                                sizeof(typename HashTableType::key_type),
313
1.84k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
1.84k
                                 align_aggregate_states) *
315
1.84k
                                        align_aggregate_states));
316
1.84k
                        agg_method.hash_table.reset(new HashTableType());
317
1.84k
                        return Status::OK();
318
1.84k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_
Line
Count
Source
291
1.17k
                    [&](auto& agg_method) {
292
1.17k
                        auto& hash_table = *agg_method.hash_table;
293
1.17k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
1.17k
                        agg_method.arena.clear();
296
1.17k
                        agg_method.inited_iterator = false;
297
298
1.17k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
1.17k
                            if (mapped) {
300
1.17k
                                static_cast<void>(_destroy_agg_status(mapped));
301
1.17k
                                mapped = nullptr;
302
1.17k
                            }
303
1.17k
                        });
304
305
1.17k
                        if (hash_table.has_null_key_data()) {
306
10
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
10
                                                          vectorized::AggregateDataPtr>());
308
10
                            RETURN_IF_ERROR(st);
309
10
                        }
310
311
1.17k
                        aggregate_data_container.reset(new AggregateDataContainer(
312
1.17k
                                sizeof(typename HashTableType::key_type),
313
1.17k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
1.17k
                                 align_aggregate_states) *
315
1.17k
                                        align_aggregate_states));
316
1.17k
                        agg_method.hash_table.reset(new HashTableType());
317
1.17k
                        return Status::OK();
318
1.17k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_
Line
Count
Source
291
152
                    [&](auto& agg_method) {
292
152
                        auto& hash_table = *agg_method.hash_table;
293
152
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
152
                        agg_method.arena.clear();
296
152
                        agg_method.inited_iterator = false;
297
298
152
                        hash_table.for_each_mapped([&](auto& mapped) {
299
152
                            if (mapped) {
300
152
                                static_cast<void>(_destroy_agg_status(mapped));
301
152
                                mapped = nullptr;
302
152
                            }
303
152
                        });
304
305
152
                        if (hash_table.has_null_key_data()) {
306
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                          vectorized::AggregateDataPtr>());
308
0
                            RETURN_IF_ERROR(st);
309
0
                        }
310
311
152
                        aggregate_data_container.reset(new AggregateDataContainer(
312
152
                                sizeof(typename HashTableType::key_type),
313
152
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
152
                                 align_aggregate_states) *
315
152
                                        align_aggregate_states));
316
152
                        agg_method.hash_table.reset(new HashTableType());
317
152
                        return Status::OK();
318
152
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEEEEEDaRT_
Line
Count
Source
291
626
                    [&](auto& agg_method) {
292
626
                        auto& hash_table = *agg_method.hash_table;
293
626
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
626
                        agg_method.arena.clear();
296
626
                        agg_method.inited_iterator = false;
297
298
626
                        hash_table.for_each_mapped([&](auto& mapped) {
299
626
                            if (mapped) {
300
626
                                static_cast<void>(_destroy_agg_status(mapped));
301
626
                                mapped = nullptr;
302
626
                            }
303
626
                        });
304
305
626
                        if (hash_table.has_null_key_data()) {
306
6
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
6
                                                          vectorized::AggregateDataPtr>());
308
6
                            RETURN_IF_ERROR(st);
309
6
                        }
310
311
626
                        aggregate_data_container.reset(new AggregateDataContainer(
312
626
                                sizeof(typename HashTableType::key_type),
313
626
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
626
                                 align_aggregate_states) *
315
626
                                        align_aggregate_states));
316
626
                        agg_method.hash_table.reset(new HashTableType());
317
626
                        return Status::OK();
318
626
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_
Line
Count
Source
291
275
                    [&](auto& agg_method) {
292
275
                        auto& hash_table = *agg_method.hash_table;
293
275
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
275
                        agg_method.arena.clear();
296
275
                        agg_method.inited_iterator = false;
297
298
275
                        hash_table.for_each_mapped([&](auto& mapped) {
299
275
                            if (mapped) {
300
275
                                static_cast<void>(_destroy_agg_status(mapped));
301
275
                                mapped = nullptr;
302
275
                            }
303
275
                        });
304
305
275
                        if (hash_table.has_null_key_data()) {
306
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                          vectorized::AggregateDataPtr>());
308
0
                            RETURN_IF_ERROR(st);
309
0
                        }
310
311
275
                        aggregate_data_container.reset(new AggregateDataContainer(
312
275
                                sizeof(typename HashTableType::key_type),
313
275
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
275
                                 align_aggregate_states) *
315
275
                                        align_aggregate_states));
316
275
                        agg_method.hash_table.reset(new HashTableType());
317
275
                        return Status::OK();
318
275
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEEDaRT_
Line
Count
Source
291
2.98k
                    [&](auto& agg_method) {
292
2.98k
                        auto& hash_table = *agg_method.hash_table;
293
2.98k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
2.98k
                        agg_method.arena.clear();
296
2.98k
                        agg_method.inited_iterator = false;
297
298
2.98k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
2.98k
                            if (mapped) {
300
2.98k
                                static_cast<void>(_destroy_agg_status(mapped));
301
2.98k
                                mapped = nullptr;
302
2.98k
                            }
303
2.98k
                        });
304
305
2.98k
                        if (hash_table.has_null_key_data()) {
306
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                          vectorized::AggregateDataPtr>());
308
0
                            RETURN_IF_ERROR(st);
309
0
                        }
310
311
2.98k
                        aggregate_data_container.reset(new AggregateDataContainer(
312
2.98k
                                sizeof(typename HashTableType::key_type),
313
2.98k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
2.98k
                                 align_aggregate_states) *
315
2.98k
                                        align_aggregate_states));
316
2.98k
                        agg_method.hash_table.reset(new HashTableType());
317
2.98k
                        return Status::OK();
318
2.98k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEEDaRT_
Line
Count
Source
291
416
                    [&](auto& agg_method) {
292
416
                        auto& hash_table = *agg_method.hash_table;
293
416
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
416
                        agg_method.arena.clear();
296
416
                        agg_method.inited_iterator = false;
297
298
416
                        hash_table.for_each_mapped([&](auto& mapped) {
299
416
                            if (mapped) {
300
416
                                static_cast<void>(_destroy_agg_status(mapped));
301
416
                                mapped = nullptr;
302
416
                            }
303
416
                        });
304
305
416
                        if (hash_table.has_null_key_data()) {
306
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                          vectorized::AggregateDataPtr>());
308
0
                            RETURN_IF_ERROR(st);
309
0
                        }
310
311
416
                        aggregate_data_container.reset(new AggregateDataContainer(
312
416
                                sizeof(typename HashTableType::key_type),
313
416
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
416
                                 align_aggregate_states) *
315
416
                                        align_aggregate_states));
316
416
                        agg_method.hash_table.reset(new HashTableType());
317
416
                        return Status::OK();
318
416
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEEDaRT_
Line
Count
Source
291
2.30k
                    [&](auto& agg_method) {
292
2.30k
                        auto& hash_table = *agg_method.hash_table;
293
2.30k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
294
295
2.30k
                        agg_method.arena.clear();
296
2.30k
                        agg_method.inited_iterator = false;
297
298
2.30k
                        hash_table.for_each_mapped([&](auto& mapped) {
299
2.30k
                            if (mapped) {
300
2.30k
                                static_cast<void>(_destroy_agg_status(mapped));
301
2.30k
                                mapped = nullptr;
302
2.30k
                            }
303
2.30k
                        });
304
305
2.30k
                        if (hash_table.has_null_key_data()) {
306
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
307
0
                                                          vectorized::AggregateDataPtr>());
308
0
                            RETURN_IF_ERROR(st);
309
0
                        }
310
311
2.30k
                        aggregate_data_container.reset(new AggregateDataContainer(
312
2.30k
                                sizeof(typename HashTableType::key_type),
313
2.30k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
314
2.30k
                                 align_aggregate_states) *
315
2.30k
                                        align_aggregate_states));
316
2.30k
                        agg_method.hash_table.reset(new HashTableType());
317
2.30k
                        return Status::OK();
318
2.30k
                    }},
319
21.5k
            agg_data->method_variant);
320
21.5k
}
321
322
26.1k
void PartitionedAggSharedState::init_spill_params(size_t spill_partition_count) {
323
26.1k
    partition_count = spill_partition_count;
324
26.1k
    max_partition_index = partition_count - 1;
325
326
872k
    for (int i = 0; i < partition_count; ++i) {
327
846k
        spill_partitions.emplace_back(std::make_shared<AggSpillPartition>());
328
846k
    }
329
26.1k
}
330
331
26.3k
void PartitionedAggSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {
332
839k
    for (auto& partition : spill_partitions) {
333
839k
        if (partition->spilling_stream_) {
334
0
            partition->spilling_stream_->update_shared_profiles(source_profile);
335
0
        }
336
839k
        for (auto& stream : partition->spill_streams_) {
337
13.1k
            if (stream) {
338
13.1k
                stream->update_shared_profiles(source_profile);
339
13.1k
            }
340
13.1k
        }
341
839k
    }
342
26.3k
}
343
344
Status AggSpillPartition::get_spill_stream(RuntimeState* state, int node_id,
345
                                           RuntimeProfile* profile,
346
50.8k
                                           vectorized::SpillStreamSPtr& spill_stream) {
347
50.8k
    if (spilling_stream_) {
348
38.0k
        spill_stream = spilling_stream_;
349
38.0k
        return Status::OK();
350
38.0k
    }
351
12.8k
    RETURN_IF_ERROR(ExecEnv::GetInstance()->spill_stream_mgr()->register_spill_stream(
352
12.8k
            state, spilling_stream_, print_id(state->query_id()), "agg", node_id,
353
12.8k
            std::numeric_limits<int32_t>::max(), std::numeric_limits<size_t>::max(), profile));
354
12.8k
    spill_streams_.emplace_back(spilling_stream_);
355
12.8k
    spill_stream = spilling_stream_;
356
12.8k
    return Status::OK();
357
12.8k
}
358
759k
void AggSpillPartition::close() {
359
759k
    if (spilling_stream_) {
360
1
        spilling_stream_.reset();
361
1
    }
362
759k
    for (auto& stream : spill_streams_) {
363
5
        (void)ExecEnv::GetInstance()->spill_stream_mgr()->delete_spill_stream(stream);
364
5
    }
365
759k
    spill_streams_.clear();
366
759k
}
367
368
27.7k
void PartitionedAggSharedState::close() {
369
    // need to use CAS instead of only `if (!is_closed)` statement,
370
    // to avoid concurrent entry of close() both pass the if statement
371
27.7k
    bool false_close = false;
372
27.7k
    if (!is_closed.compare_exchange_strong(false_close, true)) {
373
1.71k
        return;
374
1.71k
    }
375
27.7k
    DCHECK(!false_close && is_closed);
376
768k
    for (auto partition : spill_partitions) {
377
768k
        partition->close();
378
768k
    }
379
26.0k
    spill_partitions.clear();
380
26.0k
}
381
382
133k
void SpillSortSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {
383
133k
    for (auto& stream : sorted_streams) {
384
286
        if (stream) {
385
286
            stream->update_shared_profiles(source_profile);
386
286
        }
387
286
    }
388
133k
}
389
390
127k
void SpillSortSharedState::close() {
391
    // need to use CAS instead of only `if (!is_closed)` statement,
392
    // to avoid concurrent entry of close() both pass the if statement
393
127k
    bool false_close = false;
394
127k
    if (!is_closed.compare_exchange_strong(false_close, true)) {
395
1
        return;
396
1
    }
397
127k
    DCHECK(!false_close && is_closed);
398
127k
    for (auto& stream : sorted_streams) {
399
1
        (void)ExecEnv::GetInstance()->spill_stream_mgr()->delete_spill_stream(stream);
400
1
    }
401
127k
    sorted_streams.clear();
402
127k
}
403
404
MultiCastSharedState::MultiCastSharedState(ObjectPool* pool, int cast_sender_count, int node_id)
405
1.80k
        : multi_cast_data_streamer(std::make_unique<pipeline::MultiCastDataStreamer>(
406
1.80k
                  pool, cast_sender_count, node_id)) {}
407
408
0
void MultiCastSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {}
409
410
120k
int AggSharedState::get_slot_column_id(const vectorized::AggFnEvaluator* evaluator) {
411
120k
    auto ctxs = evaluator->input_exprs_ctxs();
412
18.4E
    CHECK(ctxs.size() == 1 && ctxs[0]->root()->is_slot_ref())
413
18.4E
            << "input_exprs_ctxs is invalid, input_exprs_ctx[0]="
414
18.4E
            << ctxs[0]->root()->debug_string();
415
120k
    return ((vectorized::VSlotRef*)ctxs[0]->root().get())->column_id();
416
120k
}
417
418
4.83M
Status AggSharedState::_destroy_agg_status(vectorized::AggregateDataPtr data) {
419
10.9M
    for (int i = 0; i < aggregate_evaluators.size(); ++i) {
420
6.10M
        aggregate_evaluators[i]->function()->destroy(data + offsets_of_aggregate_states[i]);
421
6.10M
    }
422
4.83M
    return Status::OK();
423
4.83M
}
424
425
46.9k
LocalExchangeSharedState::~LocalExchangeSharedState() = default;
426
427
1.88k
Status SetSharedState::update_build_not_ignore_null(const vectorized::VExprContextSPtrs& ctxs) {
428
1.88k
    if (ctxs.size() > build_not_ignore_null.size()) {
429
0
        return Status::InternalError("build_not_ignore_null not initialized");
430
0
    }
431
432
4.34k
    for (int i = 0; i < ctxs.size(); ++i) {
433
2.46k
        build_not_ignore_null[i] = build_not_ignore_null[i] || ctxs[i]->root()->is_nullable();
434
2.46k
    }
435
436
1.88k
    return Status::OK();
437
1.88k
}
438
439
1.88k
size_t SetSharedState::get_hash_table_size() const {
440
1.88k
    size_t hash_table_size = 0;
441
1.88k
    std::visit(
442
1.89k
            [&](auto&& arg) {
443
1.89k
                using HashTableCtxType = std::decay_t<decltype(arg)>;
444
1.89k
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
445
1.89k
                    hash_table_size = arg.hash_table->size();
446
1.89k
                }
447
1.89k
            },
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRSt9monostateEEDaOT_
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS7_vEEEEEEDaOT_
Line
Count
Source
442
515
            [&](auto&& arg) {
443
515
                using HashTableCtxType = std::decay_t<decltype(arg)>;
444
515
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
445
515
                    hash_table_size = arg.hash_table->size();
446
515
                }
447
515
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized19MethodStringNoCacheI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS7_vEEEEEEDaOT_
Line
Count
Source
442
448
            [&](auto&& arg) {
443
448
                using HashTableCtxType = std::decay_t<decltype(arg)>;
444
448
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
445
448
                    hash_table_size = arg.hash_table->size();
446
448
                }
447
448
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhNS_14RowRefWithFlagE9HashCRC32IhEEEEEEEEEEDaOT_
Line
Count
Source
442
24
            [&](auto&& arg) {
443
24
                using HashTableCtxType = std::decay_t<decltype(arg)>;
444
24
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
445
24
                    hash_table_size = arg.hash_table->size();
446
24
                }
447
24
            },
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
442
772
            [&](auto&& arg) {
443
772
                using HashTableCtxType = std::decay_t<decltype(arg)>;
444
772
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
445
772
                    hash_table_size = arg.hash_table->size();
446
772
                }
447
772
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEEEEEDaOT_
Line
Count
Source
442
6
            [&](auto&& arg) {
443
6
                using HashTableCtxType = std::decay_t<decltype(arg)>;
444
6
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
445
6
                    hash_table_size = arg.hash_table->size();
446
6
                }
447
6
            },
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_NS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEEEEEDaOT_
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
442
64
            [&](auto&& arg) {
443
64
                using HashTableCtxType = std::decay_t<decltype(arg)>;
444
64
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
445
64
                    hash_table_size = arg.hash_table->size();
446
64
                }
447
64
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEDaOT_
Line
Count
Source
442
8
            [&](auto&& arg) {
443
8
                using HashTableCtxType = std::decay_t<decltype(arg)>;
444
8
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
445
8
                    hash_table_size = arg.hash_table->size();
446
8
                }
447
8
            },
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
442
12
            [&](auto&& arg) {
443
12
                using HashTableCtxType = std::decay_t<decltype(arg)>;
444
12
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
445
12
                    hash_table_size = arg.hash_table->size();
446
12
                }
447
12
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEENS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEDaOT_
Line
Count
Source
442
41
            [&](auto&& arg) {
443
41
                using HashTableCtxType = std::decay_t<decltype(arg)>;
444
41
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
445
41
                    hash_table_size = arg.hash_table->size();
446
41
                }
447
41
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEENS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEDaOT_
Line
Count
Source
442
2
            [&](auto&& arg) {
443
2
                using HashTableCtxType = std::decay_t<decltype(arg)>;
444
2
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
445
2
                    hash_table_size = arg.hash_table->size();
446
2
                }
447
2
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136ENS_14RowRefWithFlagE9HashCRC32IS7_EEEEEEDaOT_
Line
Count
Source
442
1
            [&](auto&& arg) {
443
1
                using HashTableCtxType = std::decay_t<decltype(arg)>;
444
1
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
445
1
                    hash_table_size = arg.hash_table->size();
446
1
                }
447
1
            },
448
1.88k
            hash_table_variants->method_variant);
449
1.88k
    return hash_table_size;
450
1.88k
}
451
452
755
Status SetSharedState::hash_table_init() {
453
755
    std::vector<vectorized::DataTypePtr> data_types;
454
1.80k
    for (size_t i = 0; i != child_exprs_lists[0].size(); ++i) {
455
1.04k
        auto& ctx = child_exprs_lists[0][i];
456
1.04k
        auto data_type = ctx->root()->data_type();
457
1.04k
        if (build_not_ignore_null[i]) {
458
864
            data_type = vectorized::make_nullable(data_type);
459
864
        }
460
1.04k
        data_types.emplace_back(std::move(data_type));
461
1.04k
    }
462
755
    return init_hash_method<SetDataVariants>(hash_table_variants.get(), data_types, true);
463
755
}
464
465
void AggSharedState::refresh_top_limit(size_t row_id,
466
1.11k
                                       const vectorized::ColumnRawPtrs& key_columns) {
467
2.48k
    for (int j = 0; j < key_columns.size(); ++j) {
468
1.36k
        limit_columns[j]->insert_from(*key_columns[j], row_id);
469
1.36k
    }
470
1.11k
    limit_heap.emplace(limit_columns[0]->size() - 1, limit_columns, order_directions,
471
1.11k
                       null_directions);
472
473
1.11k
    limit_heap.pop();
474
1.11k
    limit_columns_min = limit_heap.top()._row_id;
475
1.11k
}
476
477
} // namespace doris::pipeline