Coverage Report

Created: 2025-04-29 12:20

/root/doris/be/src/pipeline/dependency.cpp
Line
Count
Source (jump to first uncovered line)
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 "pipeline/exec/multi_cast_data_streamer.h"
25
#include "pipeline/pipeline_fragment_context.h"
26
#include "pipeline/pipeline_task.h"
27
#include "runtime/exec_env.h"
28
#include "runtime/memory/mem_tracker.h"
29
#include "runtime_filter/runtime_filter_consumer.h"
30
#include "vec/exprs/vectorized_agg_fn.h"
31
#include "vec/exprs/vslot_ref.h"
32
#include "vec/spill/spill_stream_manager.h"
33
34
namespace doris::pipeline {
35
#include "common/compile_check_begin.h"
36
37
Dependency* BasicSharedState::create_source_dependency(int operator_id, int node_id,
38
1.21M
                                                       const std::string& name) {
39
1.21M
    source_deps.push_back(std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY"));
40
1.21M
    source_deps.back()->set_shared_state(this);
41
1.21M
    return source_deps.back().get();
42
1.21M
}
43
44
void BasicSharedState::create_source_dependencies(int num_sources, int operator_id, int node_id,
45
124k
                                                  const std::string& name) {
46
124k
    source_deps.resize(num_sources, nullptr);
47
764k
    for (auto& source_dep : source_deps) {
48
764k
        source_dep = std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY");
49
764k
        source_dep->set_shared_state(this);
50
764k
    }
51
124k
}
52
53
Dependency* BasicSharedState::create_sink_dependency(int dest_id, int node_id,
54
1.71M
                                                     const std::string& name) {
55
1.71M
    sink_deps.push_back(std::make_shared<Dependency>(dest_id, node_id, name + "_DEPENDENCY", true));
56
1.71M
    sink_deps.back()->set_shared_state(this);
57
1.71M
    return sink_deps.back().get();
58
1.71M
}
59
60
8.44M
void Dependency::_add_block_task(std::shared_ptr<PipelineTask> task) {
61
18.4E
    DCHECK(_blocked_task.empty() || _blocked_task[_blocked_task.size() - 1].lock() == nullptr ||
62
18.4E
           _blocked_task[_blocked_task.size() - 1].lock().get() != task.get())
63
18.4E
            << "Duplicate task: " << task->debug_string();
64
8.44M
    _blocked_task.push_back(task);
65
8.44M
}
66
67
1.68G
void Dependency::set_ready() {
68
1.68G
    if (_ready) {
69
1.61G
        return;
70
1.61G
    }
71
75.8M
    _watcher.stop();
72
75.8M
    std::vector<std::weak_ptr<PipelineTask>> local_block_task {};
73
75.8M
    {
74
75.8M
        std::unique_lock<std::mutex> lc(_task_lock);
75
75.8M
        if (_ready) {
76
54
            return;
77
54
        }
78
75.8M
        _ready = true;
79
75.8M
        local_block_task.swap(_blocked_task);
80
75.8M
    }
81
8.44M
    for (auto task : local_block_task) {
82
8.44M
        if (auto t = task.lock()) {
83
8.44M
            std::unique_lock<std::mutex> lc(_task_lock);
84
8.44M
            THROW_IF_ERROR(t->wake_up(this));
85
8.44M
        }
86
8.44M
    }
87
75.8M
}
88
89
66.9M
Dependency* Dependency::is_blocked_by(std::shared_ptr<PipelineTask> task) {
90
66.9M
    std::unique_lock<std::mutex> lc(_task_lock);
91
66.9M
    auto ready = _ready.load();
92
66.9M
    if (!ready && task) {
93
8.44M
        _add_block_task(task);
94
8.44M
        start_watcher();
95
8.44M
        THROW_IF_ERROR(task->blocked(this));
96
8.44M
    }
97
66.9M
    return ready ? nullptr : this;
98
66.9M
}
99
100
161k
std::string Dependency::debug_string(int indentation_level) {
101
161k
    fmt::memory_buffer debug_string_buffer;
102
161k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, block task = {}, ready={}, _always_ready={}",
103
161k
                   std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(),
104
161k
                   _ready, _always_ready);
105
161k
    return fmt::to_string(debug_string_buffer);
106
161k
}
107
108
6.29k
std::string CountedFinishDependency::debug_string(int indentation_level) {
109
6.29k
    fmt::memory_buffer debug_string_buffer;
110
6.29k
    fmt::format_to(debug_string_buffer,
111
6.29k
                   "{}{}: id={}, block_task={}, ready={}, _always_ready={}, count={}",
112
6.29k
                   std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(),
113
6.29k
                   _ready, _always_ready, _counter);
114
6.29k
    return fmt::to_string(debug_string_buffer);
115
6.29k
}
116
117
5.96k
void RuntimeFilterTimer::call_timeout() {
118
5.96k
    _parent->set_ready();
119
5.96k
}
120
121
49.7k
void RuntimeFilterTimer::call_ready() {
122
49.7k
    _parent->set_ready();
123
49.7k
}
124
125
// should check rf timeout in two case:
126
// 1. the rf is ready just remove the wait queue
127
// 2. if the rf have local dependency, the rf should start wait when all local dependency is ready
128
3.13M
bool RuntimeFilterTimer::should_be_check_timeout() {
129
3.13M
    if (!_parent->ready() && !_local_runtime_filter_dependencies.empty()) {
130
32.0k
        bool all_ready = true;
131
32.0k
        for (auto& dep : _local_runtime_filter_dependencies) {
132
32.0k
            if (!dep->ready()) {
133
31.9k
                all_ready = false;
134
31.9k
                break;
135
31.9k
            }
136
32.0k
        }
137
32.0k
        if (all_ready) {
138
46
            _local_runtime_filter_dependencies.clear();
139
46
            _registration_time = MonotonicMillis();
140
46
        }
141
32.0k
        return all_ready;
142
32.0k
    }
143
3.09M
    return true;
144
3.13M
}
145
146
3
void RuntimeFilterTimerQueue::start() {
147
319k
    while (!_stop) {
148
319k
        std::unique_lock<std::mutex> lk(cv_m);
149
150
327k
        while (_que.empty() && !_stop) {
151
15.8k
            cv.wait_for(lk, std::chrono::seconds(3), [this] { return !_que.empty() || _stop; });
152
7.92k
        }
153
319k
        if (_stop) {
154
1
            break;
155
1
        }
156
319k
        {
157
319k
            std::unique_lock<std::mutex> lc(_que_lock);
158
319k
            std::list<std::shared_ptr<pipeline::RuntimeFilterTimer>> new_que;
159
3.13M
            for (auto& it : _que) {
160
3.13M
                if (it.use_count() == 1) {
161
                    // `use_count == 1` means this runtime filter has been released
162
3.13M
                } else if (it->should_be_check_timeout()) {
163
3.09M
                    if (it->_parent->is_blocked_by()) {
164
                        // This means runtime filter is not ready, so we call timeout or continue to poll this timer.
165
3.05M
                        int64_t ms_since_registration = MonotonicMillis() - it->registration_time();
166
3.05M
                        if (ms_since_registration > it->wait_time_ms()) {
167
5.96k
                            it->call_timeout();
168
3.04M
                        } else {
169
3.04M
                            new_que.push_back(std::move(it));
170
3.04M
                        }
171
3.05M
                    }
172
3.09M
                } else {
173
31.9k
                    new_que.push_back(std::move(it));
174
31.9k
                }
175
3.13M
            }
176
319k
            new_que.swap(_que);
177
319k
        }
178
319k
        std::this_thread::sleep_for(std::chrono::milliseconds(interval));
179
319k
    }
180
3
    _shutdown = true;
181
3
}
182
183
306k
void LocalExchangeSharedState::sub_running_sink_operators() {
184
306k
    std::unique_lock<std::mutex> lc(le_lock);
185
306k
    if (exchanger->_running_sink_operators.fetch_sub(1) == 1) {
186
117k
        _set_always_ready();
187
117k
    }
188
306k
}
189
190
734k
void LocalExchangeSharedState::sub_running_source_operators() {
191
734k
    std::unique_lock<std::mutex> lc(le_lock);
192
734k
    if (exchanger->_running_source_operators.fetch_sub(1) == 1) {
193
117k
        _set_always_ready();
194
117k
        exchanger->finalize();
195
117k
    }
196
734k
}
197
198
117k
LocalExchangeSharedState::LocalExchangeSharedState(int num_instances) {
199
117k
    source_deps.resize(num_instances, nullptr);
200
117k
    mem_counters.resize(num_instances, nullptr);
201
117k
}
202
203
604
vectorized::MutableColumns AggSharedState::_get_keys_hash_table() {
204
604
    return std::visit(
205
604
            vectorized::Overload {
206
604
                    [&](std::monostate& arg) {
207
0
                        throw doris::Exception(ErrorCode::INTERNAL_ERROR, "uninited hash table");
208
0
                        return vectorized::MutableColumns();
209
0
                    },
210
604
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
604
                        vectorized::MutableColumns key_columns;
212
2.08k
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
1.48k
                            key_columns.emplace_back(
214
1.48k
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
1.48k
                        }
216
604
                        auto& data = *agg_method.hash_table;
217
604
                        bool has_null_key = data.has_null_key_data();
218
604
                        const auto size = data.size() - has_null_key;
219
604
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
604
                        std::vector<KeyType> keys(size);
221
222
604
                        size_t num_rows = 0;
223
604
                        auto iter = aggregate_data_container->begin();
224
604
                        {
225
57.6k
                            while (iter != aggregate_data_container->end()) {
226
57.0k
                                keys[num_rows] = iter.get_key<KeyType>();
227
57.0k
                                ++iter;
228
57.0k
                                ++num_rows;
229
57.0k
                            }
230
604
                        }
231
604
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
604
                        if (has_null_key) {
233
3
                            key_columns[0]->insert_data(nullptr, 0);
234
3
                        }
235
604
                        return key_columns;
236
604
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
Line
Count
Source
210
96
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
96
                        vectorized::MutableColumns key_columns;
212
416
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
320
                            key_columns.emplace_back(
214
320
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
320
                        }
216
96
                        auto& data = *agg_method.hash_table;
217
96
                        bool has_null_key = data.has_null_key_data();
218
96
                        const auto size = data.size() - has_null_key;
219
96
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
96
                        std::vector<KeyType> keys(size);
221
222
96
                        size_t num_rows = 0;
223
96
                        auto iter = aggregate_data_container->begin();
224
96
                        {
225
41.3k
                            while (iter != aggregate_data_container->end()) {
226
41.2k
                                keys[num_rows] = iter.get_key<KeyType>();
227
41.2k
                                ++iter;
228
41.2k
                                ++num_rows;
229
41.2k
                            }
230
96
                        }
231
96
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
96
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
96
                        return key_columns;
236
96
                    }},
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
210
8
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
8
                        vectorized::MutableColumns key_columns;
212
16
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
8
                            key_columns.emplace_back(
214
8
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
8
                        }
216
8
                        auto& data = *agg_method.hash_table;
217
8
                        bool has_null_key = data.has_null_key_data();
218
8
                        const auto size = data.size() - has_null_key;
219
8
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
8
                        std::vector<KeyType> keys(size);
221
222
8
                        size_t num_rows = 0;
223
8
                        auto iter = aggregate_data_container->begin();
224
8
                        {
225
24
                            while (iter != aggregate_data_container->end()) {
226
16
                                keys[num_rows] = iter.get_key<KeyType>();
227
16
                                ++iter;
228
16
                                ++num_rows;
229
16
                            }
230
8
                        }
231
8
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
8
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
8
                        return key_columns;
236
8
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_
Line
Count
Source
210
4
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
4
                        vectorized::MutableColumns key_columns;
212
8
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
4
                            key_columns.emplace_back(
214
4
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
4
                        }
216
4
                        auto& data = *agg_method.hash_table;
217
4
                        bool has_null_key = data.has_null_key_data();
218
4
                        const auto size = data.size() - has_null_key;
219
4
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
4
                        std::vector<KeyType> keys(size);
221
222
4
                        size_t num_rows = 0;
223
4
                        auto iter = aggregate_data_container->begin();
224
4
                        {
225
24
                            while (iter != aggregate_data_container->end()) {
226
20
                                keys[num_rows] = iter.get_key<KeyType>();
227
20
                                ++iter;
228
20
                                ++num_rows;
229
20
                            }
230
4
                        }
231
4
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
4
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
4
                        return key_columns;
236
4
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEESt6vectorINS_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
210
8
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
8
                        vectorized::MutableColumns key_columns;
212
16
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
8
                            key_columns.emplace_back(
214
8
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
8
                        }
216
8
                        auto& data = *agg_method.hash_table;
217
8
                        bool has_null_key = data.has_null_key_data();
218
8
                        const auto size = data.size() - has_null_key;
219
8
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
8
                        std::vector<KeyType> keys(size);
221
222
8
                        size_t num_rows = 0;
223
8
                        auto iter = aggregate_data_container->begin();
224
8
                        {
225
16
                            while (iter != aggregate_data_container->end()) {
226
8
                                keys[num_rows] = iter.get_key<KeyType>();
227
8
                                ++iter;
228
8
                                ++num_rows;
229
8
                            }
230
8
                        }
231
8
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
8
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
8
                        return key_columns;
236
8
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISH_EESaISK_EEOT_
Line
Count
Source
210
10
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
10
                        vectorized::MutableColumns key_columns;
212
20
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
10
                            key_columns.emplace_back(
214
10
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
10
                        }
216
10
                        auto& data = *agg_method.hash_table;
217
10
                        bool has_null_key = data.has_null_key_data();
218
10
                        const auto size = data.size() - has_null_key;
219
10
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
10
                        std::vector<KeyType> keys(size);
221
222
10
                        size_t num_rows = 0;
223
10
                        auto iter = aggregate_data_container->begin();
224
10
                        {
225
40
                            while (iter != aggregate_data_container->end()) {
226
30
                                keys[num_rows] = iter.get_key<KeyType>();
227
30
                                ++iter;
228
30
                                ++num_rows;
229
30
                            }
230
10
                        }
231
10
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
10
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
10
                        return key_columns;
236
10
                    }},
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
210
32
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
32
                        vectorized::MutableColumns key_columns;
