Coverage Report

Created: 2025-05-09 10:08

/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
642k
                                                       const std::string& name) {
39
642k
    source_deps.push_back(std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY"));
40
642k
    source_deps.back()->set_shared_state(this);
41
642k
    return source_deps.back().get();
42
642k
}
43
44
void BasicSharedState::create_source_dependencies(int num_sources, int operator_id, int node_id,
45
60.5k
                                                  const std::string& name) {
46
60.5k
    source_deps.resize(num_sources, nullptr);
47
387k
    for (auto& source_dep : source_deps) {
48
387k
        source_dep = std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY");
49
387k
        source_dep->set_shared_state(this);
50
387k
    }
51
60.5k
}
52
53
Dependency* BasicSharedState::create_sink_dependency(int dest_id, int node_id,
54
892k
                                                     const std::string& name) {
55
892k
    sink_deps.push_back(std::make_shared<Dependency>(dest_id, node_id, name + "_DEPENDENCY", true));
56
892k
    sink_deps.back()->set_shared_state(this);
57
892k
    return sink_deps.back().get();
58
892k
}
59
60
4.25M
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
4.25M
    _blocked_task.push_back(task);
65
4.25M
}
66
67
686M
void Dependency::set_ready() {
68
686M
    if (_ready) {
69
639M
        return;
70
639M
    }
71
46.2M
    _watcher.stop();
72
46.2M
    std::vector<std::weak_ptr<PipelineTask>> local_block_task {};
73
46.2M
    {
74
46.2M
        std::unique_lock<std::mutex> lc(_task_lock);
75
46.2M
        if (_ready) {
76
51
            return;
77
51
        }
78
46.2M
        _ready = true;
79
46.2M
        local_block_task.swap(_blocked_task);
80
46.2M
    }
81
4.25M
    for (auto task : local_block_task) {
82
4.25M
        if (auto t = task.lock()) {
83
4.25M
            std::unique_lock<std::mutex> lc(_task_lock);
84
4.25M
            THROW_IF_ERROR(t->wake_up(this));
85
4.25M
        }
86
4.25M
    }
87
46.2M
}
88
89
34.1M
Dependency* Dependency::is_blocked_by(std::shared_ptr<PipelineTask> task) {
90
34.1M
    std::unique_lock<std::mutex> lc(_task_lock);
91
34.1M
    auto ready = _ready.load();
92
34.1M
    if (!ready && task) {
93
4.25M
        _add_block_task(task);
94
4.25M
        start_watcher();
95
4.25M
        THROW_IF_ERROR(task->blocked(this));
96
4.25M
    }
97
34.1M
    return ready ? nullptr : this;
98
34.1M
}
99
100
295k
std::string Dependency::debug_string(int indentation_level) {
101
295k
    fmt::memory_buffer debug_string_buffer;
102
295k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, block task = {}, ready={}, _always_ready={}",
103
295k
                   std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(),
104
295k
                   _ready, _always_ready);
105
295k
    return fmt::to_string(debug_string_buffer);