212
64
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
32
                            key_columns.emplace_back(
214
32
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
32
                        }
216
32
                        auto& data = *agg_method.hash_table;
217
32
                        bool has_null_key = data.has_null_key_data();
218
32
                        const auto size = data.size() - has_null_key;
219
32
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
32
                        std::vector<KeyType> keys(size);
221
222
32
                        size_t num_rows = 0;
223
32
                        auto iter = aggregate_data_container->begin();
224
32
                        {
225
4.89k
                            while (iter != aggregate_data_container->end()) {
226
4.86k
                                keys[num_rows] = iter.get_key<KeyType>();
227
4.86k
                                ++iter;
228
4.86k
                                ++num_rows;
229
4.86k
                            }
230
32
                        }
231
32
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
32
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
32
                        return key_columns;
236
32
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_
Line
Count
Source
210
32
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
32
                        vectorized::MutableColumns key_columns;
212
64
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
32
                            key_columns.emplace_back(
214
32
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
32
                        }
216
32
                        auto& data = *agg_method.hash_table;
217
32
                        bool has_null_key = data.has_null_key_data();
218
32
                        const auto size = data.size() - has_null_key;
219
32
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
32
                        std::vector<KeyType> keys(size);
221
222
32
                        size_t num_rows = 0;
223
32
                        auto iter = aggregate_data_container->begin();
224
32
                        {
225
4.93k
                            while (iter != aggregate_data_container->end()) {
226
4.90k
                                keys[num_rows] = iter.get_key<KeyType>();
227
4.90k
                                ++iter;
228
4.90k
                                ++num_rows;
229
4.90k
                            }
230
32
                        }
231
32
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
32
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
32
                        return key_columns;
236
32
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISL_EESaISO_EEOT_
Line
Count
Source
210
36
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
36
                        vectorized::MutableColumns key_columns;
212
72
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
36
                            key_columns.emplace_back(
214
36
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
36
                        }
216
36
                        auto& data = *agg_method.hash_table;
217
36
                        bool has_null_key = data.has_null_key_data();
218
36
                        const auto size = data.size() - has_null_key;
219
36
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
36
                        std::vector<KeyType> keys(size);
221
222
36
                        size_t num_rows = 0;
223
36
                        auto iter = aggregate_data_container->begin();
224
36
                        {
225
134
                            while (iter != aggregate_data_container->end()) {
226
98
                                keys[num_rows] = iter.get_key<KeyType>();
227
98
                                ++iter;
228
98
                                ++num_rows;
229
98
                            }
230
36
                        }
231
36
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
36
                        if (has_null_key) {
233
2
                            key_columns[0]->insert_data(nullptr, 0);
234
2
                        }
235
36
                        return key_columns;
236
36
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISL_EESaISO_EEOT_
Line
Count
Source
210
34
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
34
                        vectorized::MutableColumns key_columns;
212
68
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
34
                            key_columns.emplace_back(
214
34
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
34
                        }
216
34
                        auto& data = *agg_method.hash_table;
217
34
                        bool has_null_key = data.has_null_key_data();
218
34
                        const auto size = data.size() - has_null_key;
219
34
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
34
                        std::vector<KeyType> keys(size);
221
222
34
                        size_t num_rows = 0;
223
34
                        auto iter = aggregate_data_container->begin();
224
34
                        {
225
141
                            while (iter != aggregate_data_container->end()) {
226
107
                                keys[num_rows] = iter.get_key<KeyType>();
227
107
                                ++iter;
228
107
                                ++num_rows;
229
107
                            }
230
34
                        }
231
34
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
34
                        if (has_null_key) {
233
1
                            key_columns[0]->insert_data(nullptr, 0);
234
1
                        }
235
34
                        return key_columns;
236
34
                    }},
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_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISK_EESaISN_EEOT_
Line
Count
Source
210
8
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
8
                        vectorized::MutableColumns key_columns;
212
16
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
8
                            key_columns.emplace_back(
214
8
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
8
                        }
216
8
                        auto& data = *agg_method.hash_table;
217
8
                        bool has_null_key = data.has_null_key_data();
218
8
                        const auto size = data.size() - has_null_key;
219
8
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
8
                        std::vector<KeyType> keys(size);
221
222
8
                        size_t num_rows = 0;
223
8
                        auto iter = aggregate_data_container->begin();
224
8
                        {
225
782
                            while (iter != aggregate_data_container->end()) {
226
774
                                keys[num_rows] = iter.get_key<KeyType>();
227
774
                                ++iter;
228
774
                                ++num_rows;
229
774
                            }
230
8
                        }
231
8
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
8
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
8
                        return key_columns;
236
8
                    }},
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
210
336
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
336
                        vectorized::MutableColumns key_columns;
212
1.32k
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
992
                            key_columns.emplace_back(
214
992
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
992
                        }
216
336
                        auto& data = *agg_method.hash_table;
217
336
                        bool has_null_key = data.has_null_key_data();
218
336
                        const auto size = data.size() - has_null_key;
219
336
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
336
                        std::vector<KeyType> keys(size);
221
222
336
                        size_t num_rows = 0;
223
336
                        auto iter = aggregate_data_container->begin();
224
336
                        {
225
5.29k
                            while (iter != aggregate_data_container->end()) {
226
4.96k
                                keys[num_rows] = iter.get_key<KeyType>();
227
4.96k
                                ++iter;
228
4.96k
                                ++num_rows;
229
4.96k
                            }
230
336
                        }
231
336
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
336
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
336
                        return key_columns;
236
336
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
237
604
            agg_data->method_variant);