106
295k
}
107
108
5.00k
std::string CountedFinishDependency::debug_string(int indentation_level) {
109
5.00k
    fmt::memory_buffer debug_string_buffer;
110
5.00k
    fmt::format_to(debug_string_buffer,
111
5.00k
                   "{}{}: id={}, block_task={}, ready={}, _always_ready={}, count={}",
112
5.00k
                   std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(),
113
5.00k
                   _ready, _always_ready, _counter);
114
5.00k
    return fmt::to_string(debug_string_buffer);
115
5.00k
}
116
117
2.17k
void RuntimeFilterTimer::call_timeout() {
118
2.17k
    _parent->set_ready();
119
2.17k
}
120
121
27.7k
void RuntimeFilterTimer::call_ready() {
122
27.7k
    _parent->set_ready();
123
27.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
1.45M
bool RuntimeFilterTimer::should_be_check_timeout() {
129
1.45M
    if (!_parent->ready() && !_local_runtime_filter_dependencies.empty()) {
130
16.1k
        bool all_ready = true;
131
16.1k
        for (auto& dep : _local_runtime_filter_dependencies) {
132
16.1k
            if (!dep->ready()) {
133
16.0k
                all_ready = false;
134
16.0k
                break;
135
16.0k
            }
136
16.1k
        }
137
16.1k
        if (all_ready) {
138
72
            _local_runtime_filter_dependencies.clear();
139
72
            _registration_time = MonotonicMillis();
140
72
        }
141
16.1k
        return all_ready;
142
16.1k
    }
143
1.44M
    return true;
144
1.45M
}
145
146
4
void RuntimeFilterTimerQueue::start() {
147
148k
    while (!_stop) {
148
148k
        std::unique_lock<std::mutex> lk(cv_m);
149
150
152k
        while (_que.empty() && !_stop) {
151
9.26k
            cv.wait_for(lk, std::chrono::seconds(3), [this] { return !_que.empty() || _stop; });
152
4.63k
        }
153
148k
        if (_stop) {
154
1
            break;
155
1
        }
156
148k
        {
157
148k
            std::unique_lock<std::mutex> lc(_que_lock);
158
148k
            std::list<std::shared_ptr<pipeline::RuntimeFilterTimer>> new_que;
159
1.45M
            for (auto& it : _que) {
160
1.45M
                if (it.use_count() == 1) {
161
                    // `use_count == 1` means this runtime filter has been released
162
1.45M
                } else if (it->should_be_check_timeout()) {
163
1.44M
                    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
1.41M
                        int64_t ms_since_registration = MonotonicMillis() - it->registration_time();
166
1.41M
                        if (ms_since_registration > it->wait_time_ms()) {
167
2.17k
                            it->call_timeout();
168
1.41M
                        } else {
169
1.41M
                            new_que.push_back(std::move(it));
170
1.41M
                        }
171
1.41M
                    }
172
1.44M
                } else {
173
16.0k
                    new_que.push_back(std::move(it));
174
16.0k
                }
175
1.45M
            }
176
148k
            new_que.swap(_que);
177
148k
        }
178
148k
        std::this_thread::sleep_for(std::chrono::milliseconds(interval));
179
148k
    }
180
4
    _shutdown = true;
181
4
}
182
183
151k
void LocalExchangeSharedState::sub_running_sink_operators() {
184
151k
    std::unique_lock<std::mutex> lc(le_lock);
185
151k
    if (exchanger->_running_sink_operators.fetch_sub(1) == 1) {
186
57.5k
        _set_always_ready();
187
57.5k
    }
188
151k
}
189
190
371k
void LocalExchangeSharedState::sub_running_source_operators() {
191
371k
    std::unique_lock<std::mutex> lc(le_lock);
192
371k
    if (exchanger->_running_source_operators.fetch_sub(1) == 1) {
193
57.5k
        _set_always_ready();
194
57.5k
        exchanger->finalize();
195
57.5k
    }
196
371k
}
197
198
57.5k
LocalExchangeSharedState::LocalExchangeSharedState(int num_instances) {
199
57.5k
    source_deps.resize(num_instances, nullptr);
200
57.5k
    mem_counters.resize(num_instances, nullptr);
201
57.5k
}
202
203
85
vectorized::MutableColumns AggSharedState::_get_keys_hash_table() {
204
85
    return std::visit(
205
85
            vectorized::Overload {
206
85
                    [&](std::monostate& arg) {
207
0
                        throw doris::Exception(ErrorCode::INTERNAL_ERROR, "uninited hash table");
208
0
                        return vectorized::MutableColumns();
209
0
                    },
210
85
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
85
                        vectorized::MutableColumns key_columns;
212
224
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
139
                            key_columns.emplace_back(
214
139
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
139
                        }
216
85
                        auto& data = *agg_method.hash_table;
217
85
                        bool has_null_key = data.has_null_key_data();
218
85
                        const auto size = data.size() - has_null_key;
219
85
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
85
                        std::vector<KeyType> keys(size);
221
222
85
                        size_t num_rows = 0;
223
85
                        auto iter = aggregate_data_container->begin();
224
85
                        {
225
37.3k
                            while (iter != aggregate_data_container->end()) {
226
37.2k
                                keys[num_rows] = iter.get_key<KeyType>();
227
37.2k
                                ++iter;
228
37.2k
                                ++num_rows;
229
37.2k
                            }
230
85
                        }
231
85
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
85
                        if (has_null_key) {
233
2
                            key_columns[0]->insert_data(nullptr, 0);
234
2
                        }
235
85
                        return key_columns;
236
85
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
Line
Count
Source
210
7
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
7
                        vectorized::MutableColumns key_columns;
212
29
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
22
                            key_columns.emplace_back(
214
22
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
22
                        }
216
7
                        auto& data = *agg_method.hash_table;
217
7
                        bool has_null_key = data.has_null_key_data();
218
7
                        const auto size = data.size() - has_null_key;
219
7
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
7
                        std::vector<KeyType> keys(size);
221
222
7
                        size_t num_rows = 0;
223
7
                        auto iter = aggregate_data_container->begin();
224
7
                        {
225
16.2k
                            while (iter != aggregate_data_container->end()) {
226
16.2k
                                keys[num_rows] = iter.get_key<KeyType>();
227
16.2k
                                ++iter;
228
16.2k
                                ++num_rows;
229
16.2k
                            }
230
7
                        }
231
7
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
7
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
7
                        return key_columns;
236
7
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_
Line
Count
Source
210
2
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
2
                        vectorized::MutableColumns key_columns;
212
4
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
2
                            key_columns.emplace_back(
214
2
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
2
                        }
216
2
                        auto& data = *agg_method.hash_table;
217
2
                        bool has_null_key = data.has_null_key_data();
218
2
                        const auto size = data.size() - has_null_key;
219
2
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
2
                        std::vector<KeyType> keys(size);
221
222
2
                        size_t num_rows = 0;
223
2
                        auto iter = aggregate_data_container->begin();
224
2
                        {
225
12
                            while (iter != aggregate_data_container->end()) {
226
10
                                keys[num_rows] = iter.get_key<KeyType>();
227
10
                                ++iter;
228
10
                                ++num_rows;
229
10
                            }
230
2
                        }
231
2
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
2
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
2
                        return key_columns;
236
2
                    }},
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
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
20
                            while (iter != aggregate_data_container->end()) {
226
10
                                keys[num_rows] = iter.get_key<KeyType>();
227
10
                                ++iter;
228
10
                                ++num_rows;
229
10
                            }
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
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISH_EESaISK_EEOT_
Line
Count
Source
210
6
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
6
                        vectorized::MutableColumns key_columns;
212
12
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
6
                            key_columns.emplace_back(
214
6
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
6
                        }
216
6
                        auto& data = *agg_method.hash_table;
217
6
                        bool has_null_key = data.has_null_key_data();
218
6
                        const auto size = data.size() - has_null_key;
219
6
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
6
                        std::vector<KeyType> keys(size);
221
222
6
                        size_t num_rows = 0;
223
6
                        auto iter = aggregate_data_container->begin();
224
6
                        {
225
27
                            while (iter != aggregate_data_container->end()) {
226
21
                                keys[num_rows] = iter.get_key<KeyType>();
227
21
                                ++iter;
228
21
                                ++num_rows;
229
21
                            }
230
6
                        }
231
6
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
6
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
6
                        return key_columns;
236
6
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_
Line
Count
Source
210
3
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
3
                        vectorized::MutableColumns key_columns;
212
6
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
3
                            key_columns.emplace_back(
214
3
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
3
                        }
216
3
                        auto& data = *agg_method.hash_table;
217
3
                        bool has_null_key = data.has_null_key_data();
218
3
                        const auto size = data.size() - has_null_key;
219
3
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
3
                        std::vector<KeyType> keys(size);
221
222
3
                        size_t num_rows = 0;
223
3
                        auto iter = aggregate_data_container->begin();
224
3
                        {
225
39
                            while (iter != aggregate_data_container->end()) {
226
36
                                keys[num_rows] = iter.get_key<KeyType>();
227
36
                                ++iter;
228
36
                                ++num_rows;
229
36
                            }
230
3
                        }
231
3
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
3
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
3
                        return key_columns;
236
3
                    }},
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
6
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
6
                        vectorized::MutableColumns key_columns;
212
12
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
6
                            key_columns.emplace_back(
214
6
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
6
                        }
216
6
                        auto& data = *agg_method.hash_table;
217
6
                        bool has_null_key = data.has_null_key_data();
218
6
                        const auto size = data.size() - has_null_key;
219
6
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
6
                        std::vector<KeyType> keys(size);
221
222
6
                        size_t num_rows = 0;
223
6
                        auto iter = aggregate_data_container->begin();
224
6
                        {
225
5.90k
                            while (iter != aggregate_data_container->end()) {
226
5.89k
                                keys[num_rows] = iter.get_key<KeyType>();
227
5.89k
                                ++iter;
228
5.89k
                                ++num_rows;
229
5.89k
                            }
230
6
                        }
231
6
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
6
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
6
                        return key_columns;
236
6
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_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
7.95k
                            while (iter != aggregate_data_container->end()) {
226
7.94k
                                keys[num_rows] = iter.get_key<KeyType>();
227
7.94k
                                ++iter;
228
7.94k
                                ++num_rows;
229
7.94k
                            }
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
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISL_EESaISO_EEOT_
Line
Count
Source
210
3
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
3
                        vectorized::MutableColumns key_columns;
212
6
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
3
                            key_columns.emplace_back(
214
3
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
3
                        }
216
3
                        auto& data = *agg_method.hash_table;
217
3
                        bool has_null_key = data.has_null_key_data();
218
3
                        const auto size = data.size() - has_null_key;
219
3
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
3
                        std::vector<KeyType> keys(size);