238
604
}
239
240
604
void AggSharedState::build_limit_heap(size_t hash_table_size) {
241
604
    limit_columns = _get_keys_hash_table();
242
57.0k
    for (size_t i = 0; i < hash_table_size; ++i) {
243
56.4k
        limit_heap.emplace(i, limit_columns, order_directions, null_directions);
244
56.4k
    }
245
55.6k
    while (hash_table_size > limit) {
246
55.0k
        limit_heap.pop();
247
55.0k
        hash_table_size--;
248
55.0k
    }
249
604
    limit_columns_min = limit_heap.top()._row_id;
250
604
}
251
252
bool AggSharedState::do_limit_filter(vectorized::Block* block, size_t num_rows,
253
2.36k
                                     const std::vector<int>* key_locs) {
254
2.36k
    if (num_rows) {
255
2.36k
        cmp_res.resize(num_rows);
256
2.36k
        need_computes.resize(num_rows);
257
2.36k
        memset(need_computes.data(), 0, need_computes.size());
258
2.36k
        memset(cmp_res.data(), 0, cmp_res.size());
259
260
2.36k
        const auto key_size = null_directions.size();
261
8.05k
        for (int i = 0; i < key_size; i++) {
262
5.69k
            block->get_by_position(key_locs ? key_locs->operator[](i) : i)
263
5.69k
                    .column->compare_internal(limit_columns_min, *limit_columns[i],
264
5.69k
                                              null_directions[i], order_directions[i], cmp_res,
265
5.69k
                                              need_computes.data());
266
5.69k
        }
267
268
2.36k
        auto set_computes_arr = [](auto* __restrict res, auto* __restrict computes, size_t rows) {
269
948k
            for (size_t i = 0; i < rows; ++i) {
270
945k
                computes[i] = computes[i] == res[i];
271
945k
            }
272
2.36k
        };
273
2.36k
        set_computes_arr(cmp_res.data(), need_computes.data(), num_rows);
274
275
2.36k
        return std::find(need_computes.begin(), need_computes.end(), 0) != need_computes.end();
276
2.36k
    }
277
278
0
    return false;
279
2.36k
}
280
281
71.3k
Status AggSharedState::reset_hash_table() {
282
71.3k
    return std::visit(
283
71.3k
            vectorized::Overload {
284
71.3k
                    [&](std::monostate& arg) -> Status {
285
0
                        return Status::InternalError("Uninited hash table");
286
0
                    },
287
71.3k
                    [&](auto& agg_method) {
288
71.3k
                        auto& hash_table = *agg_method.hash_table;
289
71.3k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
71.3k
                        agg_method.reset();
292
293
6.29M
                        hash_table.for_each_mapped([&](auto& mapped) {
294
6.29M
                            if (mapped) {
295
6.29M
                                static_cast<void>(_destroy_agg_status(mapped));
296
6.29M
                                mapped = nullptr;
297
6.29M
                            }
298
6.29M
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_
Line
Count
Source
293
97.3k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
97.3k
                            if (mapped) {
295
97.3k
                                static_cast<void>(_destroy_agg_status(mapped));
296
97.3k
                                mapped = nullptr;
297
97.3k
                            }
298
97.3k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
293
12
                        hash_table.for_each_mapped([&](auto& mapped) {
294
12
                            if (mapped) {
295
12
                                static_cast<void>(_destroy_agg_status(mapped));
296
12
                                mapped = nullptr;
297
12
                            }
298
12
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
293
288
                        hash_table.for_each_mapped([&](auto& mapped) {
294
288
                            if (mapped) {
295
288
                                static_cast<void>(_destroy_agg_status(mapped));
296
288
                                mapped = nullptr;
297
288
                            }
298
288
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
293
4.13M
                        hash_table.for_each_mapped([&](auto& mapped) {
294
4.13M
                            if (mapped) {
295
4.13M
                                static_cast<void>(_destroy_agg_status(mapped));
296
4.13M
                                mapped = nullptr;
297
4.13M
                            }
298
4.13M
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
293
105k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
105k
                            if (mapped) {
295
105k
                                static_cast<void>(_destroy_agg_status(mapped));
296
105k
                                mapped = nullptr;
297
105k
                            }
298
105k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEEDaRT_ENKUlSE_E_clIS7_EEDaSE_
Line
Count
Source
293
4.58k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
4.58k
                            if (mapped) {
295
4.58k
                                static_cast<void>(_destroy_agg_status(mapped));
296
4.58k
                                mapped = nullptr;
297
4.58k
                            }
298
4.58k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_
Line
Count
Source
293
16
                        hash_table.for_each_mapped([&](auto& mapped) {
294
16
                            if (mapped) {
295
16
                                static_cast<void>(_destroy_agg_status(mapped));
296
16
                                mapped = nullptr;
297
16
                            }
298
16
                        });
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
293
1.06M
                        hash_table.for_each_mapped([&](auto& mapped) {
294
1.06M
                            if (mapped) {
295
1.06M
                                static_cast<void>(_destroy_agg_status(mapped));
296
1.06M
                                mapped = nullptr;
297
1.06M
                            }
298
1.06M
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEDaRT_ENKUlSF_E_clIS7_EEDaSF_
Line
Count
Source
293
80.6k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
80.6k
                            if (mapped) {
295
80.6k
                                static_cast<void>(_destroy_agg_status(mapped));
296
80.6k
                                mapped = nullptr;
297
80.6k
                            }
298
80.6k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
293
276
                        hash_table.for_each_mapped([&](auto& mapped) {
294
276
                            if (mapped) {
295
276
                                static_cast<void>(_destroy_agg_status(mapped));
296
276
                                mapped = nullptr;
297
276
                            }
298
276
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
293
360
                        hash_table.for_each_mapped([&](auto& mapped) {
294
360
                            if (mapped) {
295
360
                                static_cast<void>(_destroy_agg_status(mapped));
296
360
                                mapped = nullptr;
297
360
                            }
298
360
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
293
47.8k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
47.8k
                            if (mapped) {
295
47.8k
                                static_cast<void>(_destroy_agg_status(mapped));
296
47.8k
                                mapped = nullptr;
297
47.8k
                            }
298
47.8k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
293
13.6k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
13.6k
                            if (mapped) {
295
13.6k
                                static_cast<void>(_destroy_agg_status(mapped));
296
13.6k
                                mapped = nullptr;
297
13.6k
                            }
298
13.6k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_ENKUlSJ_E_clIS9_EEDaSJ_
Line
Count
Source
293
60.3k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
60.3k
                            if (mapped) {
295
60.3k
                                static_cast<void>(_destroy_agg_status(mapped));
296
60.3k
                                mapped = nullptr;
297
60.3k
                            }
298
60.3k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_ENKUlSJ_E_clIS9_EEDaSJ_
Line
Count
Source
293
2.87k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
2.87k
                            if (mapped) {
295
2.87k
                                static_cast<void>(_destroy_agg_status(mapped));
296
2.87k
                                mapped = nullptr;
297
2.87k
                            }
298
2.87k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ENKUlSK_E_clISC_EEDaSK_
Line
Count
Source
293
3.06k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
3.06k
                            if (mapped) {
295
3.06k
                                static_cast<void>(_destroy_agg_status(mapped));
296
3.06k
                                mapped = nullptr;
297
3.06k
                            }
298
3.06k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ENKUlSK_E_clISC_EEDaSK_
Line
Count
Source
293
18
                        hash_table.for_each_mapped([&](auto& mapped) {
294
18
                            if (mapped) {
295
18
                                static_cast<void>(_destroy_agg_status(mapped));
296
18
                                mapped = nullptr;
297
18
                            }
298
18
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEEEEEEDaRT_ENKUlSI_E_clIS9_EEDaSI_
Line
Count
Source
293
22.5k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
22.5k
                            if (mapped) {
295
22.5k
                                static_cast<void>(_destroy_agg_status(mapped));
296
22.5k
                                mapped = nullptr;
297
22.5k
                            }
298
22.5k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
293
605k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
605k
                            if (mapped) {
295
605k
                                static_cast<void>(_destroy_agg_status(mapped));
296
605k
                                mapped = nullptr;
297
605k
                            }
298
605k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_
Line
Count
Source
293
36.0k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
36.0k
                            if (mapped) {
295
36.0k
                                static_cast<void>(_destroy_agg_status(mapped));
296
36.0k
                                mapped = nullptr;
297
36.0k
                            }
298
36.0k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_
Line
Count
Source
293
9.20k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
9.20k
                            if (mapped) {
295
9.20k
                                static_cast<void>(_destroy_agg_status(mapped));
296
9.20k
                                mapped = nullptr;
297
9.20k
                            }
298
9.20k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_
Line
Count
Source
293
3.53k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
3.53k
                            if (mapped) {
295
3.53k
                                static_cast<void>(_destroy_agg_status(mapped));
296
3.53k
                                mapped = nullptr;
297
3.53k
                            }
298
3.53k
                        });
299
300
71.3k
                        if (hash_table.has_null_key_data()) {
301
236
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
236
                                                          vectorized::AggregateDataPtr>());
303
236
                            RETURN_IF_ERROR(st);
304
236
                        }
305
306
71.3k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
71.3k
                                sizeof(typename HashTableType::key_type),
308
71.3k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
71.3k
                                 align_aggregate_states) *
310
71.3k
                                        align_aggregate_states));
311
71.3k
                        agg_method.hash_table.reset(new HashTableType());
312
71.3k
                        agg_arena_pool.reset(new vectorized::Arena);
313
71.3k
                        return Status::OK();
314
71.3k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEDaRT_
Line
Count
Source
287
11.5k
                    [&](auto& agg_method) {
288
11.5k
                        auto& hash_table = *agg_method.hash_table;
289
11.5k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
11.5k
                        agg_method.reset();
292
293
11.5k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
11.5k
                            if (mapped) {
295
11.5k
                                static_cast<void>(_destroy_agg_status(mapped));
296
11.5k
                                mapped = nullptr;
297
11.5k
                            }
298
11.5k
                        });
299
300
11.5k
                        if (hash_table.has_null_key_data()) {
301
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
0
                                                          vectorized::AggregateDataPtr>());
303
0
                            RETURN_IF_ERROR(st);
304
0
                        }
305
306
11.5k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
11.5k
                                sizeof(typename HashTableType::key_type),
308
11.5k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
11.5k
                                 align_aggregate_states) *
310
11.5k
                                        align_aggregate_states));
311
11.5k
                        agg_method.hash_table.reset(new HashTableType());
312
11.5k
                        agg_arena_pool.reset(new vectorized::Arena);
313
11.5k
                        return Status::OK();
314
11.5k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEDaRT_
Line
Count
Source
287
16
                    [&](auto& agg_method) {
288
16
                        auto& hash_table = *agg_method.hash_table;
289
16
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
16
                        agg_method.reset();
292
293
16
                        hash_table.for_each_mapped([&](auto& mapped) {
294
16
                            if (mapped) {
295
16
                                static_cast<void>(_destroy_agg_status(mapped));
296
16
                                mapped = nullptr;
297
16
                            }
298
16
                        });
299
300
16
                        if (hash_table.has_null_key_data()) {
301
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
0
                                                          vectorized::AggregateDataPtr>());
303
0
                            RETURN_IF_ERROR(st);
304
0
                        }
305
306
16
                        aggregate_data_container.reset(new AggregateDataContainer(
307
16
                                sizeof(typename HashTableType::key_type),
308
16
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
16
                                 align_aggregate_states) *
310
16
                                        align_aggregate_states));
311
16
                        agg_method.hash_table.reset(new HashTableType());
312
16
                        agg_arena_pool.reset(new vectorized::Arena);
313
16
                        return Status::OK();
314
16
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_
Line
Count
Source
287
312
                    [&](auto& agg_method) {
288
312
                        auto& hash_table = *agg_method.hash_table;
289
312
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
312
                        agg_method.reset();
292
293
312
                        hash_table.for_each_mapped([&](auto& mapped) {
294
312
                            if (mapped) {
295
312
                                static_cast<void>(_destroy_agg_status(mapped));
296
312
                                mapped = nullptr;
297
312
                            }
298
312
                        });
299
300
312
                        if (hash_table.has_null_key_data()) {
301
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
0
                                                          vectorized::AggregateDataPtr>());
303
0
                            RETURN_IF_ERROR(st);
304
0
                        }
305
306
312
                        aggregate_data_container.reset(new AggregateDataContainer(
307
312
                                sizeof(typename HashTableType::key_type),
308
312
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
312
                                 align_aggregate_states) *
310
312
                                        align_aggregate_states));
311
312
                        agg_method.hash_table.reset(new HashTableType());
312
312
                        agg_arena_pool.reset(new vectorized::Arena);
313
312
                        return Status::OK();
314
312
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEDaRT_
Line
Count
Source
287
8.45k
                    [&](auto& agg_method) {
288
8.45k
                        auto& hash_table = *agg_method.hash_table;
289
8.45k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
8.45k
                        agg_method.reset();
292
293
8.45k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
8.45k
                            if (mapped) {
295
8.45k
                                static_cast<void>(_destroy_agg_status(mapped));
296
8.45k
                                mapped = nullptr;
297
8.45k
                            }
298
8.45k
                        });
299
300
8.45k
                        if (hash_table.has_null_key_data()) {
301
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
0
                                                          vectorized::AggregateDataPtr>());
303
0
                            RETURN_IF_ERROR(st);
304
0
                        }
305
306
8.45k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
8.45k
                                sizeof(typename HashTableType::key_type),
308
8.45k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
8.45k
                                 align_aggregate_states) *
310
8.45k
                                        align_aggregate_states));
311
8.45k
                        agg_method.hash_table.reset(new HashTableType());
312
8.45k
                        agg_arena_pool.reset(new vectorized::Arena);
313
8.45k
                        return Status::OK();
314
8.45k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_
Line
Count
Source
287
2.06k
                    [&](auto& agg_method) {
288
2.06k
                        auto& hash_table = *agg_method.hash_table;
289
2.06k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
2.06k
                        agg_method.reset();
292
293
2.06k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
2.06k
                            if (mapped) {
295
2.06k
                                static_cast<void>(_destroy_agg_status(mapped));
296
2.06k
                                mapped = nullptr;
297
2.06k
                            }
298
2.06k
                        });
299
300
2.06k
                        if (hash_table.has_null_key_data()) {
301
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
0
                                                          vectorized::AggregateDataPtr>());
303
0
                            RETURN_IF_ERROR(st);
304
0
                        }
305
306
2.06k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
2.06k
                                sizeof(typename HashTableType::key_type),
308
2.06k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
2.06k
                                 align_aggregate_states) *
310
2.06k
                                        align_aggregate_states));
311
2.06k
                        agg_method.hash_table.reset(new HashTableType());
312
2.06k
                        agg_arena_pool.reset(new vectorized::Arena);
313
2.06k
                        return Status::OK();
314
2.06k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEEDaRT_
Line
Count
Source
287
1.95k
                    [&](auto& agg_method) {
288
1.95k
                        auto& hash_table = *agg_method.hash_table;
289
1.95k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
1.95k
                        agg_method.reset();
292
293
1.95k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
1.95k
                            if (mapped) {
295
1.95k
                                static_cast<void>(_destroy_agg_status(mapped));
296
1.95k
                                mapped = nullptr;
297
1.95k
                            }
298
1.95k
                        });
299
300
1.95k
                        if (hash_table.has_null_key_data()) {
301
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
0
                                                          vectorized::AggregateDataPtr>());
303
0
                            RETURN_IF_ERROR(st);
304
0
                        }
305
306
1.95k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
1.95k
                                sizeof(typename HashTableType::key_type),
308
1.95k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
1.95k
                                 align_aggregate_states) *
310
1.95k
                                        align_aggregate_states));
311
1.95k
                        agg_method.hash_table.reset(new HashTableType());
312
1.95k
                        agg_arena_pool.reset(new vectorized::Arena);
313
1.95k
                        return Status::OK();
314
1.95k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_
Line
Count
Source
287
20
                    [&](auto& agg_method) {
288
20
                        auto& hash_table = *agg_method.hash_table;
289
20
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
20
                        agg_method.reset();
292
293
20
                        hash_table.for_each_mapped([&](auto& mapped) {
294
20
                            if (mapped) {
295
20
                                static_cast<void>(_destroy_agg_status(mapped));
296
20
                                mapped = nullptr;
297
20
                            }
298
20
                        });
299
300
20
                        if (hash_table.has_null_key_data()) {
301
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
0
                                                          vectorized::AggregateDataPtr>());
303
0
                            RETURN_IF_ERROR(st);
304
0
                        }
305
306
20
                        aggregate_data_container.reset(new AggregateDataContainer(
307
20
                                sizeof(typename HashTableType::key_type),
308
20
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
20
                                 align_aggregate_states) *
310
20
                                        align_aggregate_states));
311
20
                        agg_method.hash_table.reset(new HashTableType());
312
20
                        agg_arena_pool.reset(new vectorized::Arena);
313
20
                        return Status::OK();
314
20
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEDaRT_
Line
Count
Source
287
1.17k
                    [&](auto& agg_method) {
288
1.17k
                        auto& hash_table = *agg_method.hash_table;
289
1.17k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
1.17k
                        agg_method.reset();
292
293
1.17k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
1.17k
                            if (mapped) {
295
1.17k
                                static_cast<void>(_destroy_agg_status(mapped));
296
1.17k
                                mapped = nullptr;
297
1.17k
                            }
298
1.17k
                        });
299
300
1.17k
                        if (hash_table.has_null_key_data()) {
301
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
0
                                                          vectorized::AggregateDataPtr>());
303
0
                            RETURN_IF_ERROR(st);
304
0
                        }
305
306
1.17k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
1.17k
                                sizeof(typename HashTableType::key_type),
308
1.17k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
1.17k
                                 align_aggregate_states) *
310
1.17k
                                        align_aggregate_states));
311
1.17k
                        agg_method.hash_table.reset(new HashTableType());
312
1.17k
                        agg_arena_pool.reset(new vectorized::Arena);
313
1.17k
                        return Status::OK();
314
1.17k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEDaRT_
Line
Count
Source
287
1.08k
                    [&](auto& agg_method) {
288
1.08k
                        auto& hash_table = *agg_method.hash_table;
289
1.08k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
1.08k
                        agg_method.reset();
292
293
1.08k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
1.08k
                            if (mapped) {
295
1.08k
                                static_cast<void>(_destroy_agg_status(mapped));
296
1.08k
                                mapped = nullptr;
297
1.08k
                            }
298
1.08k
                        });
299
300
1.08k
                        if (hash_table.has_null_key_data()) {
301
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
0
                                                          vectorized::AggregateDataPtr>());
303
0
                            RETURN_IF_ERROR(st);
304
0
                        }
305
306
1.08k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
1.08k
                                sizeof(typename HashTableType::key_type),
308
1.08k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
1.08k
                                 align_aggregate_states) *
310
1.08k
                                        align_aggregate_states));
311
1.08k
                        agg_method.hash_table.reset(new HashTableType());
312
1.08k
                        agg_arena_pool.reset(new vectorized::Arena);
313
1.08k
                        return Status::OK();
314
1.08k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_
Line
Count
Source
287
364
                    [&](auto& agg_method) {
288
364
                        auto& hash_table = *agg_method.hash_table;
289
364
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
364
                        agg_method.reset();
292
293
364
                        hash_table.for_each_mapped([&](auto& mapped) {
294
364
                            if (mapped) {
295
364
                                static_cast<void>(_destroy_agg_status(mapped));
296
364
                                mapped = nullptr;
297
364
                            }
298
364
                        });
299
300
364
                        if (hash_table.has_null_key_data()) {
301
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
0
                                                          vectorized::AggregateDataPtr>());
303
0
                            RETURN_IF_ERROR(st);
304
0
                        }