221
222
3
                        size_t num_rows = 0;
223
3
                        auto iter = aggregate_data_container->begin();
224
3
                        {
225
7
                            while (iter != aggregate_data_container->end()) {
226
4
                                keys[num_rows] = iter.get_key<KeyType>();
227
4
                                ++iter;
228
4
                                ++num_rows;
229
4
                            }
230
3
                        }
231
3
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
3
                        if (has_null_key) {
233
1
                            key_columns[0]->insert_data(nullptr, 0);
234
1
                        }
235
3
                        return key_columns;
236
3
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISL_EESaISO_EEOT_
Line
Count
Source
210
2
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
2
                        vectorized::MutableColumns key_columns;
212
4
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
2
                            key_columns.emplace_back(
214
2
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
2
                        }
216
2
                        auto& data = *agg_method.hash_table;
217
2
                        bool has_null_key = data.has_null_key_data();
218
2
                        const auto size = data.size() - has_null_key;
219
2
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
2
                        std::vector<KeyType> keys(size);
221
222
2
                        size_t num_rows = 0;
223
2
                        auto iter = aggregate_data_container->begin();
224
2
                        {
225
13
                            while (iter != aggregate_data_container->end()) {
226
11
                                keys[num_rows] = iter.get_key<KeyType>();
227
11
                                ++iter;
228
11
                                ++num_rows;
229
11
                            }
230
2
                        }
231
2
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
2
                        if (has_null_key) {
233
1
                            key_columns[0]->insert_data(nullptr, 0);
234
1
                        }
235
2
                        return key_columns;
236
2
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISM_EESaISP_EEOT_
Line
Count
Source
210
3
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
3
                        vectorized::MutableColumns key_columns;
212
6
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
3
                            key_columns.emplace_back(
214
3
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
3
                        }
216
3
                        auto& data = *agg_method.hash_table;
217
3
                        bool has_null_key = data.has_null_key_data();
218
3
                        const auto size = data.size() - has_null_key;
219
3
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
3
                        std::vector<KeyType> keys(size);
221
222
3
                        size_t num_rows = 0;
223
3
                        auto iter = aggregate_data_container->begin();
224
3
                        {
225
24
                            while (iter != aggregate_data_container->end()) {
226
21
                                keys[num_rows] = iter.get_key<KeyType>();
227
21
                                ++iter;
228
21
                                ++num_rows;
229
21
                            }
230
3
                        }
231
3
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
3
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
3
                        return key_columns;
236
3
                    }},
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
12
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
12
                        vectorized::MutableColumns key_columns;
212
24
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
12
                            key_columns.emplace_back(
214
12
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
12
                        }
216
12
                        auto& data = *agg_method.hash_table;
217
12
                        bool has_null_key = data.has_null_key_data();
218
12
                        const auto size = data.size() - has_null_key;
219
12
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
12
                        std::vector<KeyType> keys(size);
221
222
12
                        size_t num_rows = 0;
223
12
                        auto iter = aggregate_data_container->begin();
224
12
                        {
225
447
                            while (iter != aggregate_data_container->end()) {
226
435
                                keys[num_rows] = iter.get_key<KeyType>();
227
435
                                ++iter;
228
435
                                ++num_rows;
229
435
                            }
230
12
                        }
231
12
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
12
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
12
                        return key_columns;
236
12
                    }},
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
21
                    [&](auto&& agg_method) -> vectorized::MutableColumns {
211
21
                        vectorized::MutableColumns key_columns;
212
81
                        for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
213
60
                            key_columns.emplace_back(
214
60
                                    probe_expr_ctxs[i]->root()->data_type()->create_column());
215
60
                        }
216
21
                        auto& data = *agg_method.hash_table;
217
21
                        bool has_null_key = data.has_null_key_data();
218
21
                        const auto size = data.size() - has_null_key;
219
21
                        using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>;
220
21
                        std::vector<KeyType> keys(size);
221
222
21
                        size_t num_rows = 0;
223
21
                        auto iter = aggregate_data_container->begin();
224
21
                        {
225
6.69k
                            while (iter != aggregate_data_container->end()) {
226
6.67k
                                keys[num_rows] = iter.get_key<KeyType>();
227
6.67k
                                ++iter;
228
6.67k
                                ++num_rows;
229
6.67k
                            }
230
21
                        }
231
21
                        agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
232
21
                        if (has_null_key) {
233
0
                            key_columns[0]->insert_data(nullptr, 0);
234
0
                        }
235
21
                        return key_columns;
236
21
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
237
85
            agg_data->method_variant);
238
85
}
239
240
85
void AggSharedState::build_limit_heap(size_t hash_table_size) {
241
85
    limit_columns = _get_keys_hash_table();
242
37.2k
    for (size_t i = 0; i < hash_table_size; ++i) {
243
37.1k
        limit_heap.emplace(i, limit_columns, order_directions, null_directions);
244
37.1k
    }
245
36.9k
    while (hash_table_size > limit) {
246
36.8k
        limit_heap.pop();
247
36.8k
        hash_table_size--;
248
36.8k
    }
249
85
    limit_columns_min = limit_heap.top()._row_id;
250
85
}
251
252
bool AggSharedState::do_limit_filter(vectorized::Block* block, size_t num_rows,
253
354
                                     const std::vector<int>* key_locs) {
254
354
    if (num_rows) {
255
354
        cmp_res.resize(num_rows);
256
354
        need_computes.resize(num_rows);
257
354
        memset(need_computes.data(), 0, need_computes.size());
258
354
        memset(cmp_res.data(), 0, cmp_res.size());
259
260
354
        const auto key_size = null_directions.size();
261
1.03k
        for (int i = 0; i < key_size; i++) {
262
680
            block->get_by_position(key_locs ? key_locs->operator[](i) : i)
263
680
                    .column->compare_internal(limit_columns_min, *limit_columns[i],
264
680
                                              null_directions[i], order_directions[i], cmp_res,
265
680
                                              need_computes.data());
266
680
        }
267
268
354
        auto set_computes_arr = [](auto* __restrict res, auto* __restrict computes, size_t rows) {
269
759k
            for (size_t i = 0; i < rows; ++i) {
270
759k
                computes[i] = computes[i] == res[i];
271
759k
            }
272
354
        };
273
354
        set_computes_arr(cmp_res.data(), need_computes.data(), num_rows);
274
275
354
        return std::find(need_computes.begin(), need_computes.end(), 0) != need_computes.end();
276
354
    }
277
278
0
    return false;
279
354
}
280
281
32.4k
Status AggSharedState::reset_hash_table() {
282
32.4k
    return std::visit(
283
32.4k
            vectorized::Overload {
284
32.4k
                    [&](std::monostate& arg) -> Status {
285
0
                        return Status::InternalError("Uninited hash table");
286
0
                    },
287
32.4k
                    [&](auto& agg_method) {
288
32.4k
                        auto& hash_table = *agg_method.hash_table;
289
32.4k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
32.4k
                        agg_method.reset();
292
293
1.51M
                        hash_table.for_each_mapped([&](auto& mapped) {
294
1.51M
                            if (mapped) {
295
1.51M
                                static_cast<void>(_destroy_agg_status(mapped));
296
1.51M
                                mapped = nullptr;
297
1.51M
                            }
298
1.51M
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_
Line
Count
Source
293
43.1k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
43.1k
                            if (mapped) {
295
43.1k
                                static_cast<void>(_destroy_agg_status(mapped));
296
43.1k
                                mapped = nullptr;
297
43.1k
                            }
298
43.1k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
293
2
                        hash_table.for_each_mapped([&](auto& mapped) {
294
2
                            if (mapped) {
295
2
                                static_cast<void>(_destroy_agg_status(mapped));
296
2
                                mapped = nullptr;
297
2
                            }
298
2
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
293
6
                        hash_table.for_each_mapped([&](auto& mapped) {
294
6
                            if (mapped) {
295
6
                                static_cast<void>(_destroy_agg_status(mapped));
296
6
                                mapped = nullptr;
297
6
                            }
298
6
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
293
85.1k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
85.1k
                            if (mapped) {
295
85.1k
                                static_cast<void>(_destroy_agg_status(mapped));
296
85.1k
                                mapped = nullptr;
297
85.1k
                            }
298
85.1k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
293
45.3k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
45.3k
                            if (mapped) {
295
45.3k
                                static_cast<void>(_destroy_agg_status(mapped));
296
45.3k
                                mapped = nullptr;
297
45.3k
                            }
298
45.3k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEEDaRT_ENKUlSE_E_clIS7_EEDaSE_
Line
Count
Source
293
769
                        hash_table.for_each_mapped([&](auto& mapped) {
294
769
                            if (mapped) {
295
769
                                static_cast<void>(_destroy_agg_status(mapped));
296
769
                                mapped = nullptr;
297
769
                            }
298
769
                        });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_
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.05M
                        hash_table.for_each_mapped([&](auto& mapped) {
294
1.05M
                            if (mapped) {
295
1.05M
                                static_cast<void>(_destroy_agg_status(mapped));
296
1.05M
                                mapped = nullptr;
297
1.05M
                            }
298
1.05M
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEDaRT_ENKUlSF_E_clIS7_EEDaSF_
Line
Count
Source
293
39.8k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
39.8k
                            if (mapped) {
295
39.8k
                                static_cast<void>(_destroy_agg_status(mapped));
296
39.8k
                                mapped = nullptr;
297
39.8k
                            }
298
39.8k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
293
70
                        hash_table.for_each_mapped([&](auto& mapped) {
294
70
                            if (mapped) {
295
70
                                static_cast<void>(_destroy_agg_status(mapped));
296
70
                                mapped = nullptr;
297
70
                            }
298
70
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
293
118
                        hash_table.for_each_mapped([&](auto& mapped) {
294
118
                            if (mapped) {
295
118
                                static_cast<void>(_destroy_agg_status(mapped));
296
118
                                mapped = nullptr;
297
118
                            }
298
118
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
293
38.0k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
38.0k
                            if (mapped) {
295
38.0k
                                static_cast<void>(_destroy_agg_status(mapped));
296
38.0k
                                mapped = nullptr;
297
38.0k
                            }
298
38.0k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
293
871
                        hash_table.for_each_mapped([&](auto& mapped) {
294
871
                            if (mapped) {
295
871
                                static_cast<void>(_destroy_agg_status(mapped));
296
871
                                mapped = nullptr;
297
871
                            }
298
871
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_ENKUlSJ_E_clIS9_EEDaSJ_
Line
Count
Source
293
31.7k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
31.7k
                            if (mapped) {
295
31.7k
                                static_cast<void>(_destroy_agg_status(mapped));
296
31.7k
                                mapped = nullptr;
297
31.7k
                            }
298
31.7k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_ENKUlSJ_E_clIS9_EEDaSJ_
Line
Count
Source
293
718
                        hash_table.for_each_mapped([&](auto& mapped) {
294
718
                            if (mapped) {
295
718
                                static_cast<void>(_destroy_agg_status(mapped));
296
718
                                mapped = nullptr;
297
718
                            }
298
718
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ENKUlSK_E_clISC_EEDaSK_
Line
Count
Source
293
732
                        hash_table.for_each_mapped([&](auto& mapped) {
294
732
                            if (mapped) {
295
732
                                static_cast<void>(_destroy_agg_status(mapped));
296
732
                                mapped = nullptr;
297
732
                            }
298
732
                        });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ENKUlSK_E_clISC_EEDaSK_
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEEEEEEDaRT_ENKUlSI_E_clIS9_EEDaSI_
Line
Count
Source
293
9.27k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
9.27k
                            if (mapped) {
295
9.27k
                                static_cast<void>(_destroy_agg_status(mapped));
296
9.27k
                                mapped = nullptr;
297
9.27k
                            }
298
9.27k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
293
125k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
125k
                            if (mapped) {
295
125k
                                static_cast<void>(_destroy_agg_status(mapped));
296
125k
                                mapped = nullptr;
297
125k
                            }
298
125k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_
Line
Count
Source
293
23.7k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
23.7k
                            if (mapped) {
295
23.7k
                                static_cast<void>(_destroy_agg_status(mapped));
296
23.7k
                                mapped = nullptr;
297
23.7k
                            }
298
23.7k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_
Line
Count
Source
293
10.8k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
10.8k
                            if (mapped) {
295
10.8k
                                static_cast<void>(_destroy_agg_status(mapped));
296
10.8k
                                mapped = nullptr;
297
10.8k
                            }
298
10.8k
                        });
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_
Line
Count
Source
293
2.78k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
2.79k
                            if (mapped) {
295
2.79k
                                static_cast<void>(_destroy_agg_status(mapped));
296
2.79k
                                mapped = nullptr;
297
2.79k
                            }
298
2.78k
                        });
299
300
32.4k
                        if (hash_table.has_null_key_data()) {
301
207
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
207
                                                          vectorized::AggregateDataPtr>());
303
207
                            RETURN_IF_ERROR(st);
304
207
                        }
305
306
32.4k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
32.4k
                                sizeof(typename HashTableType::key_type),
308
32.4k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
32.4k
                                 align_aggregate_states) *
310
32.4k
                                        align_aggregate_states));
311
32.4k
                        agg_method.hash_table.reset(new HashTableType());
312
32.4k
                        agg_arena_pool.reset(new vectorized::Arena);
313
32.4k
                        return Status::OK();
314
32.4k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEDaRT_
Line
Count
Source
287
7.91k
                    [&](auto& agg_method) {
288
7.91k
                        auto& hash_table = *agg_method.hash_table;
289
7.91k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
7.91k
                        agg_method.reset();
292
293
7.91k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
7.91k
                            if (mapped) {
295
7.91k
                                static_cast<void>(_destroy_agg_status(mapped));
296
7.91k
                                mapped = nullptr;
297
7.91k
                            }
298
7.91k
                        });
299
300
7.91k
                        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.91k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
7.91k
                                sizeof(typename HashTableType::key_type),
308
7.91k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
7.91k
                                 align_aggregate_states) *
310
7.91k
                                        align_aggregate_states));
311
7.91k
                        agg_method.hash_table.reset(new HashTableType());
312
7.91k
                        agg_arena_pool.reset(new vectorized::Arena);
313
7.91k
                        return Status::OK();
314
7.91k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEDaRT_
Line
Count
Source
287
3
                    [&](auto& agg_method) {
288
3
                        auto& hash_table = *agg_method.hash_table;
289
3
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
3
                        agg_method.reset();
292
293
3
                        hash_table.for_each_mapped([&](auto& mapped) {
294
3
                            if (mapped) {
295
3
                                static_cast<void>(_destroy_agg_status(mapped));
296
3
                                mapped = nullptr;
297
3
                            }
298
3
                        });
299
300
3
                        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
                        aggregate_data_container.reset(new AggregateDataContainer(
307
3
                                sizeof(typename HashTableType::key_type),
308
3
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
3
                                 align_aggregate_states) *
310
3
                                        align_aggregate_states));
311
3
                        agg_method.hash_table.reset(new HashTableType());
312
3
                        agg_arena_pool.reset(new vectorized::Arena);
313
3
                        return Status::OK();
314
3
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_
Line
Count
Source
287
8
                    [&](auto& agg_method) {
288
8
                        auto& hash_table = *agg_method.hash_table;
289
8
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
8
                        agg_method.reset();
292
293
8
                        hash_table.for_each_mapped([&](auto& mapped) {
294
8
                            if (mapped) {
295
8
                                static_cast<void>(_destroy_agg_status(mapped));
296
8
                                mapped = nullptr;
297
8
                            }
298
8
                        });
299
300
8
                        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
                        aggregate_data_container.reset(new AggregateDataContainer(
307
8
                                sizeof(typename HashTableType::key_type),
308
8
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
8
                                 align_aggregate_states) *
310
8
                                        align_aggregate_states));
311
8
                        agg_method.hash_table.reset(new HashTableType());
312
8
                        agg_arena_pool.reset(new vectorized::Arena);
313
8
                        return Status::OK();
314
8
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEDaRT_
Line
Count
Source
287
690
                    [&](auto& agg_method) {
288
690
                        auto& hash_table = *agg_method.hash_table;
289
690
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
690
                        agg_method.reset();
292
293
690
                        hash_table.for_each_mapped([&](auto& mapped) {
294
690
                            if (mapped) {
295
690
                                static_cast<void>(_destroy_agg_status(mapped));
296
690
                                mapped = nullptr;
297
690
                            }
298
690
                        });
299
300
690
                        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
690
                        aggregate_data_container.reset(new AggregateDataContainer(
307
690
                                sizeof(typename HashTableType::key_type),
308
690
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
690
                                 align_aggregate_states) *
310
690
                                        align_aggregate_states));
311
690
                        agg_method.hash_table.reset(new HashTableType());
312
690
                        agg_arena_pool.reset(new vectorized::Arena);
313
690
                        return Status::OK();
314
690
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_
Line
Count
Source
287
545
                    [&](auto& agg_method) {
288
545
                        auto& hash_table = *agg_method.hash_table;
289
545
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
545
                        agg_method.reset();
292
293
545
                        hash_table.for_each_mapped([&](auto& mapped) {
294
545
                            if (mapped) {
295
545
                                static_cast<void>(_destroy_agg_status(mapped));
296
545
                                mapped = nullptr;
297
545
                            }
298
545
                        });
299
300
545
                        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
545
                        aggregate_data_container.reset(new AggregateDataContainer(
307
545
                                sizeof(typename HashTableType::key_type),
308
545
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
545
                                 align_aggregate_states) *
310
545
                                        align_aggregate_states));
311
545
                        agg_method.hash_table.reset(new HashTableType());
312
545
                        agg_arena_pool.reset(new vectorized::Arena);
313
545
                        return Status::OK();
314
545
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEEDaRT_
Line
Count
Source
287
442
                    [&](auto& agg_method) {
288
442
                        auto& hash_table = *agg_method.hash_table;
289
442
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
442
                        agg_method.reset();
292
293
442
                        hash_table.for_each_mapped([&](auto& mapped) {
294
442
                            if (mapped) {
295
442
                                static_cast<void>(_destroy_agg_status(mapped));
296
442
                                mapped = nullptr;
297
442
                            }
298
442
                        });
299
300
442
                        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
442
                        aggregate_data_container.reset(new AggregateDataContainer(
307
442
                                sizeof(typename HashTableType::key_type),
308
442
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
442
                                 align_aggregate_states) *
310
442
                                        align_aggregate_states));
311
442
                        agg_method.hash_table.reset(new HashTableType());
312
442
                        agg_arena_pool.reset(new vectorized::Arena);
313
442
                        return Status::OK();
314
442
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEDaRT_
Line
Count
Source
287
348
                    [&](auto& agg_method) {
288
348
                        auto& hash_table = *agg_method.hash_table;
289
348
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
348
                        agg_method.reset();
292
293
348
                        hash_table.for_each_mapped([&](auto& mapped) {
294
348
                            if (mapped) {
295
348
                                static_cast<void>(_destroy_agg_status(mapped));
296
348
                                mapped = nullptr;
297
348
                            }
298
348
                        });
299
300
348
                        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
348
                        aggregate_data_container.reset(new AggregateDataContainer(
307
348
                                sizeof(typename HashTableType::key_type),
308
348
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
348
                                 align_aggregate_states) *
310
348
                                        align_aggregate_states));
311
348
                        agg_method.hash_table.reset(new HashTableType());
312
348
                        agg_arena_pool.reset(new vectorized::Arena);
313
348
                        return Status::OK();
314
348
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEDaRT_
Line
Count
Source
287
400
                    [&](auto& agg_method) {
288
400
                        auto& hash_table = *agg_method.hash_table;
289
400
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
400
                        agg_method.reset();
292
293
400
                        hash_table.for_each_mapped([&](auto& mapped) {
294
400
                            if (mapped) {
295
400
                                static_cast<void>(_destroy_agg_status(mapped));
296
400
                                mapped = nullptr;
297
400
                            }
298
400
                        });
299
300
400
                        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
400
                        aggregate_data_container.reset(new AggregateDataContainer(
307
400
                                sizeof(typename HashTableType::key_type),
308
400
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
400
                                 align_aggregate_states) *
310
400
                                        align_aggregate_states));
311
400
                        agg_method.hash_table.reset(new HashTableType());
312
400
                        agg_arena_pool.reset(new vectorized::Arena);
313
400
                        return Status::OK();
314
400
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_
Line
Count
Source
287
86
                    [&](auto& agg_method) {
288
86
                        auto& hash_table = *agg_method.hash_table;
289
86
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
86
                        agg_method.reset();
292
293
86
                        hash_table.for_each_mapped([&](auto& mapped) {
294
86
                            if (mapped) {
295
86
                                static_cast<void>(_destroy_agg_status(mapped));
296
86
                                mapped = nullptr;
297
86
                            }
298
86
                        });
299
300
86
                        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
86
                        aggregate_data_container.reset(new AggregateDataContainer(
307
86
                                sizeof(typename HashTableType::key_type),
308
86
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
86
                                 align_aggregate_states) *
310
86
                                        align_aggregate_states));
311
86
                        agg_method.hash_table.reset(new HashTableType());
312
86
                        agg_arena_pool.reset(new vectorized::Arena);
313
86
                        return Status::OK();
314
86
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_
Line
Count
Source
287
171
                    [&](auto& agg_method) {
288
171
                        auto& hash_table = *agg_method.hash_table;
289
171
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
171
                        agg_method.reset();
292
293
171
                        hash_table.for_each_mapped([&](auto& mapped) {
294
171
                            if (mapped) {
295
171
                                static_cast<void>(_destroy_agg_status(mapped));
296
171
                                mapped = nullptr;
297
171
                            }
298
171
                        });
299
300
171
                        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
171
                        aggregate_data_container.reset(new AggregateDataContainer(
307
171
                                sizeof(typename HashTableType::key_type),
308
171
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
171
                                 align_aggregate_states) *
310
171
                                        align_aggregate_states));
311
171
                        agg_method.hash_table.reset(new HashTableType());
312
171
                        agg_arena_pool.reset(new vectorized::Arena);
313
171
                        return Status::OK();
314
171
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_
Line
Count
Source
287
2.27k
                    [&](auto& agg_method) {
288
2.27k
                        auto& hash_table = *agg_method.hash_table;
289
2.27k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
2.27k
                        agg_method.reset();
292
293
2.27k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
2.27k
                            if (mapped) {
295
2.27k
                                static_cast<void>(_destroy_agg_status(mapped));
296
2.27k
                                mapped = nullptr;
297
2.27k
                            }
298
2.27k
                        });
299
300
2.27k
                        if (hash_table.has_null_key_data()) {
301
129
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
129
                                                          vectorized::AggregateDataPtr>());
303
129
                            RETURN_IF_ERROR(st);
304
129
                        }
305
306
2.27k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
2.27k
                                sizeof(typename HashTableType::key_type),
308
2.27k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
2.27k
                                 align_aggregate_states) *
310
2.27k
                                        align_aggregate_states));
311
2.27k
                        agg_method.hash_table.reset(new HashTableType());
312
2.27k
                        agg_arena_pool.reset(new vectorized::Arena);
313
2.27k
                        return Status::OK();
314
2.27k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_
Line
Count
Source
287
715
                    [&](auto& agg_method) {
288
715
                        auto& hash_table = *agg_method.hash_table;
289
715
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
715
                        agg_method.reset();
292
293
715
                        hash_table.for_each_mapped([&](auto& mapped) {
294
715
                            if (mapped) {
295
715
                                static_cast<void>(_destroy_agg_status(mapped));
296
715
                                mapped = nullptr;
297
715
                            }
298
715
                        });
299
300
715
                        if (hash_table.has_null_key_data()) {
301
15
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
15
                                                          vectorized::AggregateDataPtr>());
303
15
                            RETURN_IF_ERROR(st);
304
15
                        }
305
306
715
                        aggregate_data_container.reset(new AggregateDataContainer(
307
715
                                sizeof(typename HashTableType::key_type),
308
715
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
715
                                 align_aggregate_states) *
310
715
                                        align_aggregate_states));
311
715
                        agg_method.hash_table.reset(new HashTableType());
312
715
                        agg_arena_pool.reset(new vectorized::Arena);
313
715
                        return Status::OK();
314
715
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_
Line
Count
Source
287
1.39k
                    [&](auto& agg_method) {
288
1.39k
                        auto& hash_table = *agg_method.hash_table;
289
1.39k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
1.39k
                        agg_method.reset();
292
293
1.39k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
1.39k
                            if (mapped) {
295
1.39k
                                static_cast<void>(_destroy_agg_status(mapped));
296
1.39k
                                mapped = nullptr;
297
1.39k
                            }
298
1.39k
                        });
299
300
1.39k
                        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.39k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
1.39k
                                sizeof(typename HashTableType::key_type),
308
1.39k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
1.39k
                                 align_aggregate_states) *