305
306
364
                        aggregate_data_container.reset(new AggregateDataContainer(
307
364
                                sizeof(typename HashTableType::key_type),
308
364
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
364
                                 align_aggregate_states) *
310
364
                                        align_aggregate_states));
311
364
                        agg_method.hash_table.reset(new HashTableType());
312
364
                        agg_arena_pool.reset(new vectorized::Arena);
313
364
                        return Status::OK();
314
364
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_
Line
Count
Source
287
432
                    [&](auto& agg_method) {
288
432
                        auto& hash_table = *agg_method.hash_table;
289
432
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
432
                        agg_method.reset();
292
293
432
                        hash_table.for_each_mapped([&](auto& mapped) {
294
432
                            if (mapped) {
295
432
                                static_cast<void>(_destroy_agg_status(mapped));
296
432
                                mapped = nullptr;
297
432
                            }
298
432
                        });
299
300
432
                        if (hash_table.has_null_key_data()) {
301
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
0
                                                          vectorized::AggregateDataPtr>());
303
0
                            RETURN_IF_ERROR(st);
304
0
                        }
305
306
432
                        aggregate_data_container.reset(new AggregateDataContainer(
307
432
                                sizeof(typename HashTableType::key_type),
308
432
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
432
                                 align_aggregate_states) *
310
432
                                        align_aggregate_states));
311
432
                        agg_method.hash_table.reset(new HashTableType());
312
432
                        agg_arena_pool.reset(new vectorized::Arena);
313
432
                        return Status::OK();
314
432
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_
Line
Count
Source
287
8.42k
                    [&](auto& agg_method) {
288
8.42k
                        auto& hash_table = *agg_method.hash_table;
289
8.42k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
8.42k
                        agg_method.reset();
292
293
8.42k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
8.42k
                            if (mapped) {
295
8.42k
                                static_cast<void>(_destroy_agg_status(mapped));
296
8.42k
                                mapped = nullptr;
297
8.42k
                            }
298
8.42k
                        });
299
300
8.42k
                        if (hash_table.has_null_key_data()) {
301
34
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
34
                                                          vectorized::AggregateDataPtr>());
303
34
                            RETURN_IF_ERROR(st);
304
34
                        }
305
306
8.42k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
8.42k
                                sizeof(typename HashTableType::key_type),
308
8.42k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
8.42k
                                 align_aggregate_states) *
310
8.42k
                                        align_aggregate_states));
311
8.42k
                        agg_method.hash_table.reset(new HashTableType());
312
8.42k
                        agg_arena_pool.reset(new vectorized::Arena);
313
8.42k
                        return Status::OK();
314
8.42k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_
Line
Count
Source
287
1.76k
                    [&](auto& agg_method) {
288
1.76k
                        auto& hash_table = *agg_method.hash_table;
289
1.76k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
1.76k
                        agg_method.reset();
292
293
1.76k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
1.76k
                            if (mapped) {
295
1.76k
                                static_cast<void>(_destroy_agg_status(mapped));
296
1.76k
                                mapped = nullptr;
297
1.76k
                            }
298
1.76k
                        });
299
300
1.76k
                        if (hash_table.has_null_key_data()) {
301
10
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
10
                                                          vectorized::AggregateDataPtr>());
303
10
                            RETURN_IF_ERROR(st);
304
10
                        }
305
306
1.76k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
1.76k
                                sizeof(typename HashTableType::key_type),
308
1.76k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
1.76k
                                 align_aggregate_states) *
310
1.76k
                                        align_aggregate_states));
311
1.76k
                        agg_method.hash_table.reset(new HashTableType());
312
1.76k
                        agg_arena_pool.reset(new vectorized::Arena);
313
1.76k
                        return Status::OK();
314
1.76k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_
Line
Count
Source
287
1.68k
                    [&](auto& agg_method) {
288
1.68k
                        auto& hash_table = *agg_method.hash_table;
289
1.68k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
1.68k
                        agg_method.reset();
292
293
1.68k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
1.68k
                            if (mapped) {
295
1.68k
                                static_cast<void>(_destroy_agg_status(mapped));
296
1.68k
                                mapped = nullptr;
297
1.68k
                            }
298
1.68k
                        });
299
300
1.68k
                        if (hash_table.has_null_key_data()) {
301
16
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
16
                                                          vectorized::AggregateDataPtr>());
303
16
                            RETURN_IF_ERROR(st);
304
16
                        }
305
306
1.68k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
1.68k
                                sizeof(typename HashTableType::key_type),
308
1.68k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
1.68k
                                 align_aggregate_states) *
310
1.68k
                                        align_aggregate_states));
311
1.68k
                        agg_method.hash_table.reset(new HashTableType());
312
1.68k
                        agg_arena_pool.reset(new vectorized::Arena);
313
1.68k
                        return Status::OK();
314
1.68k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_
Line
Count
Source
287
2.10k
                    [&](auto& agg_method) {
288
2.10k
                        auto& hash_table = *agg_method.hash_table;
289
2.10k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
2.10k
                        agg_method.reset();
292
293
2.10k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
2.10k
                            if (mapped) {
295
2.10k
                                static_cast<void>(_destroy_agg_status(mapped));
296
2.10k
                                mapped = nullptr;
297
2.10k
                            }
298
2.10k
                        });
299
300
2.10k
                        if (hash_table.has_null_key_data()) {
301
56
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
56
                                                          vectorized::AggregateDataPtr>());
303
56
                            RETURN_IF_ERROR(st);
304
56
                        }
305
306
2.10k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
2.10k
                                sizeof(typename HashTableType::key_type),
308
2.10k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
2.10k
                                 align_aggregate_states) *
310
2.10k
                                        align_aggregate_states));
311
2.10k
                        agg_method.hash_table.reset(new HashTableType());
312
2.10k
                        agg_arena_pool.reset(new vectorized::Arena);
313
2.10k
                        return Status::OK();
314
2.10k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_
Line
Count
Source
287
3.53k
                    [&](auto& agg_method) {
288
3.53k
                        auto& hash_table = *agg_method.hash_table;
289
3.53k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
3.53k
                        agg_method.reset();
292
293
3.53k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
3.53k
                            if (mapped) {
295
3.53k
                                static_cast<void>(_destroy_agg_status(mapped));
296
3.53k
                                mapped = nullptr;
297
3.53k
                            }
298
3.53k
                        });
299
300
3.53k
                        if (hash_table.has_null_key_data()) {
301
64
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
64
                                                          vectorized::AggregateDataPtr>());
303
64
                            RETURN_IF_ERROR(st);
304
64
                        }
305
306
3.53k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
3.53k
                                sizeof(typename HashTableType::key_type),
308
3.53k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
3.53k
                                 align_aggregate_states) *
310
3.53k
                                        align_aggregate_states));
311
3.53k
                        agg_method.hash_table.reset(new HashTableType());
312
3.53k
                        agg_arena_pool.reset(new vectorized::Arena);
313
3.53k
                        return Status::OK();
314
3.53k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_
Line
Count
Source
287
18
                    [&](auto& agg_method) {
288
18
                        auto& hash_table = *agg_method.hash_table;
289
18
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
18
                        agg_method.reset();
292
293
18
                        hash_table.for_each_mapped([&](auto& mapped) {
294
18
                            if (mapped) {
295
18
                                static_cast<void>(_destroy_agg_status(mapped));
296
18
                                mapped = nullptr;
297
18
                            }
298
18
                        });
299
300
18
                        if (hash_table.has_null_key_data()) {
301
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
0
                                                          vectorized::AggregateDataPtr>());
303
0
                            RETURN_IF_ERROR(st);
304
0
                        }
305
306
18
                        aggregate_data_container.reset(new AggregateDataContainer(
307
18
                                sizeof(typename HashTableType::key_type),
308
18
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
18
                                 align_aggregate_states) *
310
18
                                        align_aggregate_states));
311
18
                        agg_method.hash_table.reset(new HashTableType());
312
18
                        agg_arena_pool.reset(new vectorized::Arena);
313
18
                        return Status::OK();
314
18
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEEEEEEDaRT_
Line
Count
Source
287
4.00k
                    [&](auto& agg_method) {
288
4.00k
                        auto& hash_table = *agg_method.hash_table;
289
4.00k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
4.00k
                        agg_method.reset();
292
293
4.00k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
4.00k
                            if (mapped) {
295
4.00k
                                static_cast<void>(_destroy_agg_status(mapped));
296
4.00k
                                mapped = nullptr;
297
4.00k
                            }
298
4.00k
                        });
299
300
4.00k
                        if (hash_table.has_null_key_data()) {
301
56
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
56
                                                          vectorized::AggregateDataPtr>());
303
56
                            RETURN_IF_ERROR(st);
304
56
                        }
305
306
4.00k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
4.00k
                                sizeof(typename HashTableType::key_type),
308
4.00k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
4.00k
                                 align_aggregate_states) *
310
4.00k
                                        align_aggregate_states));
311
4.00k
                        agg_method.hash_table.reset(new HashTableType());
312
4.00k
                        agg_arena_pool.reset(new vectorized::Arena);
313
4.00k
                        return Status::OK();
314
4.00k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_
Line
Count
Source
287
2.93k
                    [&](auto& agg_method) {
288
2.93k
                        auto& hash_table = *agg_method.hash_table;
289
2.93k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
2.93k
                        agg_method.reset();
292
293
2.93k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
2.93k
                            if (mapped) {
295
2.93k
                                static_cast<void>(_destroy_agg_status(mapped));
296
2.93k
                                mapped = nullptr;
297
2.93k
                            }
298
2.93k
                        });
299
300
2.93k
                        if (hash_table.has_null_key_data()) {
301
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
0
                                                          vectorized::AggregateDataPtr>());
303
0
                            RETURN_IF_ERROR(st);
304
0
                        }
305
306
2.93k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
2.93k
                                sizeof(typename HashTableType::key_type),
308
2.93k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
2.93k
                                 align_aggregate_states) *
310
2.93k
                                        align_aggregate_states));
311
2.93k
                        agg_method.hash_table.reset(new HashTableType());
312
2.93k
                        agg_arena_pool.reset(new vectorized::Arena);
313
2.93k
                        return Status::OK();
314
2.93k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEEDaRT_
Line
Count
Source
287
7.86k
                    [&](auto& agg_method) {
288
7.86k
                        auto& hash_table = *agg_method.hash_table;
289
7.86k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
7.86k
                        agg_method.reset();
292
293
7.86k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
7.86k
                            if (mapped) {
295
7.86k
                                static_cast<void>(_destroy_agg_status(mapped));
296
7.86k
                                mapped = nullptr;
297
7.86k
                            }
298
7.86k
                        });
299
300
7.86k
                        if (hash_table.has_null_key_data()) {
301
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
0
                                                          vectorized::AggregateDataPtr>());
303
0
                            RETURN_IF_ERROR(st);
304
0
                        }
305
306
7.86k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
7.86k
                                sizeof(typename HashTableType::key_type),
308
7.86k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
7.86k
                                 align_aggregate_states) *
310
7.86k
                                        align_aggregate_states));
311
7.86k
                        agg_method.hash_table.reset(new HashTableType());
312
7.86k
                        agg_arena_pool.reset(new vectorized::Arena);
313
7.86k
                        return Status::OK();
314
7.86k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEEDaRT_
Line
Count
Source
287
8.26k
                    [&](auto& agg_method) {
288
8.26k
                        auto& hash_table = *agg_method.hash_table;
289
8.26k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
8.26k
                        agg_method.reset();
292
293
8.26k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
8.26k
                            if (mapped) {
295
8.26k
                                static_cast<void>(_destroy_agg_status(mapped));
296
8.26k
                                mapped = nullptr;
297
8.26k
                            }
298
8.26k
                        });
299
300
8.26k
                        if (hash_table.has_null_key_data()) {
301
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
0
                                                          vectorized::AggregateDataPtr>());
303
0
                            RETURN_IF_ERROR(st);
304
0
                        }
305
306
8.26k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
8.26k
                                sizeof(typename HashTableType::key_type),
308
8.26k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
8.26k
                                 align_aggregate_states) *
310
8.26k
                                        align_aggregate_states));
311
8.26k
                        agg_method.hash_table.reset(new HashTableType());
312
8.26k
                        agg_arena_pool.reset(new vectorized::Arena);
313
8.26k
                        return Status::OK();
314
8.26k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEEDaRT_
Line
Count
Source
287
3.32k
                    [&](auto& agg_method) {
288
3.32k
                        auto& hash_table = *agg_method.hash_table;
289
3.32k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
3.32k
                        agg_method.reset();
292
293
3.32k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
3.32k
                            if (mapped) {
295
3.32k
                                static_cast<void>(_destroy_agg_status(mapped));
296
3.32k
                                mapped = nullptr;
297
3.32k
                            }
298
3.32k
                        });
299
300
3.32k
                        if (hash_table.has_null_key_data()) {
301
0
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
0
                                                          vectorized::AggregateDataPtr>());
303
0
                            RETURN_IF_ERROR(st);
304
0
                        }
305
306
3.32k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
3.32k
                                sizeof(typename HashTableType::key_type),
308
3.32k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
3.32k
                                 align_aggregate_states) *
310
3.32k
                                        align_aggregate_states));
311
3.32k
                        agg_method.hash_table.reset(new HashTableType());
312
3.32k
                        agg_arena_pool.reset(new vectorized::Arena);
313
3.32k
                        return Status::OK();
314
3.32k
                    }},
315
71.3k
            agg_data->method_variant);
316
71.3k
}
317
318
94.2k
void PartitionedAggSharedState::init_spill_params(size_t spill_partition_count) {
319
94.2k
    partition_count = spill_partition_count;
320
94.2k
    max_partition_index = partition_count - 1;
321
322
3.10M
    for (int i = 0; i < partition_count; ++i) {
323
3.01M
        spill_partitions.emplace_back(std::make_shared<AggSpillPartition>());
324
3.01M
    }
325
94.2k
}
326
327
93.0k
void PartitionedAggSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {
328
2.96M
    for (auto& partition : spill_partitions) {
329
2.96M
        if (partition->spilling_stream_) {
330
0
            partition->spilling_stream_->update_shared_profiles(source_profile);
331
0
        }
332
2.96M
        for (auto& stream : partition->spill_streams_) {
333
35.1k
            if (stream) {
334
35.1k
                stream->update_shared_profiles(source_profile);
335
35.1k
            }
336
35.1k
        }
337
2.96M
    }
338
93.0k
}
339
340
Status AggSpillPartition::get_spill_stream(RuntimeState* state, int node_id,
341
                                           RuntimeProfile* profile,
342
222k
                                           vectorized::SpillStreamSPtr& spill_stream) {
343
222k
    if (spilling_stream_) {
344
187k
        spill_stream = spilling_stream_;
345
187k
        return Status::OK();
346
187k
    }
347
34.5k
    RETURN_IF_ERROR(ExecEnv::GetInstance()->spill_stream_mgr()->register_spill_stream(
348
34.5k
            state, spilling_stream_, print_id(state->query_id()), "agg", node_id,
349
34.5k
            std::numeric_limits<int32_t>::max(), std::numeric_limits<size_t>::max(), profile));
350
34.5k
    spill_streams_.emplace_back(spilling_stream_);
351
34.5k
    spill_stream = spilling_stream_;
352
34.5k
    return Status::OK();
353
34.5k
}
354
2.65M
void AggSpillPartition::close() {
355
2.65M
    if (spilling_stream_) {
356
1
        spilling_stream_.reset();
357
1
    }
358
2.65M
    for (auto& stream : spill_streams_) {
359
105
        (void)ExecEnv::GetInstance()->spill_stream_mgr()->delete_spill_stream(stream);
360
105
    }
361
2.65M
    spill_streams_.clear();
362
2.65M
}
363
364
101k
void PartitionedAggSharedState::close() {
365
    // need to use CAS instead of only `if (!is_closed)` statement,
366
    // to avoid concurrent entry of close() both pass the if statement
367
101k
    bool false_close = false;
368
101k
    if (!is_closed.compare_exchange_strong(false_close, true)) {
369
8.64k
        return;
370
8.64k
    }
371
93.0k
    DCHECK(!false_close && is_closed);
372
2.65M
    for (auto partition : spill_partitions) {
373
2.65M
        partition->close();
374
2.65M
    }
375
93.0k
    spill_partitions.clear();
376
93.0k
}
377
378
272k
void SpillSortSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {
379
272k
    for (auto& stream : sorted_streams) {
380
556
        if (stream) {
381
556
            stream->update_shared_profiles(source_profile);
382
556
        }
383
556
    }
384
272k
}
385
386
272k
void SpillSortSharedState::close() {
387
    // need to use CAS instead of only `if (!is_closed)` statement,
388
    // to avoid concurrent entry of close() both pass the if statement
389
272k
    bool false_close = false;
390
272k
    if (!is_closed.compare_exchange_strong(false_close, true)) {
391
2
        return;
392
2
    }
393
272k
    DCHECK(!false_close && is_closed);
394
272k
    for (auto& stream : sorted_streams) {
395
1
        (void)ExecEnv::GetInstance()->spill_stream_mgr()->delete_spill_stream(stream);
396
1
    }
397
272k
    sorted_streams.clear();
398
272k
}
399
400
MultiCastSharedState::MultiCastSharedState(ObjectPool* pool, int cast_sender_count, int node_id)
401
        : multi_cast_data_streamer(std::make_unique<pipeline::MultiCastDataStreamer>(
402
2.35k
                  this, pool, cast_sender_count, node_id)) {}