310
1.39k
                                        align_aggregate_states));
311
1.39k
                        agg_method.hash_table.reset(new HashTableType());
312
1.39k
                        agg_arena_pool.reset(new vectorized::Arena);
313
1.39k
                        return Status::OK();
314
1.39k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_
Line
Count
Source
287
616
                    [&](auto& agg_method) {
288
616
                        auto& hash_table = *agg_method.hash_table;
289
616
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
616
                        agg_method.reset();
292
293
616
                        hash_table.for_each_mapped([&](auto& mapped) {
294
616
                            if (mapped) {
295
616
                                static_cast<void>(_destroy_agg_status(mapped));
296
616
                                mapped = nullptr;
297
616
                            }
298
616
                        });
299
300
616
                        if (hash_table.has_null_key_data()) {
301
22
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
22
                                                          vectorized::AggregateDataPtr>());
303
22
                            RETURN_IF_ERROR(st);
304
22
                        }
305
306
616
                        aggregate_data_container.reset(new AggregateDataContainer(
307
616
                                sizeof(typename HashTableType::key_type),
308
616
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
616
                                 align_aggregate_states) *
310
616
                                        align_aggregate_states));
311
616
                        agg_method.hash_table.reset(new HashTableType());
312
616
                        agg_arena_pool.reset(new vectorized::Arena);