403
404
0
void MultiCastSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {}
405
406
245k
int AggSharedState::get_slot_column_id(const vectorized::AggFnEvaluator* evaluator) {
407
245k
    auto ctxs = evaluator->input_exprs_ctxs();
408
18.4E
    CHECK(ctxs.size() == 1 && ctxs[0]->root()->is_slot_ref())
409
18.4E
            << "input_exprs_ctxs is invalid, input_exprs_ctx[0]="
410
18.4E
            << ctxs[0]->root()->debug_string();
411
245k
    return ((vectorized::VSlotRef*)ctxs[0]->root().get())->column_id();
412
245k
}
413
414
7.91M
Status AggSharedState::_destroy_agg_status(vectorized::AggregateDataPtr data) {
415
16.4M
    for (int i = 0; i < aggregate_evaluators.size(); ++i) {
416
8.55M
        aggregate_evaluators[i]->function()->destroy(data + offsets_of_aggregate_states[i]);
417
8.55M
    }
418
7.91M
    return Status::OK();
419
7.91M
}
420
421
117k
LocalExchangeSharedState::~LocalExchangeSharedState() = default;
422
423
2.46k
Status SetSharedState::update_build_not_ignore_null(const vectorized::VExprContextSPtrs& ctxs) {
424
2.46k
    if (ctxs.size() > build_not_ignore_null.size()) {
425
0
        return Status::InternalError("build_not_ignore_null not initialized");
426
0
    }
427
428
6.46k
    for (int i = 0; i < ctxs.size(); ++i) {
429
3.99k
        build_not_ignore_null[i] = build_not_ignore_null[i] || ctxs[i]->root()->is_nullable();
430
3.99k
    }
431
432
2.46k
    return Status::OK();
433
2.46k
}
434
435
2.45k
size_t SetSharedState::get_hash_table_size() const {
436
2.45k
    size_t hash_table_size = 0;
437
2.45k
    std::visit(
438
2.45k
            [&](auto&& arg) {
439
2.45k
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
2.45k
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
2.45k
                    hash_table_size = arg.hash_table->size();
442
2.45k
                }
443
2.45k
            },
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRSt9monostateEEDaOT_
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS7_vEEEEEEDaOT_
Line
Count
Source
438
1.32k
            [&](auto&& arg) {
439
1.32k
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
1.32k
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
1.32k
                    hash_table_size = arg.hash_table->size();
442
1.32k
                }
443
1.32k
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized19MethodStringNoCacheI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS7_vEEEEEEDaOT_
Line
Count
Source
438
404
            [&](auto&& arg) {
439
404
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
404
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
404
                    hash_table_size = arg.hash_table->size();
442
404
                }
443
404
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhNS_14RowRefWithFlagE9HashCRC32IhEEEEEEEEEEDaOT_
Line
Count
Source
438
100
            [&](auto&& arg) {
439
100
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
100
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
100
                    hash_table_size = arg.hash_table->size();
442
100
                }
443
100
            },
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
438
274
            [&](auto&& arg) {
439
274
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
274
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
274
                    hash_table_size = arg.hash_table->size();
442
274
                }
443
274
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEEEEEDaOT_
Line
Count
Source
438
102
            [&](auto&& arg) {
439
102
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
102
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
102
                    hash_table_size = arg.hash_table->size();
442
102
                }
443
102
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_NS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEEEEEDaOT_
Line
Count
Source
438
48
            [&](auto&& arg) {
439
48
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
48
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
48
                    hash_table_size = arg.hash_table->size();
442
48
                }
443
48
            },
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
438
48
            [&](auto&& arg) {
439
48
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
48
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
48
                    hash_table_size = arg.hash_table->size();
442
48
                }
443
48
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEDaOT_
Line
Count
Source
438
8
            [&](auto&& arg) {
439
8
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
8
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
8
                    hash_table_size = arg.hash_table->size();
442
8
                }
443
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
438
60
            [&](auto&& arg) {
439
60
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
60
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
60
                    hash_table_size = arg.hash_table->size();
442
60
                }
443
60
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEENS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEDaOT_
Line
Count
Source
438
40
            [&](auto&& arg) {
439
40
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
40
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
40
                    hash_table_size = arg.hash_table->size();
442
40
                }
443
40
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEENS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEDaOT_
Line
Count
Source
438
2
            [&](auto&& arg) {
439
2
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
2
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
2
                    hash_table_size = arg.hash_table->size();
442
2
                }
443
2
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136ENS_14RowRefWithFlagE9HashCRC32IS7_EEEEEEDaOT_
Line
Count
Source
438
49
            [&](auto&& arg) {
439
49
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
49
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
49
                    hash_table_size = arg.hash_table->size();
442
49
                }
443
49
            },
444
2.45k
            hash_table_variants->method_variant);
445
2.45k
    return hash_table_size;
446
2.45k
}
447
448
1.16k
Status SetSharedState::hash_table_init() {
449
1.16k
    std::vector<vectorized::DataTypePtr> data_types;
450
3.06k
    for (size_t i = 0; i != child_exprs_lists[0].size(); ++i) {
451
1.89k
        auto& ctx = child_exprs_lists[0][i];
452
1.89k
        auto data_type = ctx->root()->data_type();
453
1.89k
        if (build_not_ignore_null[i]) {
454
1.00k
            data_type = vectorized::make_nullable(data_type);
455
1.00k
        }
456
1.89k
        data_types.emplace_back(std::move(data_type));
457
1.89k
    }
458
1.16k
    return init_hash_method<SetDataVariants>(hash_table_variants.get(), data_types, true);
459
1.16k
}
460
461
void AggSharedState::refresh_top_limit(size_t row_id,
462
780
                                       const vectorized::ColumnRawPtrs& key_columns) {
463
2.67k
    for (int j = 0; j < key_columns.size(); ++j) {
464
1.89k
        limit_columns[j]->insert_from(*key_columns[j], row_id);
465
1.89k
    }
466
780
    limit_heap.emplace(limit_columns[0]->size() - 1, limit_columns, order_directions,
467
780
                       null_directions);
468
469
780
    limit_heap.pop();
470
780
    limit_columns_min = limit_heap.top()._row_id;
471
780
}
472
473
} // namespace doris::pipeline