313
616
                        return Status::OK();
314
616
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_
Line
Count
Source
287
903
                    [&](auto& agg_method) {
288
903
                        auto& hash_table = *agg_method.hash_table;
289
903
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
903
                        agg_method.reset();
292
293
903
                        hash_table.for_each_mapped([&](auto& mapped) {
294
903
                            if (mapped) {
295
903
                                static_cast<void>(_destroy_agg_status(mapped));
296
903
                                mapped = nullptr;
297
903
                            }
298
903
                        });
299
300
903
                        if (hash_table.has_null_key_data()) {
301
15
                            auto st = _destroy_agg_status(hash_table.template get_null_key_data<
302
15
                                                          vectorized::AggregateDataPtr>());
303
15
                            RETURN_IF_ERROR(st);
304
15
                        }
305
306
903
                        aggregate_data_container.reset(new AggregateDataContainer(
307
903
                                sizeof(typename HashTableType::key_type),
308
903
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
903
                                 align_aggregate_states) *
310
903
                                        align_aggregate_states));
311
903
                        agg_method.hash_table.reset(new HashTableType());
312
903
                        agg_arena_pool.reset(new vectorized::Arena);
313
903
                        return Status::OK();
314
903
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEEEEEEDaRT_
Line
Count
Source
287
547
                    [&](auto& agg_method) {
288
547
                        auto& hash_table = *agg_method.hash_table;
289
547
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
547
                        agg_method.reset();
292
293
547
                        hash_table.for_each_mapped([&](auto& mapped) {
294
547
                            if (mapped) {
295
547
                                static_cast<void>(_destroy_agg_status(mapped));
296
547
                                mapped = nullptr;
297
547
                            }
298
547
                        });
299
300
547
                        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
547
                        aggregate_data_container.reset(new AggregateDataContainer(
307
547
                                sizeof(typename HashTableType::key_type),
308
547
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
547
                                 align_aggregate_states) *
310
547
                                        align_aggregate_states));
311
547
                        agg_method.hash_table.reset(new HashTableType());
312
547
                        agg_arena_pool.reset(new vectorized::Arena);
313
547
                        return Status::OK();
314
547
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_
Line
Count
Source
287
450
                    [&](auto& agg_method) {
288
450
                        auto& hash_table = *agg_method.hash_table;
289
450
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
450
                        agg_method.reset();
292
293
450
                        hash_table.for_each_mapped([&](auto& mapped) {
294
450
                            if (mapped) {
295
450
                                static_cast<void>(_destroy_agg_status(mapped));
296
450
                                mapped = nullptr;
297
450
                            }
298
450
                        });
299
300
450
                        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
450
                        aggregate_data_container.reset(new AggregateDataContainer(
307
450
                                sizeof(typename HashTableType::key_type),
308
450
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
450
                                 align_aggregate_states) *
310
450
                                        align_aggregate_states));
311
450
                        agg_method.hash_table.reset(new HashTableType());
312
450
                        agg_arena_pool.reset(new vectorized::Arena);
313
450
                        return Status::OK();
314
450
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEEDaRT_
Line
Count
Source
287
3.27k
                    [&](auto& agg_method) {
288
3.27k
                        auto& hash_table = *agg_method.hash_table;
289
3.27k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
3.27k
                        agg_method.reset();
292
293
3.27k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
3.27k
                            if (mapped) {
295
3.27k
                                static_cast<void>(_destroy_agg_status(mapped));
296
3.27k
                                mapped = nullptr;
297
3.27k
                            }
298
3.27k
                        });
299
300
3.27k
                        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.27k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
3.27k
                                sizeof(typename HashTableType::key_type),
308
3.27k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
3.27k
                                 align_aggregate_states) *
310
3.27k
                                        align_aggregate_states));
311
3.27k
                        agg_method.hash_table.reset(new HashTableType());
312
3.27k
                        agg_arena_pool.reset(new vectorized::Arena);
313
3.27k
                        return Status::OK();
314
3.27k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEEDaRT_
Line
Count
Source
287
9.14k
                    [&](auto& agg_method) {
288
9.14k
                        auto& hash_table = *agg_method.hash_table;
289
9.14k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
9.14k
                        agg_method.reset();
292
293
9.14k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
9.14k
                            if (mapped) {
295
9.14k
                                static_cast<void>(_destroy_agg_status(mapped));
296
9.14k
                                mapped = nullptr;
297
9.14k
                            }
298
9.14k
                        });
299
300
9.14k
                        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
9.14k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
9.14k
                                sizeof(typename HashTableType::key_type),
308
9.14k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
9.14k
                                 align_aggregate_states) *
310
9.14k
                                        align_aggregate_states));
311
9.14k
                        agg_method.hash_table.reset(new HashTableType());
312
9.14k
                        agg_arena_pool.reset(new vectorized::Arena);
313
9.14k
                        return Status::OK();
314
9.14k
                    }},
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEEDaRT_
Line
Count
Source
287
2.51k
                    [&](auto& agg_method) {
288
2.51k
                        auto& hash_table = *agg_method.hash_table;
289
2.51k
                        using HashTableType = std::decay_t<decltype(hash_table)>;
290
291
2.51k
                        agg_method.reset();
292
293
2.51k
                        hash_table.for_each_mapped([&](auto& mapped) {
294
2.51k
                            if (mapped) {
295
2.51k
                                static_cast<void>(_destroy_agg_status(mapped));
296
2.51k
                                mapped = nullptr;
297
2.51k
                            }
298
2.51k
                        });
299
300
2.51k
                        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.51k
                        aggregate_data_container.reset(new AggregateDataContainer(
307
2.51k
                                sizeof(typename HashTableType::key_type),
308
2.51k
                                ((total_size_of_aggregate_states + align_aggregate_states - 1) /
309
2.51k
                                 align_aggregate_states) *
310
2.51k
                                        align_aggregate_states));
311
2.51k
                        agg_method.hash_table.reset(new HashTableType());
312
2.51k
                        agg_arena_pool.reset(new vectorized::Arena);
313
2.51k
                        return Status::OK();
314
2.51k
                    }},
315
32.4k
            agg_data->method_variant);
316
32.4k
}
317
318
47.6k
void PartitionedAggSharedState::init_spill_params(size_t spill_partition_count) {
319
47.6k
    partition_count = spill_partition_count;
320
47.6k
    max_partition_index = partition_count - 1;
321
322
1.56M
    for (int i = 0; i < partition_count; ++i) {
323
1.52M
        spill_partitions.emplace_back(std::make_shared<AggSpillPartition>());
324
1.52M
    }
325
47.6k
}
326
327
47.0k
void PartitionedAggSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {
328
1.50M
    for (auto& partition : spill_partitions) {
329
1.50M
        if (partition->spilling_stream_) {
330
0
            partition->spilling_stream_->update_shared_profiles(source_profile);
331
0
        }
332
1.50M
        for (auto& stream : partition->spill_streams_) {
333
16.9k
            if (stream) {
334
16.9k
                stream->update_shared_profiles(source_profile);
335
16.9k
            }
336
16.9k
        }
337
1.50M
    }
338
47.0k
}
339
340
Status AggSpillPartition::get_spill_stream(RuntimeState* state, int node_id,
341
                                           RuntimeProfile* profile,
342
47.4k
                                           vectorized::SpillStreamSPtr& spill_stream) {
343
47.4k
    if (spilling_stream_) {
344
30.5k
        spill_stream = spilling_stream_;
345
30.5k
        return Status::OK();
346
30.5k
    }
347
16.9k
    RETURN_IF_ERROR(ExecEnv::GetInstance()->spill_stream_mgr()->register_spill_stream(
348
16.9k
            state, spilling_stream_, print_id(state->query_id()), "agg", node_id,
349
16.9k
            std::numeric_limits<int32_t>::max(), std::numeric_limits<size_t>::max(), profile));
350
16.9k
    spill_streams_.emplace_back(spilling_stream_);
351
16.9k
    spill_stream = spilling_stream_;
352
16.9k
    return Status::OK();
353
16.9k
}
354
1.33M
void AggSpillPartition::close() {
355
1.33M
    if (spilling_stream_) {
356
1
        spilling_stream_.reset();
357
1
    }
358
1.33M
    for (auto& stream : spill_streams_) {
359
19
        (void)ExecEnv::GetInstance()->spill_stream_mgr()->delete_spill_stream(stream);
360
19
    }
361
1.33M
    spill_streams_.clear();
362
1.33M
}
363
364
51.6k
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
51.6k
    bool false_close = false;
368
51.6k
    if (!is_closed.compare_exchange_strong(false_close, true)) {
369
4.58k
        return;
370
4.58k
    }
371
47.0k
    DCHECK(!false_close && is_closed);
372
1.33M
    for (auto partition : spill_partitions) {
373
1.33M
        partition->close();
374
1.33M
    }
375
47.0k
    spill_partitions.clear();
376
47.0k
}
377
378
127k
void SpillSortSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {
379
127k
    for (auto& stream : sorted_streams) {
380
32
        if (stream) {
381
32
            stream->update_shared_profiles(source_profile);
382
32
        }
383
32
    }
384
127k
}
385
386
127k
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
127k
    bool false_close = false;
390
127k
    if (!is_closed.compare_exchange_strong(false_close, true)) {
391
2
        return;
392
2
    }
393
127k
    DCHECK(!false_close && is_closed);
394
127k
    for (auto& stream : sorted_streams) {
395
1
        (void)ExecEnv::GetInstance()->spill_stream_mgr()->delete_spill_stream(stream);
396
1
    }
397
127k
    sorted_streams.clear();
398
127k
}
399
400
MultiCastSharedState::MultiCastSharedState(ObjectPool* pool, int cast_sender_count, int node_id)
401
        : multi_cast_data_streamer(std::make_unique<pipeline::MultiCastDataStreamer>(
402
1.35k
                  this, pool, cast_sender_count, node_id)) {}
403
404
0
void MultiCastSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {}
405
406
117k
int AggSharedState::get_slot_column_id(const vectorized::AggFnEvaluator* evaluator) {
407
117k
    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
117k
    return ((vectorized::VSlotRef*)ctxs[0]->root().get())->column_id();
412
117k
}
413
414
3.30M
Status AggSharedState::_destroy_agg_status(vectorized::AggregateDataPtr data) {
415
6.86M
    for (int i = 0; i < aggregate_evaluators.size(); ++i) {
416
3.56M
        aggregate_evaluators[i]->function()->destroy(data + offsets_of_aggregate_states[i]);
417
3.56M
    }
418
3.30M
    return Status::OK();
419
3.30M
}
420
421
57.5k
LocalExchangeSharedState::~LocalExchangeSharedState() = default;
422
423
1.28k
Status SetSharedState::update_build_not_ignore_null(const vectorized::VExprContextSPtrs& ctxs) {
424
1.28k
    if (ctxs.size() > build_not_ignore_null.size()) {
425
0
        return Status::InternalError("build_not_ignore_null not initialized");
426
0
    }
427
428
3.27k
    for (int i = 0; i < ctxs.size(); ++i) {
429
1.99k
        build_not_ignore_null[i] = build_not_ignore_null[i] || ctxs[i]->root()->is_nullable();
430
1.99k
    }
431
432
1.28k
    return Status::OK();
433
1.28k
}
434
435
1.27k
size_t SetSharedState::get_hash_table_size() const {
436
1.27k
    size_t hash_table_size = 0;
437
1.27k
    std::visit(
438
1.27k
            [&](auto&& arg) {
439
1.27k
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
1.27k
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
1.27k
                    hash_table_size = arg.hash_table->size();
442
1.27k
                }
443
1.27k
            },
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRSt9monostateEEDaOT_
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS7_vEEEEEEDaOT_
Line
Count
Source
438
505
            [&](auto&& arg) {
439
505
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
505
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
505
                    hash_table_size = arg.hash_table->size();
442
505
                }
443
505
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized19MethodStringNoCacheI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS7_vEEEEEEDaOT_
Line
Count
Source
438
371
            [&](auto&& arg) {
439
371
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
371
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
371
                    hash_table_size = arg.hash_table->size();
442
371
                }
443
371
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhNS_14RowRefWithFlagE9HashCRC32IhEEEEEEEEEEDaOT_
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
            },
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
90
            [&](auto&& arg) {
439
90
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
90
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
90
                    hash_table_size = arg.hash_table->size();
442
90
                }
443
90
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEEEEEDaOT_
Line
Count
Source
438
80
            [&](auto&& arg) {
439
80
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
80
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
80
                    hash_table_size = arg.hash_table->size();
442
80
                }
443
80
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_NS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEEEEEDaOT_
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_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
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
            },
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
30
            [&](auto&& arg) {
439
30
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
30
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
30
                    hash_table_size = arg.hash_table->size();
442
30
                }
443
30
            },
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEENS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEDaOT_
Line
Count
Source
438
76
            [&](auto&& arg) {
439
76
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
76
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
76
                    hash_table_size = arg.hash_table->size();
442
76
                }
443
76
            },
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
41
            [&](auto&& arg) {
439
41
                using HashTableCtxType = std::decay_t<decltype(arg)>;
440
41
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
441
41
                    hash_table_size = arg.hash_table->size();
442
41
                }
443
41
            },
444
1.27k
            hash_table_variants->method_variant);
445
1.27k
    return hash_table_size;
446
1.27k
}
447
448
600
Status SetSharedState::hash_table_init() {
449
600
    std::vector<vectorized::DataTypePtr> data_types;
450
1.53k
    for (size_t i = 0; i != child_exprs_lists[0].size(); ++i) {
451
939
        auto& ctx = child_exprs_lists[0][i];
452
939
        auto data_type = ctx->root()->data_type();
453
939
        if (build_not_ignore_null[i]) {
454
672
            data_type = vectorized::make_nullable(data_type);
455
672
        }
456
939
        data_types.emplace_back(std::move(data_type));
457
939
    }
458
600
    return init_hash_method<SetDataVariants>(hash_table_variants.get(), data_types, true);
459
600
}
460
461
void AggSharedState::refresh_top_limit(size_t row_id,
462
101
                                       const vectorized::ColumnRawPtrs& key_columns) {
463
317
    for (int j = 0; j < key_columns.size(); ++j) {
464
216
        limit_columns[j]->insert_from(*key_columns[j], row_id);
465
216
    }
466
101
    limit_heap.emplace(limit_columns[0]->size() - 1, limit_columns, order_directions,
467
101
                       null_directions);
468
469
101
    limit_heap.pop();
470
101
    limit_columns_min = limit_heap.top()._row_id;
471
101
}
472
473
} // namespace doris::pipeline