Coverage Report

Created: 2026-08-14 01:44

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/pipeline/dependency.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/pipeline/dependency.h"
19
20
#include <memory>
21
#include <mutex>
22
23
#include "common/logging.h"
24
#include "exec/common/agg_utils.h"
25
#include "exec/common/hash_table/hash_map_util.h"
26
#include "exec/common/join_utils.h"
27
#include "exec/common/set_utils.h"
28
#include "exec/common/template_helpers.hpp"
29
#include "exec/operator/multi_cast_data_streamer.h"
30
#include "exec/pipeline/pipeline_fragment_context.h"
31
#include "exec/pipeline/pipeline_task.h"
32
#include "exec/spill/spill_file_manager.h"
33
#include "exprs/vectorized_agg_fn.h"
34
#include "exprs/vslot_ref.h"
35
#include "runtime/exec_env.h"
36
37
namespace doris {
38
39
Dependency* BasicSharedState::create_source_dependency(int operator_id, int node_id,
40
574k
                                                       const std::string& name) {
41
574k
    source_deps.push_back(std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY"));
42
574k
    source_deps.back()->set_shared_state(this);
43
574k
    return source_deps.back().get();
44
574k
}
45
46
void BasicSharedState::create_source_dependencies(int num_sources, int operator_id, int node_id,
47
132k
                                                  const std::string& name) {
48
132k
    source_deps.resize(num_sources, nullptr);
49
901k
    for (auto& source_dep : source_deps) {
50
901k
        source_dep = std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY");
51
901k
        source_dep->set_shared_state(this);
52
901k
    }
53
132k
}
54
55
Dependency* BasicSharedState::create_sink_dependency(int dest_id, int node_id,
56
1.25M
                                                     const std::string& name) {
57
1.25M
    sink_deps.push_back(std::make_shared<Dependency>(dest_id, node_id, name + "_DEPENDENCY", true));
58
1.25M
    sink_deps.back()->set_shared_state(this);
59
1.25M
    return sink_deps.back().get();
60
1.25M
}
61
62
5.79M
void Dependency::_add_block_task(std::shared_ptr<PipelineTask> task) {
63
18.4E
    DCHECK(_blocked_task.empty() || _blocked_task[_blocked_task.size() - 1].lock() == nullptr ||
64
18.4E
           _blocked_task[_blocked_task.size() - 1].lock().get() != task.get())
65
18.4E
            << "Duplicate task: " << task->debug_string();
66
5.79M
    _blocked_task.push_back(task);
67
5.79M
}
68
69
26.0M
void Dependency::set_ready() {
70
26.0M
    if (_ready) {
71
20.3M
        return;
72
20.3M
    }
73
5.68M
    std::vector<std::weak_ptr<PipelineTask>> local_block_task {};
74
5.68M
    {
75
5.68M
        std::unique_lock<std::mutex> lc(_task_lock);
76
5.68M
        if (_ready) {
77
131
            return;
78
131
        }
79
5.68M
        _watcher.stop();
80
5.68M
        _ready = true;
81
5.68M
        local_block_task.swap(_blocked_task);
82
5.68M
    }
83
5.81M
    for (auto task : local_block_task) {
84
5.81M
        if (auto t = task.lock()) {
85
5.80M
            std::unique_lock<std::mutex> lc(_task_lock);
86
5.80M
            t->wake_up(this, lc);
87
5.80M
        }
88
5.81M
    }
89
5.68M
}
90
91
45.0M
Dependency* Dependency::is_blocked_by(std::shared_ptr<PipelineTask> task) {
92
45.0M
    std::unique_lock<std::mutex> lc(_task_lock);
93
45.0M
    auto ready = _ready.load();
94
45.0M
    if (!ready && task) {
95
5.80M
        _add_block_task(task);
96
5.80M
        start_watcher();
97
5.80M
        THROW_IF_ERROR(task->blocked(this, lc));
98
5.80M
    }
99
45.0M
    return ready ? nullptr : this;
100
45.0M
}
101
102
120k
std::string Dependency::debug_string(int indentation_level) {
103
120k
    fmt::memory_buffer debug_string_buffer;
104
120k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, block task = {}, ready={}, _always_ready={}",
105
120k
                   std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(),
106
120k
                   _ready, _always_ready);
107
120k
    return fmt::to_string(debug_string_buffer);
108
120k
}
109
110
2
std::string CountedFinishDependency::debug_string(int indentation_level) {
111
2
    fmt::memory_buffer debug_string_buffer;
112
2
    fmt::format_to(debug_string_buffer,
113
2
                   "{}{}: id={}, block_task={}, ready={}, _always_ready={}, count={}",
114
2
                   std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(),
115
2
                   _ready, _always_ready, _counter);
116
2
    return fmt::to_string(debug_string_buffer);
117
2
}
118
119
1.08k
void RuntimeFilterTimer::call_timeout() {
120
1.08k
    _parent->set_ready();
121
1.08k
}
122
123
15.9k
void RuntimeFilterTimer::call_ready() {
124
15.9k
    _parent->set_ready();
125
15.9k
}
126
127
// should check rf timeout in two case:
128
// 1. the rf is ready just remove the wait queue
129
// 2. if the rf have local dependency, the rf should start wait when all local dependency is ready
130
607k
bool RuntimeFilterTimer::should_be_check_timeout() {
131
607k
    if (!_parent->ready() && !_local_runtime_filter_dependencies.empty()) {
132
5.33k
        bool all_ready = true;
133
5.33k
        for (auto& dep : _local_runtime_filter_dependencies) {
134
5.33k
            if (!dep->ready()) {
135
5.33k
                all_ready = false;
136
5.33k
                break;
137
5.33k
            }
138
5.33k
        }
139
5.33k
        if (all_ready) {
140
2
            _local_runtime_filter_dependencies.clear();
141
2
            _registration_time = MonotonicMillis();
142
2
        }
143
5.33k
        return all_ready;
144
5.33k
    }
145
601k
    return true;
146
607k
}
147
148
9
void RuntimeFilterTimerQueue::start() {
149
85.8k
    while (!_stop) {
150
85.8k
        std::unique_lock<std::mutex> lk(cv_m);
151
152
93.4k
        while (_que.empty() && !_stop) {
153
15.2k
            cv.wait_for(lk, std::chrono::seconds(3), [this] { return !_que.empty() || _stop; });
154
7.60k
        }
155
85.8k
        if (_stop) {
156
3
            break;
157
3
        }
158
85.8k
        {
159
85.8k
            std::unique_lock<std::mutex> lc(_que_lock);
160
85.8k
            std::list<std::shared_ptr<RuntimeFilterTimer>> new_que;
161
607k
            for (auto& it : _que) {
162
607k
                if (it.use_count() == 1) {
163
                    // `use_count == 1` means this runtime filter has been released
164
607k
                } else if (it->should_be_check_timeout()) {
165
601k
                    if (it->force_wait_timeout() || it->_parent->is_blocked_by()) {
166
                        // This means runtime filter is not ready, so we call timeout or continue to poll this timer.
167
586k
                        int64_t ms_since_registration = MonotonicMillis() - it->registration_time();
168
586k
                        if (ms_since_registration > it->wait_time_ms()) {
169
1.08k
                            it->call_timeout();
170
585k
                        } else {
171
585k
                            new_que.push_back(std::move(it));
172
585k
                        }
173
586k
                    }
174
601k
                } else {
175
5.33k
                    new_que.push_back(std::move(it));
176
5.33k
                }
177
607k
            }
178
85.8k
            new_que.swap(_que);
179
85.8k
        }
180
85.8k
        std::this_thread::sleep_for(std::chrono::milliseconds(interval));
181
85.8k
    }
182
9
    _shutdown = true;
183
9
}
184
185
347k
void LocalExchangeSharedState::sub_running_sink_operators() {
186
347k
    std::unique_lock<std::mutex> lc(le_lock);
187
347k
    if (exchanger->_running_sink_operators.fetch_sub(1) == 1) {
188
128k
        _set_always_ready();
189
128k
    }
190
347k
}
191
192
876k
void LocalExchangeSharedState::sub_running_source_operators() {
193
876k
    std::unique_lock<std::mutex> lc(le_lock);
194
876k
    if (exchanger->_running_source_operators.fetch_sub(1) == 1) {
195
128k
        _set_always_ready();
196
128k
        exchanger->finalize();
197
128k
    }
198
876k
}
199
200
128k
LocalExchangeSharedState::LocalExchangeSharedState(int num_instances) {
201
128k
    source_deps.resize(num_instances, nullptr);
202
128k
    mem_counters.resize(num_instances, nullptr);
203
128k
}
204
205
165k
AggSharedState::AggSharedState() {
206
165k
    agg_data = std::make_unique<AggregatedDataVariants>();
207
165k
}
208
209
164k
AggSharedState::~AggSharedState() {
210
164k
    if (!probe_expr_ctxs.empty()) {
211
47.9k
        _close_with_serialized_key();
212
116k
    } else {
213
116k
        _close_without_key();
214
116k
    }
215
164k
}
216
217
47.9k
void AggSharedState::_close_with_serialized_key() {
218
47.9k
    std::visit(Overload {[&](std::monostate& arg) -> void {
219
                             // Do nothing
220
0
                         },
221
47.9k
                         [&](auto& agg_method) -> void {
222
47.9k
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
4.18k
                                 return;
226
4.18k
                             }
227
43.7k
                             auto& data = *agg_method.hash_table;
228
1.74M
                             data.for_each_mapped([&](auto& mapped) {
229
1.74M
                                 if (mapped) {
230
1.74M
                                     _destroy_agg_status(mapped);
231
1.74M
                                     mapped = nullptr;
232
1.74M
                                 }
233
1.74M
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS5_vEEEEEEvRT_ENKUlSC_E_clIS6_EEDaSC_
Line
Count
Source
228
94.1k
                             data.for_each_mapped([&](auto& mapped) {
229
94.1k
                                 if (mapped) {
230
94.1k
                                     _destroy_agg_status(mapped);
231
94.1k
                                     mapped = nullptr;
232
94.1k
                                 }
233
94.1k
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEvRT_ENKUlSB_E_clIS5_EEDaSB_
Line
Count
Source
228
721
                             data.for_each_mapped([&](auto& mapped) {
229
721
                                 if (mapped) {
230
721
                                     _destroy_agg_status(mapped);
231
721
                                     mapped = nullptr;
232
721
                                 }
233
721
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEvRT_ENKUlSB_E_clIS5_EEDaSB_
Line
Count
Source
228
34
                             data.for_each_mapped([&](auto& mapped) {
229
34
                                 if (mapped) {
230
34
                                     _destroy_agg_status(mapped);
231
34
                                     mapped = nullptr;
232
34
                                 }
233
34
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEvRT_ENKUlSB_E_clIS5_EEDaSB_
Line
Count
Source
228
2.22k
                             data.for_each_mapped([&](auto& mapped) {
229
2.22k
                                 if (mapped) {
230
2.22k
                                     _destroy_agg_status(mapped);
231
2.22k
                                     mapped = nullptr;
232
2.22k
                                 }
233
2.22k
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEvRT_ENKUlSB_E_clIS5_EEDaSB_
Line
Count
Source
228
8.43k
                             data.for_each_mapped([&](auto& mapped) {
229
8.43k
                                 if (mapped) {
230
8.43k
                                     _destroy_agg_status(mapped);
231
8.43k
                                     mapped = nullptr;
232
8.43k
                                 }
233
8.43k
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEvRT_ENKUlSC_E_clIS5_EEDaSC_
Line
Count
Source
228
1.32k
                             data.for_each_mapped([&](auto& mapped) {
229
1.32k
                                 if (mapped) {
230
1.32k
                                     _destroy_agg_status(mapped);
231
1.32k
                                     mapped = nullptr;
232
1.32k
                                 }
233
1.32k
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS6_Pc9HashCRC32IS6_EEEEEEvRT_ENKUlSE_E_clIS8_EEDaSE_
Line
Count
Source
228
96
                             data.for_each_mapped([&](auto& mapped) {
229
96
                                 if (mapped) {
230
96
                                     _destroy_agg_status(mapped);
231
96
                                     mapped = nullptr;
232
96
                                 }
233
96
                             });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS6_Pc9HashCRC32IS6_EEEEEEvRT_ENKUlSE_E_clIS8_EEDaSE_
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEvRT_ENKUlSD_E_clIS5_EEDaSD_
Line
Count
Source
228
1.08M
                             data.for_each_mapped([&](auto& mapped) {
229
1.08M
                                 if (mapped) {
230
1.08M
                                     _destroy_agg_status(mapped);
231
1.08M
                                     mapped = nullptr;
232
1.08M
                                 }
233
1.08M
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEvRT_ENKUlSD_E_clIS5_EEDaSD_
Line
Count
Source
228
48.0k
                             data.for_each_mapped([&](auto& mapped) {
229
48.0k
                                 if (mapped) {
230
48.0k
                                     _destroy_agg_status(mapped);
231
48.0k
                                     mapped = nullptr;
232
48.0k
                                 }
233
48.0k
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIhNS_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEvRT_ENKUlSF_E_clIS7_EEDaSF_
Line
Count
Source
228
2.38k
                             data.for_each_mapped([&](auto& mapped) {
229
2.38k
                                 if (mapped) {
230
2.38k
                                     _destroy_agg_status(mapped);
231
2.38k
                                     mapped = nullptr;
232
2.38k
                                 }
233
2.38k
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberItNS_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEvRT_ENKUlSF_E_clIS7_EEDaSF_
Line
Count
Source
228
676
                             data.for_each_mapped([&](auto& mapped) {
229
676
                                 if (mapped) {
230
676
                                     _destroy_agg_status(mapped);
231
676
                                     mapped = nullptr;
232
676
                                 }
233
676
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIjNS_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEvRT_ENKUlSF_E_clIS7_EEDaSF_
Line
Count
Source
228
1.84k
                             data.for_each_mapped([&](auto& mapped) {
229
1.84k
                                 if (mapped) {
230
1.84k
                                     _destroy_agg_status(mapped);
231
1.84k
                                     mapped = nullptr;
232
1.84k
                                 }
233
1.84k
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberImNS_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEvRT_ENKUlSF_E_clIS7_EEDaSF_
Line
Count
Source
228
200
                             data.for_each_mapped([&](auto& mapped) {
229
200
                                 if (mapped) {
230
200
                                     _destroy_agg_status(mapped);
231
200
                                     mapped = nullptr;
232
200
                                 }
233
200
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIjNS_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEvRT_ENKUlSH_E_clIS7_EEDaSH_
Line
Count
Source
228
141k
                             data.for_each_mapped([&](auto& mapped) {
229
141k
                                 if (mapped) {
230
141k
                                     _destroy_agg_status(mapped);
231
141k
                                     mapped = nullptr;
232
141k
                                 }
233
141k
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberImNS_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEvRT_ENKUlSH_E_clIS7_EEDaSH_
Line
Count
Source
228
130k
                             data.for_each_mapped([&](auto& mapped) {
229
130k
                                 if (mapped) {
230
130k
                                     _destroy_agg_status(mapped);
231
130k
                                     mapped = nullptr;
232
130k
                                 }
233
130k
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIN4wide7integerILm128EjEENS_15DataWithNullKeyI9PHHashMapIS7_Pc9HashCRC32IS7_EEEEEEEEEEvRT_ENKUlSI_E_clISA_EEDaSI_
Line
Count
Source
228
336
                             data.for_each_mapped([&](auto& mapped) {
229
336
                                 if (mapped) {
230
336
                                     _destroy_agg_status(mapped);
231
336
                                     mapped = nullptr;
232
336
                                 }
233
336
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIN4wide7integerILm256EjEENS_15DataWithNullKeyI9PHHashMapIS7_Pc9HashCRC32IS7_EEEEEEEEEEvRT_ENKUlSI_E_clISA_EEDaSI_
Line
Count
Source
228
3
                             data.for_each_mapped([&](auto& mapped) {
229
3
                                 if (mapped) {
230
3
                                     _destroy_agg_status(mapped);
231
3
                                     mapped = nullptr;
232
3
                                 }
233
3
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_19MethodStringNoCacheINS_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEEEEEvRT_ENKUlSG_E_clIS7_EEDaSG_
Line
Count
Source
228
4.16k
                             data.for_each_mapped([&](auto& mapped) {
229
4.16k
                                 if (mapped) {
230
4.16k
                                     _destroy_agg_status(mapped);
231
4.16k
                                     mapped = nullptr;
232
4.16k
                                 }
233
4.16k
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEvRT_ENKUlSB_E_clIS5_EEDaSB_
Line
Count
Source
228
187k
                             data.for_each_mapped([&](auto& mapped) {
229
187k
                                 if (mapped) {
230
187k
                                     _destroy_agg_status(mapped);
231
187k
                                     mapped = nullptr;
232
187k
                                 }
233
187k
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_6UInt72EPc9HashCRC32IS5_EEEEEEvRT_ENKUlSC_E_clIS6_EEDaSC_
Line
Count
Source
228
808
                             data.for_each_mapped([&](auto& mapped) {
229
808
                                 if (mapped) {
230
808
                                     _destroy_agg_status(mapped);
231
808
                                     mapped = nullptr;
232
808
                                 }
233
808
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_6UInt96EPc9HashCRC32IS5_EEEEEEvRT_ENKUlSC_E_clIS6_EEDaSC_
Line
Count
Source
228
7.68k
                             data.for_each_mapped([&](auto& mapped) {
229
7.68k
                                 if (mapped) {
230
7.68k
                                     _destroy_agg_status(mapped);
231
7.68k
                                     mapped = nullptr;
232
7.68k
                                 }
233
7.68k
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_7UInt104EPc9HashCRC32IS5_EEEEEEvRT_ENKUlSC_E_clIS6_EEDaSC_
Line
Count
Source
228
587
                             data.for_each_mapped([&](auto& mapped) {
229
587
                                 if (mapped) {
230
587
                                     _destroy_agg_status(mapped);
231
587
                                     mapped = nullptr;
232
587
                                 }
233
587
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS7_EEEEEEvRT_ENKUlSE_E_clIS8_EEDaSE_
Line
Count
Source
228
11.0k
                             data.for_each_mapped([&](auto& mapped) {
229
11.0k
                                 if (mapped) {
230
11.0k
                                     _destroy_agg_status(mapped);
231
11.0k
                                     mapped = nullptr;
232
11.0k
                                 }
233
11.0k
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_7UInt136EPc9HashCRC32IS5_EEEEEEvRT_ENKUlSC_E_clIS6_EEDaSC_
Line
Count
Source
228
1.92k
                             data.for_each_mapped([&](auto& mapped) {
229
1.92k
                                 if (mapped) {
230
1.92k
                                     _destroy_agg_status(mapped);
231
1.92k
                                     mapped = nullptr;
232
1.92k
                                 }
233
1.92k
                             });
dependency.cpp:_ZZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS7_EEEEEEvRT_ENKUlSE_E_clIS8_EEDaSE_
Line
Count
Source
228
4.40k
                             data.for_each_mapped([&](auto& mapped) {
229
4.40k
                                 if (mapped) {
230
4.40k
                                     _destroy_agg_status(mapped);
231
4.40k
                                     mapped = nullptr;
232
4.40k
                                 }
233
4.40k
                             });
234
43.7k
                             if (data.has_null_key_data()) {
235
1.20k
                                 _destroy_agg_status(
236
1.20k
                                         data.template get_null_key_data<AggregateDataPtr>());
237
1.20k
                             }
238
43.7k
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS5_vEEEEEEvRT_
Line
Count
Source
221
6.89k
                         [&](auto& agg_method) -> void {
222
6.89k
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
557
                                 return;
226
557
                             }
227
6.34k
                             auto& data = *agg_method.hash_table;
228
6.34k
                             data.for_each_mapped([&](auto& mapped) {
229
6.34k
                                 if (mapped) {
230
6.34k
                                     _destroy_agg_status(mapped);
231
6.34k
                                     mapped = nullptr;
232
6.34k
                                 }
233
6.34k
                             });
234
6.34k
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
6.34k
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEvRT_
Line
Count
Source
221
540
                         [&](auto& agg_method) -> void {
222
540
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
6
                                 return;
226
6
                             }
227
534
                             auto& data = *agg_method.hash_table;
228
534
                             data.for_each_mapped([&](auto& mapped) {
229
534
                                 if (mapped) {
230
534
                                     _destroy_agg_status(mapped);
231
534
                                     mapped = nullptr;
232
534
                                 }
233
534
                             });
234
534
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
534
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEvRT_
Line
Count
Source
221
50
                         [&](auto& agg_method) -> void {
222
50
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
0
                                 return;
226
0
                             }
227
50
                             auto& data = *agg_method.hash_table;
228
50
                             data.for_each_mapped([&](auto& mapped) {
229
50
                                 if (mapped) {
230
50
                                     _destroy_agg_status(mapped);
231
50
                                     mapped = nullptr;
232
50
                                 }
233
50
                             });
234
50
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
50
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEvRT_
Line
Count
Source
221
301
                         [&](auto& agg_method) -> void {
222
301
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
21
                                 return;
226
21
                             }
227
280
                             auto& data = *agg_method.hash_table;
228
280
                             data.for_each_mapped([&](auto& mapped) {
229
280
                                 if (mapped) {
230
280
                                     _destroy_agg_status(mapped);
231
280
                                     mapped = nullptr;
232
280
                                 }
233
280
                             });
234
280
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
280
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEvRT_
Line
Count
Source
221
43
                         [&](auto& agg_method) -> void {
222
43
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
5
                                 return;
226
5
                             }
227
38
                             auto& data = *agg_method.hash_table;
228
38
                             data.for_each_mapped([&](auto& mapped) {
229
38
                                 if (mapped) {
230
38
                                     _destroy_agg_status(mapped);
231
38
                                     mapped = nullptr;
232
38
                                 }
233
38
                             });
234
38
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
38
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEvRT_
Line
Count
Source
221
548
                         [&](auto& agg_method) -> void {
222
548
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
84
                                 return;
226
84
                             }
227
464
                             auto& data = *agg_method.hash_table;
228
464
                             data.for_each_mapped([&](auto& mapped) {
229
464
                                 if (mapped) {
230
464
                                     _destroy_agg_status(mapped);
231
464
                                     mapped = nullptr;
232
464
                                 }
233
464
                             });
234
464
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
464
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS6_Pc9HashCRC32IS6_EEEEEEvRT_
Line
Count
Source
221
155
                         [&](auto& agg_method) -> void {
222
155
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
38
                                 return;
226
38
                             }
227
117
                             auto& data = *agg_method.hash_table;
228
117
                             data.for_each_mapped([&](auto& mapped) {
229
117
                                 if (mapped) {
230
117
                                     _destroy_agg_status(mapped);
231
117
                                     mapped = nullptr;
232
117
                                 }
233
117
                             });
234
117
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
117
                         }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS6_Pc9HashCRC32IS6_EEEEEEvRT_
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEvRT_
Line
Count
Source
221
3.47k
                         [&](auto& agg_method) -> void {
222
3.47k
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
164
                                 return;
226
164
                             }
227
3.31k
                             auto& data = *agg_method.hash_table;
228
3.31k
                             data.for_each_mapped([&](auto& mapped) {
229
3.31k
                                 if (mapped) {
230
3.31k
                                     _destroy_agg_status(mapped);
231
3.31k
                                     mapped = nullptr;
232
3.31k
                                 }
233
3.31k
                             });
234
3.31k
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
3.31k
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEvRT_
Line
Count
Source
221
718
                         [&](auto& agg_method) -> void {
222
718
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
128
                                 return;
226
128
                             }
227
590
                             auto& data = *agg_method.hash_table;
228
590
                             data.for_each_mapped([&](auto& mapped) {
229
590
                                 if (mapped) {
230
590
                                     _destroy_agg_status(mapped);
231
590
                                     mapped = nullptr;
232
590
                                 }
233
590
                             });
234
590
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
590
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIhNS_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEvRT_
Line
Count
Source
221
2.53k
                         [&](auto& agg_method) -> void {
222
2.53k
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
313
                                 return;
226
313
                             }
227
2.22k
                             auto& data = *agg_method.hash_table;
228
2.22k
                             data.for_each_mapped([&](auto& mapped) {
229
2.22k
                                 if (mapped) {
230
2.22k
                                     _destroy_agg_status(mapped);
231
2.22k
                                     mapped = nullptr;
232
2.22k
                                 }
233
2.22k
                             });
234
2.22k
                             if (data.has_null_key_data()) {
235
493
                                 _destroy_agg_status(
236
493
                                         data.template get_null_key_data<AggregateDataPtr>());
237
493
                             }
238
2.22k
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberItNS_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEvRT_
Line
Count
Source
221
678
                         [&](auto& agg_method) -> void {
222
678
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
17
                                 return;
226
17
                             }
227
661
                             auto& data = *agg_method.hash_table;
228
661
                             data.for_each_mapped([&](auto& mapped) {
229
661
                                 if (mapped) {
230
661
                                     _destroy_agg_status(mapped);
231
661
                                     mapped = nullptr;
232
661
                                 }
233
661
                             });
234
661
                             if (data.has_null_key_data()) {
235
21
                                 _destroy_agg_status(
236
21
                                         data.template get_null_key_data<AggregateDataPtr>());
237
21
                             }
238
661
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIjNS_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEvRT_
Line
Count
Source
221
982
                         [&](auto& agg_method) -> void {
222
982
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
47
                                 return;
226
47
                             }
227
935
                             auto& data = *agg_method.hash_table;
228
935
                             data.for_each_mapped([&](auto& mapped) {
229
935
                                 if (mapped) {
230
935
                                     _destroy_agg_status(mapped);
231
935
                                     mapped = nullptr;
232
935
                                 }
233
935
                             });
234
935
                             if (data.has_null_key_data()) {
235
14
                                 _destroy_agg_status(
236
14
                                         data.template get_null_key_data<AggregateDataPtr>());
237
14
                             }
238
935
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberImNS_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEvRT_
Line
Count
Source
221
415
                         [&](auto& agg_method) -> void {
222
415
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
4
                                 return;
226
4
                             }
227
411
                             auto& data = *agg_method.hash_table;
228
411
                             data.for_each_mapped([&](auto& mapped) {
229
411
                                 if (mapped) {
230
411
                                     _destroy_agg_status(mapped);
231
411
                                     mapped = nullptr;
232
411
                                 }
233
411
                             });
234
411
                             if (data.has_null_key_data()) {
235
32
                                 _destroy_agg_status(
236
32
                                         data.template get_null_key_data<AggregateDataPtr>());
237
32
                             }
238
411
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIjNS_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEvRT_
Line
Count
Source
221
13.4k
                         [&](auto& agg_method) -> void {
222
13.4k
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
942
                                 return;
226
942
                             }
227
12.5k
                             auto& data = *agg_method.hash_table;
228
12.5k
                             data.for_each_mapped([&](auto& mapped) {
229
12.5k
                                 if (mapped) {
230
12.5k
                                     _destroy_agg_status(mapped);
231
12.5k
                                     mapped = nullptr;
232
12.5k
                                 }
233
12.5k
                             });
234
12.5k
                             if (data.has_null_key_data()) {
235
424
                                 _destroy_agg_status(
236
424
                                         data.template get_null_key_data<AggregateDataPtr>());
237
424
                             }
238
12.5k
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberImNS_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEvRT_
Line
Count
Source
221
4.71k
                         [&](auto& agg_method) -> void {
222
4.71k
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
825
                                 return;
226
825
                             }
227
3.88k
                             auto& data = *agg_method.hash_table;
228
3.88k
                             data.for_each_mapped([&](auto& mapped) {
229
3.88k
                                 if (mapped) {
230
3.88k
                                     _destroy_agg_status(mapped);
231
3.88k
                                     mapped = nullptr;
232
3.88k
                                 }
233
3.88k
                             });
234
3.88k
                             if (data.has_null_key_data()) {
235
163
                                 _destroy_agg_status(
236
163
                                         data.template get_null_key_data<AggregateDataPtr>());
237
163
                             }
238
3.88k
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIN4wide7integerILm128EjEENS_15DataWithNullKeyI9PHHashMapIS7_Pc9HashCRC32IS7_EEEEEEEEEEvRT_
Line
Count
Source
221
418
                         [&](auto& agg_method) -> void {
222
418
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
10
                                 return;
226
10
                             }
227
408
                             auto& data = *agg_method.hash_table;
228
408
                             data.for_each_mapped([&](auto& mapped) {
229
408
                                 if (mapped) {
230
408
                                     _destroy_agg_status(mapped);
231
408
                                     mapped = nullptr;
232
408
                                 }
233
408
                             });
234
408
                             if (data.has_null_key_data()) {
235
5
                                 _destroy_agg_status(
236
5
                                         data.template get_null_key_data<AggregateDataPtr>());
237
5
                             }
238
408
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIN4wide7integerILm256EjEENS_15DataWithNullKeyI9PHHashMapIS7_Pc9HashCRC32IS7_EEEEEEEEEEvRT_
Line
Count
Source
221
1
                         [&](auto& agg_method) -> void {
222
1
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
0
                                 return;
226
0
                             }
227
1
                             auto& data = *agg_method.hash_table;
228
1
                             data.for_each_mapped([&](auto& mapped) {
229
1
                                 if (mapped) {
230
1
                                     _destroy_agg_status(mapped);
231
1
                                     mapped = nullptr;
232
1
                                 }
233
1
                             });
234
1
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
1
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_26MethodSingleNullableColumnINS_19MethodStringNoCacheINS_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEEEEEvRT_
Line
Count
Source
221
3.66k
                         [&](auto& agg_method) -> void {
222
3.66k
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
737
                                 return;
226
737
                             }
227
2.92k
                             auto& data = *agg_method.hash_table;
228
2.92k
                             data.for_each_mapped([&](auto& mapped) {
229
2.92k
                                 if (mapped) {
230
2.92k
                                     _destroy_agg_status(mapped);
231
2.92k
                                     mapped = nullptr;
232
2.92k
                                 }
233
2.92k
                             });
234
2.92k
                             if (data.has_null_key_data()) {
235
48
                                 _destroy_agg_status(
236
48
                                         data.template get_null_key_data<AggregateDataPtr>());
237
48
                             }
238
2.92k
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEvRT_
Line
Count
Source
221
985
                         [&](auto& agg_method) -> void {
222
985
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
41
                                 return;
226
41
                             }
227
944
                             auto& data = *agg_method.hash_table;
228
944
                             data.for_each_mapped([&](auto& mapped) {
229
944
                                 if (mapped) {
230
944
                                     _destroy_agg_status(mapped);
231
944
                                     mapped = nullptr;
232
944
                                 }
233
944
                             });
234
944
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
944
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_6UInt72EPc9HashCRC32IS5_EEEEEEvRT_
Line
Count
Source
221
1.09k
                         [&](auto& agg_method) -> void {
222
1.09k
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
87
                                 return;
226
87
                             }
227
1.00k
                             auto& data = *agg_method.hash_table;
228
1.00k
                             data.for_each_mapped([&](auto& mapped) {
229
1.00k
                                 if (mapped) {
230
1.00k
                                     _destroy_agg_status(mapped);
231
1.00k
                                     mapped = nullptr;
232
1.00k
                                 }
233
1.00k
                             });
234
1.00k
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
1.00k
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_6UInt96EPc9HashCRC32IS5_EEEEEEvRT_
Line
Count
Source
221
630
                         [&](auto& agg_method) -> void {
222
630
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
2
                                 return;
226
2
                             }
227
628
                             auto& data = *agg_method.hash_table;
228
628
                             data.for_each_mapped([&](auto& mapped) {
229
628
                                 if (mapped) {
230
628
                                     _destroy_agg_status(mapped);
231
628
                                     mapped = nullptr;
232
628
                                 }
233
628
                             });
234
628
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
628
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_7UInt104EPc9HashCRC32IS5_EEEEEEvRT_
Line
Count
Source
221
819
                         [&](auto& agg_method) -> void {
222
819
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
17
                                 return;
226
17
                             }
227
802
                             auto& data = *agg_method.hash_table;
228
802
                             data.for_each_mapped([&](auto& mapped) {
229
802
                                 if (mapped) {
230
802
                                     _destroy_agg_status(mapped);
231
802
                                     mapped = nullptr;
232
802
                                 }
233
802
                             });
234
802
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
802
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS7_EEEEEEvRT_
Line
Count
Source
221
139
                         [&](auto& agg_method) -> void {
222
139
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
27
                                 return;
226
27
                             }
227
112
                             auto& data = *agg_method.hash_table;
228
112
                             data.for_each_mapped([&](auto& mapped) {
229
112
                                 if (mapped) {
230
112
                                     _destroy_agg_status(mapped);
231
112
                                     mapped = nullptr;
232
112
                                 }
233
112
                             });
234
112
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
112
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_7UInt136EPc9HashCRC32IS5_EEEEEEvRT_
Line
Count
Source
221
1.90k
                         [&](auto& agg_method) -> void {
222
1.90k
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
72
                                 return;
226
72
                             }
227
1.83k
                             auto& data = *agg_method.hash_table;
228
1.83k
                             data.for_each_mapped([&](auto& mapped) {
229
1.83k
                                 if (mapped) {
230
1.83k
                                     _destroy_agg_status(mapped);
231
1.83k
                                     mapped = nullptr;
232
1.83k
                                 }
233
1.83k
                             });
234
1.83k
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
1.83k
                         }},
dependency.cpp:_ZZN5doris14AggSharedState26_close_with_serialized_keyEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS7_EEEEEEvRT_
Line
Count
Source
221
2.73k
                         [&](auto& agg_method) -> void {
222
2.73k
                             if (use_simple_count) {
223
                                 // Inline count: mapped slots hold UInt64,
224
                                 // not real agg state pointers. Skip destroy.
225
40
                                 return;
226
40
                             }
227
2.69k
                             auto& data = *agg_method.hash_table;
228
2.69k
                             data.for_each_mapped([&](auto& mapped) {
229
2.69k
                                 if (mapped) {
230
2.69k
                                     _destroy_agg_status(mapped);
231
2.69k
                                     mapped = nullptr;
232
2.69k
                                 }
233
2.69k
                             });
234
2.69k
                             if (data.has_null_key_data()) {
235
0
                                 _destroy_agg_status(
236
0
                                         data.template get_null_key_data<AggregateDataPtr>());
237
0
                             }
238
2.69k
                         }},
239
47.9k
               agg_data->method_variant);
240
47.9k
}
241
242
116k
void AggSharedState::_close_without_key() {
243
    //because prepare maybe failed, and couldn't create agg data.
244
    //but finally call close to destory agg data, if agg data has bitmapValue
245
    //will be core dump, it's not initialized
246
117k
    if (agg_data_created_without_key) {
247
117k
        _destroy_agg_status(agg_data->without_key);
248
117k
        agg_data_created_without_key = false;
249
117k
    }
250
116k
}
251
252
631
BucketedAggSharedState::PerInstanceData::PerInstanceData() : arena(std::make_unique<Arena>()) {
253
631
    bucket_agg_data.resize(BUCKETED_AGG_NUM_BUCKETS);
254
161k
    for (auto& p : bucket_agg_data) {
255
161k
        p = std::make_unique<BucketedAggDataVariants>();
256
161k
    }
257
631
}
258
259
116
BucketedAggSharedState::~BucketedAggSharedState() {
260
116
    _close();
261
116
}
262
263
Status BucketedAggSharedState::init_instances(int num_instances,
264
630
                                              const std::function<Status()>& metadata_init) {
265
630
    std::call_once(_init_once, [&]() {
266
116
        num_sink_instances = num_instances;
267
116
        per_instance_data.resize(num_instances);
268
116
        sink_finished = std::make_unique<std::atomic<bool>[]>(num_instances);
269
747
        for (int i = 0; i < num_instances; ++i) {
270
631
            sink_finished[i].store(false, std::memory_order_relaxed);
271
631
        }
272
29.6k
        for (auto& bs : bucket_states) {
273
29.6k
            bs.merged_instances.resize(num_instances, false);
274
29.6k
        }
275
116
        _init_status = metadata_init();
276
116
    });
277
630
    return _init_status;
278
630
}
279
280
116
void BucketedAggSharedState::_close() {
281
631
    for (auto& inst : per_instance_data) {
282
161k
        for (auto& bucket_data : inst.bucket_agg_data) {
283
161k
            _close_one_agg_data(*bucket_data);
284
161k
        }
285
631
    }
286
116
}
287
288
161k
void BucketedAggSharedState::_close_one_agg_data(BucketedAggDataVariants& agg_data) {
289
161k
    std::visit(Overload {[&](std::monostate& arg) -> void {
290
                             // Do nothing
291
0
                         },
292
161k
                         [&](auto& agg_method) -> void {
293
161k
                             if (use_simple_count) {
294
                                 // simple_count: mapped slots hold UInt64 counters,
295
                                 // not real agg state pointers. Skip destroy.
296
27.3k
                                 return;
297
27.3k
                             }
298
134k
                             auto& data = *agg_method.hash_table;
299
134k
                             data.for_each_mapped([&](auto& mapped) {
300
54.5k
                                 if (mapped) {
301
31.4k
                                     _destroy_agg_status(mapped);
302
31.4k
                                     mapped = nullptr;
303
31.4k
                                 }
304
54.5k
                             });
dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEvRT_ENKUlSE_E_clIS8_EEDaSE_
Line
Count
Source
299
3.63k
                             data.for_each_mapped([&](auto& mapped) {
300
3.63k
                                 if (mapped) {
301
754
                                     _destroy_agg_status(mapped);
302
754
                                     mapped = nullptr;
303
754
                                 }
304
3.63k
                             });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEvRT_ENKUlSD_E_clIS7_EEDaSD_
dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEvRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
299
16
                             data.for_each_mapped([&](auto& mapped) {
300
16
                                 if (mapped) {
301
4
                                     _destroy_agg_status(mapped);
302
4
                                     mapped = nullptr;
303
4
                                 }
304
16
                             });
dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEvRT_ENKUlSD_E_clIS7_EEDaSD_
Line
Count
Source
299
50.0k
                             data.for_each_mapped([&](auto& mapped) {
300
50.0k
                                 if (mapped) {
301
30.0k
                                     _destroy_agg_status(mapped);
302
30.0k
                                     mapped = nullptr;
303
30.0k
                                 }
304
50.0k
                             });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEvRT_ENKUlSD_E_clIS7_EEDaSD_
dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_19MethodStringNoCacheI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEvRT_ENKUlSE_E_clIS8_EEDaSE_
Line
Count
Source
299
40
                             data.for_each_mapped([&](auto& mapped) {
300
40
                                 if (mapped) {
301
10
                                     _destroy_agg_status(mapped);
302
10
                                     mapped = nullptr;
303
10
                                 }
304
40
                             });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEvRT_ENKUlSG_E_clISA_EEDaSG_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEvRT_ENKUlSG_E_clISA_EEDaSG_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEvRT_ENKUlSF_E_clIS7_EEDaSF_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEvRT_ENKUlSF_E_clIS7_EEDaSF_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIhNS_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEvRT_ENKUlSH_E_clIS9_EEDaSH_
dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberItNS_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEvRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
299
6
                             data.for_each_mapped([&](auto& mapped) {
300
6
                                 if (mapped) {
301
2
                                     _destroy_agg_status(mapped);
302
2
                                     mapped = nullptr;
303
2
                                 }
304
6
                             });
dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIjNS_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEvRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
299
36
                             data.for_each_mapped([&](auto& mapped) {
300
36
                                 if (mapped) {
301
20
                                     _destroy_agg_status(mapped);
302
20
                                     mapped = nullptr;
303
20
                                 }
304
36
                             });
dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberImNS_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEvRT_ENKUlSH_E_clIS9_EEDaSH_
Line
Count
Source
299
221
                             data.for_each_mapped([&](auto& mapped) {
300
221
                                 if (mapped) {
301
111
                                     _destroy_agg_status(mapped);
302
111
                                     mapped = nullptr;
303
111
                                 }
304
221
                             });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIjNS_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEvRT_ENKUlSJ_E_clIS9_EEDaSJ_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberImNS_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEvRT_ENKUlSJ_E_clIS9_EEDaSJ_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIN4wide7integerILm128EjEENS_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEvRT_ENKUlSK_E_clISC_EEDaSK_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIN4wide7integerILm256EjEENS_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEvRT_ENKUlSK_E_clISC_EEDaSK_
dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_19MethodStringNoCacheINS_15DataWithNullKeyI9PHHashMapINS_9StringRefEPc11DefaultHashIS9_vEEEEEEEEEEvRT_ENKUlSI_E_clISA_EEDaSI_
Line
Count
Source
299
443
                             data.for_each_mapped([&](auto& mapped) {
300
443
                                 if (mapped) {
301
443
                                     _destroy_agg_status(mapped);
302
443
                                     mapped = nullptr;
303
443
                                 }
304
443
                             });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEvRT_ENKUlSD_E_clIS7_EEDaSD_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_6UInt72EPc9HashCRC32IS7_EEEEEEvRT_ENKUlSE_E_clIS8_EEDaSE_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_6UInt96EPc9HashCRC32IS7_EEEEEEvRT_ENKUlSE_E_clIS8_EEDaSE_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_7UInt104EPc9HashCRC32IS7_EEEEEEvRT_ENKUlSE_E_clIS8_EEDaSE_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEEvRT_ENKUlSG_E_clISA_EEDaSG_
dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_7UInt136EPc9HashCRC32IS7_EEEEEEvRT_ENKUlSE_E_clIS8_EEDaSE_
Line
Count
Source
299
63
                             data.for_each_mapped([&](auto& mapped) {
300
63
                                 if (mapped) {
301
32
                                     _destroy_agg_status(mapped);
302
32
                                     mapped = nullptr;
303
32
                                 }
304
63
                             });
dependency.cpp:_ZZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEEvRT_ENKUlSG_E_clISA_EEDaSG_
Line
Count
Source
299
90
                             data.for_each_mapped([&](auto& mapped) {
300
90
                                 if (mapped) {
301
45
                                     _destroy_agg_status(mapped);
302
45
                                     mapped = nullptr;
303
45
                                 }
304
90
                             });
305
                             if constexpr (std::is_assignable_v<decltype(data.has_null_key_data()),
306
52.2k
                                                                bool>) {
307
52.2k
                                 if (data.has_null_key_data()) {
308
2
                                     _destroy_agg_status(
309
2
                                             data.template get_null_key_data<AggregateDataPtr>());
310
2
                                 }
311
52.2k
                             }
312
134k
                         }},
dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEvRT_
Line
Count
Source
292
25.3k
                         [&](auto& agg_method) -> void {
293
25.3k
                             if (use_simple_count) {
294
                                 // simple_count: mapped slots hold UInt64 counters,
295
                                 // not real agg state pointers. Skip destroy.
296
0
                                 return;
297
0
                             }
298
25.3k
                             auto& data = *agg_method.hash_table;
299
25.3k
                             data.for_each_mapped([&](auto& mapped) {
300
25.3k
                                 if (mapped) {
301
25.3k
                                     _destroy_agg_status(mapped);
302
25.3k
                                     mapped = nullptr;
303
25.3k
                                 }
304
25.3k
                             });
305
                             if constexpr (std::is_assignable_v<decltype(data.has_null_key_data()),
306
                                                                bool>) {
307
                                 if (data.has_null_key_data()) {
308
                                     _destroy_agg_status(
309
                                             data.template get_null_key_data<AggregateDataPtr>());
310
                                 }
311
                             }
312
25.3k
                         }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEvRT_
dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEvRT_
Line
Count
Source
292
3.07k
                         [&](auto& agg_method) -> void {
293
3.07k
                             if (use_simple_count) {
294
                                 // simple_count: mapped slots hold UInt64 counters,
295
                                 // not real agg state pointers. Skip destroy.
296
0
                                 return;
297
0
                             }
298
3.07k
                             auto& data = *agg_method.hash_table;
299
3.07k
                             data.for_each_mapped([&](auto& mapped) {
300
3.07k
                                 if (mapped) {
301
3.07k
                                     _destroy_agg_status(mapped);
302
3.07k
                                     mapped = nullptr;
303
3.07k
                                 }
304
3.07k
                             });
305
                             if constexpr (std::is_assignable_v<decltype(data.has_null_key_data()),
306
                                                                bool>) {
307
                                 if (data.has_null_key_data()) {
308
                                     _destroy_agg_status(
309
                                             data.template get_null_key_data<AggregateDataPtr>());
310
                                 }
311
                             }
312
3.07k
                         }},
dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEvRT_
Line
Count
Source
292
7.42k
                         [&](auto& agg_method) -> void {
293
7.42k
                             if (use_simple_count) {
294
                                 // simple_count: mapped slots hold UInt64 counters,
295
                                 // not real agg state pointers. Skip destroy.
296
1.53k
                                 return;
297
1.53k
                             }
298
5.88k
                             auto& data = *agg_method.hash_table;
299
5.88k
                             data.for_each_mapped([&](auto& mapped) {
300
5.88k
                                 if (mapped) {
301
5.88k
                                     _destroy_agg_status(mapped);
302
5.88k
                                     mapped = nullptr;
303
5.88k
                                 }
304
5.88k
                             });
305
                             if constexpr (std::is_assignable_v<decltype(data.has_null_key_data()),
306
                                                                bool>) {
307
                                 if (data.has_null_key_data()) {
308
                                     _destroy_agg_status(
309
                                             data.template get_null_key_data<AggregateDataPtr>());
310
                                 }
311
                             }
312
5.88k
                         }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEvRT_
dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_19MethodStringNoCacheI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEvRT_
Line
Count
Source
292
25.0k
                         [&](auto& agg_method) -> void {
293
25.0k
                             if (use_simple_count) {
294
                                 // simple_count: mapped slots hold UInt64 counters,
295
                                 // not real agg state pointers. Skip destroy.
296
16.8k
                                 return;
297
16.8k
                             }
298
8.19k
                             auto& data = *agg_method.hash_table;
299
8.19k
                             data.for_each_mapped([&](auto& mapped) {
300
8.19k
                                 if (mapped) {
301
8.19k
                                     _destroy_agg_status(mapped);
302
8.19k
                                     mapped = nullptr;
303
8.19k
                                 }
304
8.19k
                             });
305
                             if constexpr (std::is_assignable_v<decltype(data.has_null_key_data()),
306
                                                                bool>) {
307
                                 if (data.has_null_key_data()) {
308
                                     _destroy_agg_status(
309
                                             data.template get_null_key_data<AggregateDataPtr>());
310
                                 }
311
                             }
312
8.19k
                         }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEvRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEvRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEvRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEvRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIhNS_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEvRT_
dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberItNS_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEvRT_
Line
Count
Source
292
768
                         [&](auto& agg_method) -> void {
293
768
                             if (use_simple_count) {
294
                                 // simple_count: mapped slots hold UInt64 counters,
295
                                 // not real agg state pointers. Skip destroy.
296
0
                                 return;
297
0
                             }
298
768
                             auto& data = *agg_method.hash_table;
299
768
                             data.for_each_mapped([&](auto& mapped) {
300
768
                                 if (mapped) {
301
768
                                     _destroy_agg_status(mapped);
302
768
                                     mapped = nullptr;
303
768
                                 }
304
768
                             });
305
                             if constexpr (std::is_assignable_v<decltype(data.has_null_key_data()),
306
768
                                                                bool>) {
307
768
                                 if (data.has_null_key_data()) {
308
0
                                     _destroy_agg_status(
309
0
                                             data.template get_null_key_data<AggregateDataPtr>());
310
0
                                 }
311
768
                             }
312
768
                         }},
dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIjNS_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEvRT_
Line
Count
Source
292
16.3k
                         [&](auto& agg_method) -> void {
293
16.3k
                             if (use_simple_count) {
294
                                 // simple_count: mapped slots hold UInt64 counters,
295
                                 // not real agg state pointers. Skip destroy.
296
0
                                 return;
297
0
                             }
298
16.3k
                             auto& data = *agg_method.hash_table;
299
16.3k
                             data.for_each_mapped([&](auto& mapped) {
300
16.3k
                                 if (mapped) {
301
16.3k
                                     _destroy_agg_status(mapped);
302
16.3k
                                     mapped = nullptr;
303
16.3k
                                 }
304
16.3k
                             });
305
                             if constexpr (std::is_assignable_v<decltype(data.has_null_key_data()),
306
16.3k
                                                                bool>) {
307
16.3k
                                 if (data.has_null_key_data()) {
308
0
                                     _destroy_agg_status(
309
0
                                             data.template get_null_key_data<AggregateDataPtr>());
310
0
                                 }
311
16.3k
                             }
312
16.3k
                         }},
dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberImNS_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEvRT_
Line
Count
Source
292
35.5k
                         [&](auto& agg_method) -> void {
293
35.5k
                             if (use_simple_count) {
294
                                 // simple_count: mapped slots hold UInt64 counters,
295
                                 // not real agg state pointers. Skip destroy.
296
768
                                 return;
297
768
                             }
298
34.8k
                             auto& data = *agg_method.hash_table;
299
34.8k
                             data.for_each_mapped([&](auto& mapped) {
300
34.8k
                                 if (mapped) {
301
34.8k
                                     _destroy_agg_status(mapped);
302
34.8k
                                     mapped = nullptr;
303
34.8k
                                 }
304
34.8k
                             });
305
                             if constexpr (std::is_assignable_v<decltype(data.has_null_key_data()),
306
34.8k
                                                                bool>) {
307
34.8k
                                 if (data.has_null_key_data()) {
308
2
                                     _destroy_agg_status(
309
2
                                             data.template get_null_key_data<AggregateDataPtr>());
310
2
                                 }
311
34.8k
                             }
312
34.8k
                         }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIjNS_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEvRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberImNS_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEvRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIN4wide7integerILm128EjEENS_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEvRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIN4wide7integerILm256EjEENS_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEvRT_
dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_26MethodSingleNullableColumnINS_19MethodStringNoCacheINS_15DataWithNullKeyI9PHHashMapINS_9StringRefEPc11DefaultHashIS9_vEEEEEEEEEEvRT_
Line
Count
Source
292
8.44k
                         [&](auto& agg_method) -> void {
293
8.44k
                             if (use_simple_count) {
294
                                 // simple_count: mapped slots hold UInt64 counters,
295
                                 // not real agg state pointers. Skip destroy.
296
8.19k
                                 return;
297
8.19k
                             }
298
256
                             auto& data = *agg_method.hash_table;
299
256
                             data.for_each_mapped([&](auto& mapped) {
300
256
                                 if (mapped) {
301
256
                                     _destroy_agg_status(mapped);
302
256
                                     mapped = nullptr;
303
256
                                 }
304
256
                             });
305
                             if constexpr (std::is_assignable_v<decltype(data.has_null_key_data()),
306
256
                                                                bool>) {
307
256
                                 if (data.has_null_key_data()) {
308
0
                                     _destroy_agg_status(
309
0
                                             data.template get_null_key_data<AggregateDataPtr>());
310
0
                                 }
311
256
                             }
312
256
                         }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEvRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_6UInt72EPc9HashCRC32IS7_EEEEEEvRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_6UInt96EPc9HashCRC32IS7_EEEEEEvRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_7UInt104EPc9HashCRC32IS7_EEEEEEvRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEEvRT_
dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_7UInt136EPc9HashCRC32IS7_EEEEEEvRT_
Line
Count
Source
292
36.6k
                         [&](auto& agg_method) -> void {
293
36.6k
                             if (use_simple_count) {
294
                                 // simple_count: mapped slots hold UInt64 counters,
295
                                 // not real agg state pointers. Skip destroy.
296
0
                                 return;
297
0
                             }
298
36.6k
                             auto& data = *agg_method.hash_table;
299
36.6k
                             data.for_each_mapped([&](auto& mapped) {
300
36.6k
                                 if (mapped) {
301
36.6k
                                     _destroy_agg_status(mapped);
302
36.6k
                                     mapped = nullptr;
303
36.6k
                                 }
304
36.6k
                             });
305
                             if constexpr (std::is_assignable_v<decltype(data.has_null_key_data()),
306
                                                                bool>) {
307
                                 if (data.has_null_key_data()) {
308
                                     _destroy_agg_status(
309
                                             data.template get_null_key_data<AggregateDataPtr>());
310
                                 }
311
                             }
312
36.6k
                         }},
dependency.cpp:_ZZN5doris22BucketedAggSharedState19_close_one_agg_dataERNS_23BucketedAggDataVariantsEENK3$_1clINS_15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEEvRT_
Line
Count
Source
292
2.81k
                         [&](auto& agg_method) -> void {
293
2.81k
                             if (use_simple_count) {
294
                                 // simple_count: mapped slots hold UInt64 counters,
295
                                 // not real agg state pointers. Skip destroy.
296
0
                                 return;
297
0
                             }
298
2.81k
                             auto& data = *agg_method.hash_table;
299
2.81k
                             data.for_each_mapped([&](auto& mapped) {
300
2.81k
                                 if (mapped) {
301
2.81k
                                     _destroy_agg_status(mapped);
302
2.81k
                                     mapped = nullptr;
303
2.81k
                                 }
304
2.81k
                             });
305
                             if constexpr (std::is_assignable_v<decltype(data.has_null_key_data()),
306
                                                                bool>) {
307
                                 if (data.has_null_key_data()) {
308
                                     _destroy_agg_status(
309
                                             data.template get_null_key_data<AggregateDataPtr>());
310
                                 }
311
                             }
312
2.81k
                         }},
313
161k
               agg_data.method_variant);
314
161k
}
315
316
99.7k
HashJoinSharedState::HashJoinSharedState() {
317
99.7k
    hash_table_variant_vector.push_back(std::make_shared<JoinDataVariants>());
318
99.7k
}
319
320
3.82k
HashJoinSharedState::HashJoinSharedState(int num_instances) {
321
3.82k
    source_deps.resize(num_instances, nullptr);
322
3.82k
    hash_table_variant_vector.resize(num_instances, nullptr);
323
23.7k
    for (int i = 0; i < num_instances; i++) {
324
19.9k
        hash_table_variant_vector[i] = std::make_shared<JoinDataVariants>();
325
19.9k
    }
326
3.82k
}
327
328
5.21k
SetSharedState::SetSharedState() : hash_table_variants(std::make_unique<SetDataVariants>()) {}
329
330
5.24k
SetSharedState::~SetSharedState() = default;
331
332
79
MutableColumns AggSharedState::_get_keys_hash_table() {
333
79
    return std::visit(
334
79
            Overload {[&](std::monostate& arg) {
335
0
                          throw doris::Exception(ErrorCode::INTERNAL_ERROR, "uninited hash table");
336
0
                          return MutableColumns();
337
0
                      },
338
79
                      [&](auto&& agg_method) -> MutableColumns {
339
79
                          MutableColumns key_columns;
340
188
                          for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
341
109
                              key_columns.emplace_back(
342
109
                                      probe_expr_ctxs[i]->root()->data_type()->create_column());
343
109
                          }
344
79
                          auto& data = *agg_method.hash_table;
345
79
                          bool has_null_key = data.has_null_key_data();
346
79
                          const auto size = data.size() - has_null_key;
347
79
                          using KeyType = std::decay_t<decltype(agg_method)>::Key;
348
79
                          std::vector<KeyType> keys(size);
349
350
79
                          uint32_t num_rows = 0;
351
79
                          auto iter = aggregate_data_container->begin();
352
79
                          {
353
20.9k
                              while (iter != aggregate_data_container->end()) {
354
20.8k
                                  keys[num_rows] = iter.get_key<KeyType>();
355
20.8k
                                  ++iter;
356
20.8k
                                  ++num_rows;
357
20.8k
                              }
358
79
                          }
359
79
                          agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
360
79
                          if (has_null_key) {
361
2
                              key_columns[0]->insert_data(nullptr, 0);
362
2
                          }
363
79
                          return key_columns;
364
79
                      }},
dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS5_vEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISE_EESaISH_EEOT_
Line
Count
Source
338
17
                      [&](auto&& agg_method) -> MutableColumns {
339
17
                          MutableColumns key_columns;
340
53
                          for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
341
36
                              key_columns.emplace_back(
342
36
                                      probe_expr_ctxs[i]->root()->data_type()->create_column());
343
36
                          }
344
17
                          auto& data = *agg_method.hash_table;
345
17
                          bool has_null_key = data.has_null_key_data();
346
17
                          const auto size = data.size() - has_null_key;
347
17
                          using KeyType = std::decay_t<decltype(agg_method)>::Key;
348
17
                          std::vector<KeyType> keys(size);
349
350
17
                          uint32_t num_rows = 0;
351
17
                          auto iter = aggregate_data_container->begin();
352
17
                          {
353
16.2k
                              while (iter != aggregate_data_container->end()) {
354
16.2k
                                  keys[num_rows] = iter.get_key<KeyType>();
355
16.2k
                                  ++iter;
356
16.2k
                                  ++num_rows;
357
16.2k
                              }
358
17
                          }
359
17
                          agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
360
17
                          if (has_null_key) {
361
0
                              key_columns[0]->insert_data(nullptr, 0);
362
0
                          }
363
17
                          return key_columns;
364
17
                      }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISD_EESaISG_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISD_EESaISG_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISD_EESaISG_EEOT_
dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISD_EESaISG_EEOT_
Line
Count
Source
338
2
                      [&](auto&& agg_method) -> MutableColumns {
339
2
                          MutableColumns key_columns;
340
4
                          for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
341
2
                              key_columns.emplace_back(
342
2
                                      probe_expr_ctxs[i]->root()->data_type()->create_column());
343
2
                          }
344
2
                          auto& data = *agg_method.hash_table;
345
2
                          bool has_null_key = data.has_null_key_data();
346
2
                          const auto size = data.size() - has_null_key;
347
2
                          using KeyType = std::decay_t<decltype(agg_method)>::Key;
348
2
                          std::vector<KeyType> keys(size);
349
350
2
                          uint32_t num_rows = 0;
351
2
                          auto iter = aggregate_data_container->begin();
352
2
                          {
353
12
                              while (iter != aggregate_data_container->end()) {
354
10
                                  keys[num_rows] = iter.get_key<KeyType>();
355
10
                                  ++iter;
356
10
                                  ++num_rows;
357
10
                              }
358
2
                          }
359
2
                          agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
360
2
                          if (has_null_key) {
361
0
                              key_columns[0]->insert_data(nullptr, 0);
362
0
                          }
363
2
                          return key_columns;
364
2
                      }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISE_EESaISH_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS6_Pc9HashCRC32IS6_EEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS6_Pc9HashCRC32IS6_EEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_
dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_
Line
Count
Source
338
4
                      [&](auto&& agg_method) -> MutableColumns {
339
4
                          MutableColumns key_columns;
340
8
                          for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
341
4
                              key_columns.emplace_back(
342
4
                                      probe_expr_ctxs[i]->root()->data_type()->create_column());
343
4
                          }
344
4
                          auto& data = *agg_method.hash_table;
345
4
                          bool has_null_key = data.has_null_key_data();
346
4
                          const auto size = data.size() - has_null_key;
347
4
                          using KeyType = std::decay_t<decltype(agg_method)>::Key;
348
4
                          std::vector<KeyType> keys(size);
349
350
4
                          uint32_t num_rows = 0;
351
4
                          auto iter = aggregate_data_container->begin();
352
4
                          {
353
20
                              while (iter != aggregate_data_container->end()) {
354
16
                                  keys[num_rows] = iter.get_key<KeyType>();
355
16
                                  ++iter;
356
16
                                  ++num_rows;
357
16
                              }
358
4
                          }
359
4
                          agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
360
4
                          if (has_null_key) {
361
0
                              key_columns[0]->insert_data(nullptr, 0);
362
0
                          }
363
4
                          return key_columns;
364
4
                      }},
dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_26MethodSingleNullableColumnINS_15MethodOneNumberIhNS_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISH_EESaISK_EEOT_
Line
Count
Source
338
1
                      [&](auto&& agg_method) -> MutableColumns {
339
1
                          MutableColumns key_columns;
340
2
                          for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
341
1
                              key_columns.emplace_back(
342
1
                                      probe_expr_ctxs[i]->root()->data_type()->create_column());
343
1
                          }
344
1
                          auto& data = *agg_method.hash_table;
345
1
                          bool has_null_key = data.has_null_key_data();
346
1
                          const auto size = data.size() - has_null_key;
347
1
                          using KeyType = std::decay_t<decltype(agg_method)>::Key;
348
1
                          std::vector<KeyType> keys(size);
349
350
1
                          uint32_t num_rows = 0;
351
1
                          auto iter = aggregate_data_container->begin();
352
1
                          {
353
13
                              while (iter != aggregate_data_container->end()) {
354
12
                                  keys[num_rows] = iter.get_key<KeyType>();
355
12
                                  ++iter;
356
12
                                  ++num_rows;
357
12
                              }
358
1
                          }
359
1
                          agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
360
1
                          if (has_null_key) {
361
0
                              key_columns[0]->insert_data(nullptr, 0);
362
0
                          }
363
1
                          return key_columns;
364
1
                      }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_26MethodSingleNullableColumnINS_15MethodOneNumberItNS_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISH_EESaISK_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_26MethodSingleNullableColumnINS_15MethodOneNumberIjNS_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISH_EESaISK_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_26MethodSingleNullableColumnINS_15MethodOneNumberImNS_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISH_EESaISK_EEOT_
dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_26MethodSingleNullableColumnINS_15MethodOneNumberIjNS_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_
Line
Count
Source
338
12
                      [&](auto&& agg_method) -> MutableColumns {
339
12
                          MutableColumns key_columns;
340
24
                          for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
341
12
                              key_columns.emplace_back(
342
12
                                      probe_expr_ctxs[i]->root()->data_type()->create_column());
343
12
                          }
344
12
                          auto& data = *agg_method.hash_table;
345
12
                          bool has_null_key = data.has_null_key_data();
346
12
                          const auto size = data.size() - has_null_key;
347
12
                          using KeyType = std::decay_t<decltype(agg_method)>::Key;
348
12
                          std::vector<KeyType> keys(size);
349
350
12
                          uint32_t num_rows = 0;
351
12
                          auto iter = aggregate_data_container->begin();
352
12
                          {
353
697
                              while (iter != aggregate_data_container->end()) {
354
685
                                  keys[num_rows] = iter.get_key<KeyType>();
355
685
                                  ++iter;
356
685
                                  ++num_rows;
357
685
                              }
358
12
                          }
359
12
                          agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
360
12
                          if (has_null_key) {
361
1
                              key_columns[0]->insert_data(nullptr, 0);
362
1
                          }
363
12
                          return key_columns;
364
12
                      }},
dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_26MethodSingleNullableColumnINS_15MethodOneNumberImNS_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_
Line
Count
Source
338
4
                      [&](auto&& agg_method) -> MutableColumns {
339
4
                          MutableColumns key_columns;
340
8
                          for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
341
4
                              key_columns.emplace_back(
342
4
                                      probe_expr_ctxs[i]->root()->data_type()->create_column());
343
4
                          }
344
4
                          auto& data = *agg_method.hash_table;
345
4
                          bool has_null_key = data.has_null_key_data();
346
4
                          const auto size = data.size() - has_null_key;
347
4
                          using KeyType = std::decay_t<decltype(agg_method)>::Key;
348
4
                          std::vector<KeyType> keys(size);
349
350
4
                          uint32_t num_rows = 0;
351
4
                          auto iter = aggregate_data_container->begin();
352
4
                          {
353
683
                              while (iter != aggregate_data_container->end()) {
354
679
                                  keys[num_rows] = iter.get_key<KeyType>();
355
679
                                  ++iter;
356
679
                                  ++num_rows;
357
679
                              }
358
4
                          }
359
4
                          agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
360
4
                          if (has_null_key) {
361
1
                              key_columns[0]->insert_data(nullptr, 0);
362
1
                          }
363
4
                          return key_columns;
364
4
                      }},
dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_26MethodSingleNullableColumnINS_15MethodOneNumberIN4wide7integerILm128EjEENS_15DataWithNullKeyI9PHHashMapIS7_Pc9HashCRC32IS7_EEEEEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISK_EESaISN_EEOT_
Line
Count
Source
338
1
                      [&](auto&& agg_method) -> MutableColumns {
339
1
                          MutableColumns key_columns;
340
2
                          for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
341
1
                              key_columns.emplace_back(
342
1
                                      probe_expr_ctxs[i]->root()->data_type()->create_column());
343
1
                          }
344
1
                          auto& data = *agg_method.hash_table;
345
1
                          bool has_null_key = data.has_null_key_data();
346
1
                          const auto size = data.size() - has_null_key;
347
1
                          using KeyType = std::decay_t<decltype(agg_method)>::Key;
348
1
                          std::vector<KeyType> keys(size);
349
350
1
                          uint32_t num_rows = 0;
351
1
                          auto iter = aggregate_data_container->begin();
352
1
                          {
353
8
                              while (iter != aggregate_data_container->end()) {
354
7
                                  keys[num_rows] = iter.get_key<KeyType>();
355
7
                                  ++iter;
356
7
                                  ++num_rows;
357
7
                              }
358
1
                          }
359
1
                          agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
360
1
                          if (has_null_key) {
361
0
                              key_columns[0]->insert_data(nullptr, 0);
362
0
                          }
363
1
                          return key_columns;
364
1
                      }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_26MethodSingleNullableColumnINS_15MethodOneNumberIN4wide7integerILm256EjEENS_15DataWithNullKeyI9PHHashMapIS7_Pc9HashCRC32IS7_EEEEEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISK_EESaISN_EEOT_
dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_26MethodSingleNullableColumnINS_19MethodStringNoCacheINS_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISI_EESaISL_EEOT_
Line
Count
Source
338
32
                      [&](auto&& agg_method) -> MutableColumns {
339
32
                          MutableColumns key_columns;
340
64
                          for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
341
32
                              key_columns.emplace_back(
342
32
                                      probe_expr_ctxs[i]->root()->data_type()->create_column());
343
32
                          }
344
32
                          auto& data = *agg_method.hash_table;
345
32
                          bool has_null_key = data.has_null_key_data();
346
32
                          const auto size = data.size() - has_null_key;
347
32
                          using KeyType = std::decay_t<decltype(agg_method)>::Key;
348
32
                          std::vector<KeyType> keys(size);
349
350
32
                          uint32_t num_rows = 0;
351
32
                          auto iter = aggregate_data_container->begin();
352
32
                          {
353
1.48k
                              while (iter != aggregate_data_container->end()) {
354
1.45k
                                  keys[num_rows] = iter.get_key<KeyType>();
355
1.45k
                                  ++iter;
356
1.45k
                                  ++num_rows;
357
1.45k
                              }
358
32
                          }
359
32
                          agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
360
32
                          if (has_null_key) {
361
0
                              key_columns[0]->insert_data(nullptr, 0);
362
0
                          }
363
32
                          return key_columns;
364
32
                      }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISD_EESaISG_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_15MethodKeysFixedI9PHHashMapINS_6UInt72EPc9HashCRC32IS5_EEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISE_EESaISH_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_15MethodKeysFixedI9PHHashMapINS_6UInt96EPc9HashCRC32IS5_EEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISE_EESaISH_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_15MethodKeysFixedI9PHHashMapINS_7UInt104EPc9HashCRC32IS5_EEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISE_EESaISH_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS7_EEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_15MethodKeysFixedI9PHHashMapINS_7UInt136EPc9HashCRC32IS5_EEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISE_EESaISH_EEOT_
dependency.cpp:_ZZN5doris14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS7_EEEEEESt6vectorINS_3COWINS_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_
Line
Count
Source
338
6
                      [&](auto&& agg_method) -> MutableColumns {
339
6
                          MutableColumns key_columns;
340
23
                          for (int i = 0; i < probe_expr_ctxs.size(); ++i) {
341
17
                              key_columns.emplace_back(
342
17
                                      probe_expr_ctxs[i]->root()->data_type()->create_column());
343
17
                          }
344
6
                          auto& data = *agg_method.hash_table;
345
6
                          bool has_null_key = data.has_null_key_data();
346
6
                          const auto size = data.size() - has_null_key;
347
6
                          using KeyType = std::decay_t<decltype(agg_method)>::Key;
348
6
                          std::vector<KeyType> keys(size);
349
350
6
                          uint32_t num_rows = 0;
351
6
                          auto iter = aggregate_data_container->begin();
352
6
                          {
353
1.77k
                              while (iter != aggregate_data_container->end()) {
354
1.76k
                                  keys[num_rows] = iter.get_key<KeyType>();
355
1.76k
                                  ++iter;
356
1.76k
                                  ++num_rows;
357
1.76k
                              }
358
6
                          }
359
6
                          agg_method.insert_keys_into_columns(keys, key_columns, num_rows);
360
6
                          if (has_null_key) {
361
0
                              key_columns[0]->insert_data(nullptr, 0);
362
0
                          }
363
6
                          return key_columns;
364
6
                      }},
365
79
            agg_data->method_variant);
366
79
}
367
368
79
void AggSharedState::build_limit_heap(size_t hash_table_size) {
369
79
    limit_columns = _get_keys_hash_table();
370
21.5k
    for (size_t i = 0; i < hash_table_size; ++i) {
371
21.4k
        limit_heap.emplace(i, limit_columns, order_directions, null_directions);
372
21.4k
    }
373
21.2k
    while (hash_table_size > limit) {
374
21.2k
        limit_heap.pop();
375
21.2k
        hash_table_size--;
376
21.2k
    }
377
79
    limit_columns_min = limit_heap.top()._row_id;
378
79
}
379
380
bool AggSharedState::do_limit_filter(Block* block, size_t num_rows,
381
508
                                     const std::vector<int>* key_locs) {
382
508
    if (num_rows) {
383
508
        cmp_res.resize(num_rows);
384
508
        need_computes.resize(num_rows);
385
508
        memset(need_computes.data(), 0, need_computes.size());
386
508
        memset(cmp_res.data(), 0, cmp_res.size());
387
388
508
        const auto key_size = null_directions.size();
389
1.49k
        for (int i = 0; i < key_size; i++) {
390
986
            block->get_by_position(key_locs ? key_locs->operator[](i) : i)
391
986
                    .column->compare_internal(limit_columns_min, *limit_columns[i],
392
986
                                              null_directions[i], order_directions[i], cmp_res,
393
986
                                              need_computes.data());
394
986
        }
395
396
508
        auto set_computes_arr = [](auto* __restrict res, auto* __restrict computes, size_t rows) {
397
794k
            for (size_t i = 0; i < rows; ++i) {
398
793k
                computes[i] = computes[i] == res[i];
399
793k
            }
400
508
        };
401
508
        set_computes_arr(cmp_res.data(), need_computes.data(), num_rows);
402
403
508
        return std::find(need_computes.begin(), need_computes.end(), 0) != need_computes.end();
404
508
    }
405
406
0
    return false;
407
508
}
408
409
54
Status AggSharedState::reset_hash_table() {
410
54
    return std::visit(
411
54
            Overload {
412
54
                    [&](std::monostate& arg) -> Status {
413
0
                        return Status::InternalError("Uninited hash table");
414
0
                    },
415
54
                    [&](auto& agg_method) {
416
54
                        auto& hash_table = *agg_method.hash_table;
417
54
                        using HashTableType = std::decay_t<decltype(hash_table)>;
418
419
54
                        agg_method.arena.clear();
420
54
                        agg_method.inited_iterator = false;
421
422
54
                        if (!use_simple_count) {
423
1.06M
                            hash_table.for_each_mapped([&](auto& mapped) {
424
1.06M
                                if (mapped) {
425
1.06M
                                    _destroy_agg_status(mapped);
426
1.06M
                                    mapped = nullptr;
427
1.06M
                                }
428
1.06M
                            });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS5_vEEEEEEDaRT_ENKUlSC_E_clIS6_EEDaSC_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEDaRT_ENKUlSB_E_clIS5_EEDaSB_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_ENKUlSB_E_clIS5_EEDaSB_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEDaRT_ENKUlSB_E_clIS5_EEDaSB_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ENKUlSB_E_clIS5_EEDaSB_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEDaRT_ENKUlSC_E_clIS5_EEDaSC_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS6_Pc9HashCRC32IS6_EEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS6_Pc9HashCRC32IS6_EEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_
dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEDaRT_ENKUlSD_E_clIS5_EEDaSD_
Line
Count
Source
423
1.06M
                            hash_table.for_each_mapped([&](auto& mapped) {
424
1.06M
                                if (mapped) {
425
1.06M
                                    _destroy_agg_status(mapped);
426
1.06M
                                    mapped = nullptr;
427
1.06M
                                }
428
1.06M
                            });
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEDaRT_ENKUlSD_E_clIS5_EEDaSD_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIhNS_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_ENKUlSF_E_clIS7_EEDaSF_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberItNS_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_ENKUlSF_E_clIS7_EEDaSF_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIjNS_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_ENKUlSF_E_clIS7_EEDaSF_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberImNS_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_ENKUlSF_E_clIS7_EEDaSF_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIjNS_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_ENKUlSH_E_clIS7_EEDaSH_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberImNS_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_ENKUlSH_E_clIS7_EEDaSH_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIN4wide7integerILm128EjEENS_15DataWithNullKeyI9PHHashMapIS7_Pc9HashCRC32IS7_EEEEEEEEEEDaRT_ENKUlSI_E_clISA_EEDaSI_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIN4wide7integerILm256EjEENS_15DataWithNullKeyI9PHHashMapIS7_Pc9HashCRC32IS7_EEEEEEEEEEDaRT_ENKUlSI_E_clISA_EEDaSI_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_19MethodStringNoCacheINS_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEEEEEDaRT_ENKUlSG_E_clIS7_EEDaSG_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ENKUlSB_E_clIS5_EEDaSB_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_6UInt72EPc9HashCRC32IS5_EEEEEEDaRT_ENKUlSC_E_clIS6_EEDaSC_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_6UInt96EPc9HashCRC32IS5_EEEEEEDaRT_ENKUlSC_E_clIS6_EEDaSC_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_7UInt104EPc9HashCRC32IS5_EEEEEEDaRT_ENKUlSC_E_clIS6_EEDaSC_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS7_EEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_7UInt136EPc9HashCRC32IS5_EEEEEEDaRT_ENKUlSC_E_clIS6_EEDaSC_
Unexecuted instantiation: dependency.cpp:_ZZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS7_EEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_
429
430
54
                            if (hash_table.has_null_key_data()) {
431
2
                                _destroy_agg_status(
432
2
                                        hash_table.template get_null_key_data<AggregateDataPtr>());
433
2
                            }
434
435
54
                            aggregate_data_container.reset(new AggregateDataContainer(
436
54
                                    sizeof(typename HashTableType::key_type),
437
54
                                    ((total_size_of_aggregate_states + align_aggregate_states - 1) /
438
54
                                     align_aggregate_states) *
439
54
                                            align_aggregate_states));
440
54
                        }
441
54
                        agg_method.hash_table.reset(new HashTableType());
442
54
                        return Status::OK();
443
54
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS5_vEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS6_Pc9HashCRC32IS6_EEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS6_Pc9HashCRC32IS6_EEEEEEDaRT_
dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEDaRT_
Line
Count
Source
415
52
                    [&](auto& agg_method) {
416
52
                        auto& hash_table = *agg_method.hash_table;
417
52
                        using HashTableType = std::decay_t<decltype(hash_table)>;
418
419
52
                        agg_method.arena.clear();
420
52
                        agg_method.inited_iterator = false;
421
422
52
                        if (!use_simple_count) {
423
52
                            hash_table.for_each_mapped([&](auto& mapped) {
424
52
                                if (mapped) {
425
52
                                    _destroy_agg_status(mapped);
426
52
                                    mapped = nullptr;
427
52
                                }
428
52
                            });
429
430
52
                            if (hash_table.has_null_key_data()) {
431
0
                                _destroy_agg_status(
432
0
                                        hash_table.template get_null_key_data<AggregateDataPtr>());
433
0
                            }
434
435
52
                            aggregate_data_container.reset(new AggregateDataContainer(
436
52
                                    sizeof(typename HashTableType::key_type),
437
52
                                    ((total_size_of_aggregate_states + align_aggregate_states - 1) /
438
52
                                     align_aggregate_states) *
439
52
                                            align_aggregate_states));
440
52
                        }
441
52
                        agg_method.hash_table.reset(new HashTableType());
442
52
                        return Status::OK();
443
52
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIhNS_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberItNS_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIjNS_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberImNS_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_
dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIjNS_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_
Line
Count
Source
415
2
                    [&](auto& agg_method) {
416
2
                        auto& hash_table = *agg_method.hash_table;
417
2
                        using HashTableType = std::decay_t<decltype(hash_table)>;
418
419
2
                        agg_method.arena.clear();
420
2
                        agg_method.inited_iterator = false;
421
422
2
                        if (!use_simple_count) {
423
2
                            hash_table.for_each_mapped([&](auto& mapped) {
424
2
                                if (mapped) {
425
2
                                    _destroy_agg_status(mapped);
426
2
                                    mapped = nullptr;
427
2
                                }
428
2
                            });
429
430
2
                            if (hash_table.has_null_key_data()) {
431
2
                                _destroy_agg_status(
432
2
                                        hash_table.template get_null_key_data<AggregateDataPtr>());
433
2
                            }
434
435
2
                            aggregate_data_container.reset(new AggregateDataContainer(
436
2
                                    sizeof(typename HashTableType::key_type),
437
2
                                    ((total_size_of_aggregate_states + align_aggregate_states - 1) /
438
2
                                     align_aggregate_states) *
439
2
                                            align_aggregate_states));
440
2
                        }
441
2
                        agg_method.hash_table.reset(new HashTableType());
442
2
                        return Status::OK();
443
2
                    }},
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberImNS_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIN4wide7integerILm128EjEENS_15DataWithNullKeyI9PHHashMapIS7_Pc9HashCRC32IS7_EEEEEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_15MethodOneNumberIN4wide7integerILm256EjEENS_15DataWithNullKeyI9PHHashMapIS7_Pc9HashCRC32IS7_EEEEEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_26MethodSingleNullableColumnINS_19MethodStringNoCacheINS_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_6UInt72EPc9HashCRC32IS5_EEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_6UInt96EPc9HashCRC32IS5_EEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_7UInt104EPc9HashCRC32IS5_EEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS7_EEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapINS_7UInt136EPc9HashCRC32IS5_EEEEEEDaRT_
Unexecuted instantiation: dependency.cpp:_ZZN5doris14AggSharedState16reset_hash_tableEvENK3$_1clINS_15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS7_EEEEEEDaRT_
444
54
            agg_data->method_variant);
445
54
}
446
447
229
void PartitionedAggSharedState::close() {
448
229
    bool false_close = false;
449
229
    if (!is_closed.compare_exchange_strong(false_close, true)) {
450
11
        return;
451
11
    }
452
453
218
    for (auto& partition : _spill_partitions) {
454
84
        if (partition) {
455
31
            ExecEnv::GetInstance()->spill_file_mgr()->delete_spill_file(partition);
456
31
        }
457
84
    }
458
218
    _spill_partitions.clear();
459
218
}
460
461
43
void SpillSortSharedState::close() {
462
    // need to use CAS instead of only `if (!is_closed)` statement,
463
    // to avoid concurrent entry of close() both pass the if statement
464
43
    bool false_close = false;
465
43
    if (!is_closed.compare_exchange_strong(false_close, true)) {
466
16
        return;
467
16
    }
468
43
    DCHECK(!false_close && is_closed);
469
27
    sorted_spill_groups.clear();
470
27
}
471
472
MultiCastSharedState::MultiCastSharedState(ObjectPool* pool, int cast_sender_count, int node_id)
473
        : multi_cast_data_streamer(
474
4.35k
                  std::make_unique<MultiCastDataStreamer>(pool, cast_sender_count, node_id)) {}
475
476
60.4k
int AggSharedState::get_slot_column_id(const AggFnEvaluator* evaluator) {
477
60.4k
    auto ctxs = evaluator->input_exprs_ctxs();
478
18.4E
    CHECK(ctxs.size() == 1 && ctxs[0]->root()->is_slot_ref())
479
18.4E
            << "input_exprs_ctxs is invalid, input_exprs_ctx[0]="
480
18.4E
            << ctxs[0]->root()->debug_string();
481
60.4k
    return ((VSlotRef*)ctxs[0]->root().get())->column_id();
482
60.4k
}
483
484
2.92M
void AggSharedState::_destroy_agg_status(AggregateDataPtr data) {
485
6.23M
    for (int i = 0; i < aggregate_evaluators.size(); ++i) {
486
3.30M
        aggregate_evaluators[i]->destroy(data + offsets_of_aggregate_states[i]);
487
3.30M
    }
488
2.92M
}
489
490
31.4k
void BucketedAggSharedState::_destroy_agg_status(AggregateDataPtr data) {
491
31.4k
    DCHECK(!use_simple_count) << "should not call _destroy_agg_status when use_simple_count";
492
63.3k
    for (int i = 0; i < aggregate_evaluators.size(); ++i) {
493
31.9k
        aggregate_evaluators[i]->destroy(data + offsets_of_aggregate_states[i]);
494
31.9k
    }
495
31.4k
}
496
497
128k
LocalExchangeSharedState::~LocalExchangeSharedState() = default;
498
499
12.5k
Status SetSharedState::update_build_not_ignore_null(const VExprContextSPtrs& ctxs) {
500
12.5k
    if (ctxs.size() > build_not_ignore_null.size()) {
501
0
        return Status::InternalError("build_not_ignore_null not initialized");
502
0
    }
503
504
100k
    for (int i = 0; i < ctxs.size(); ++i) {
505
88.0k
        build_not_ignore_null[i] = build_not_ignore_null[i] || ctxs[i]->root()->is_nullable();
506
88.0k
    }
507
508
12.5k
    return Status::OK();
509
12.5k
}
510
511
14.8k
size_t SetSharedState::get_hash_table_size() const {
512
14.8k
    size_t hash_table_size = 0;
513
14.8k
    std::visit(
514
14.8k
            [&](auto&& arg) {
515
14.8k
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
14.8k
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
14.8k
                    hash_table_size = arg.hash_table->size();
518
14.8k
                }
519
14.8k
            },
Unexecuted instantiation: dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRSt9monostateEEDaOT_
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_16MethodSerializedI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS5_vEEEEEEDaOT_
Line
Count
Source
514
13.1k
            [&](auto&& arg) {
515
13.1k
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
13.1k
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
13.1k
                    hash_table_size = arg.hash_table->size();
518
13.1k
                }
519
13.1k
            },
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_19MethodStringNoCacheI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS5_vEEEEEEDaOT_
Line
Count
Source
514
66
            [&](auto&& arg) {
515
66
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
66
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
66
                    hash_table_size = arg.hash_table->size();
518
66
                }
519
66
            },
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_26MethodSingleNullableColumnINS_19MethodStringNoCacheINS_15DataWithNullKeyI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS7_vEEEEEEEEEEDaOT_
Line
Count
Source
514
170
            [&](auto&& arg) {
515
170
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
170
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
170
                    hash_table_size = arg.hash_table->size();
518
170
                }
519
170
            },
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_26MethodSingleNullableColumnINS_15MethodOneNumberIhNS_15DataWithNullKeyI9PHHashMapIhNS_14RowRefWithFlagE9HashCRC32IhEEEEEEEEEEDaOT_
Line
Count
Source
514
50
            [&](auto&& arg) {
515
50
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
50
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
50
                    hash_table_size = arg.hash_table->size();
518
50
                }
519
50
            },
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_26MethodSingleNullableColumnINS_15MethodOneNumberItNS_15DataWithNullKeyI9PHHashMapItNS_14RowRefWithFlagE9HashCRC32ItEEEEEEEEEEDaOT_
Line
Count
Source
514
8
            [&](auto&& arg) {
515
8
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
8
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
8
                    hash_table_size = arg.hash_table->size();
518
8
                }
519
8
            },
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_26MethodSingleNullableColumnINS_15MethodOneNumberIjNS_15DataWithNullKeyI9PHHashMapIjNS_14RowRefWithFlagE9HashCRC32IjEEEEEEEEEEDaOT_
Line
Count
Source
514
504
            [&](auto&& arg) {
515
504
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
504
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
504
                    hash_table_size = arg.hash_table->size();
518
504
                }
519
504
            },
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_26MethodSingleNullableColumnINS_15MethodOneNumberImNS_15DataWithNullKeyI9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEEEEEDaOT_
Line
Count
Source
514
64
            [&](auto&& arg) {
515
64
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
64
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
64
                    hash_table_size = arg.hash_table->size();
518
64
                }
519
64
            },
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_26MethodSingleNullableColumnINS_15MethodOneNumberIN4wide7integerILm128EjEENS_15DataWithNullKeyI9PHHashMapIS7_NS_14RowRefWithFlagE9HashCRC32IS7_EEEEEEEEEEDaOT_
Line
Count
Source
514
128
            [&](auto&& arg) {
515
128
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
128
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
128
                    hash_table_size = arg.hash_table->size();
518
128
                }
519
128
            },
Unexecuted instantiation: dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_26MethodSingleNullableColumnINS_15MethodOneNumberIN4wide7integerILm256EjEENS_15DataWithNullKeyI9PHHashMapIS7_NS_14RowRefWithFlagE9HashCRC32IS7_EEEEEEEEEEDaOT_
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_15MethodOneNumberIh9PHHashMapIhNS_14RowRefWithFlagE9HashCRC32IhEEEEEEDaOT_
Line
Count
Source
514
2
            [&](auto&& arg) {
515
2
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
2
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
2
                    hash_table_size = arg.hash_table->size();
518
2
                }
519
2
            },
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_15MethodOneNumberIt9PHHashMapItNS_14RowRefWithFlagE9HashCRC32ItEEEEEEDaOT_
Line
Count
Source
514
6
            [&](auto&& arg) {
515
6
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
6
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
6
                    hash_table_size = arg.hash_table->size();
518
6
                }
519
6
            },
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_15MethodOneNumberIj9PHHashMapIjNS_14RowRefWithFlagE9HashCRC32IjEEEEEEDaOT_
Line
Count
Source
514
220
            [&](auto&& arg) {
515
220
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
220
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
220
                    hash_table_size = arg.hash_table->size();
518
220
                }
519
220
            },
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_15MethodOneNumberIm9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEDaOT_
Line
Count
Source
514
42
            [&](auto&& arg) {
515
42
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
42
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
42
                    hash_table_size = arg.hash_table->size();
518
42
                }
519
42
            },
Unexecuted instantiation: dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS6_NS_14RowRefWithFlagE9HashCRC32IS6_EEEEEEDaOT_
Unexecuted instantiation: dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS6_NS_14RowRefWithFlagE9HashCRC32IS6_EEEEEEDaOT_
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_15MethodKeysFixedI9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEDaOT_
Line
Count
Source
514
18
            [&](auto&& arg) {
515
18
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
18
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
18
                    hash_table_size = arg.hash_table->size();
518
18
                }
519
18
            },
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_15MethodKeysFixedI9PHHashMapINS_6UInt72ENS_14RowRefWithFlagE9HashCRC32IS5_EEEEEEDaOT_
Line
Count
Source
514
350
            [&](auto&& arg) {
515
350
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
350
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
350
                    hash_table_size = arg.hash_table->size();
518
350
                }
519
350
            },
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_15MethodKeysFixedI9PHHashMapINS_6UInt96ENS_14RowRefWithFlagE9HashCRC32IS5_EEEEEEDaOT_
Line
Count
Source
514
24
            [&](auto&& arg) {
515
24
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
24
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
24
                    hash_table_size = arg.hash_table->size();
518
24
                }
519
24
            },
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_15MethodKeysFixedI9PHHashMapINS_7UInt104ENS_14RowRefWithFlagE9HashCRC32IS5_EEEEEEDaOT_
Line
Count
Source
514
12
            [&](auto&& arg) {
515
12
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
12
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
12
                    hash_table_size = arg.hash_table->size();
518
12
                }
519
12
            },
Unexecuted instantiation: dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEENS_14RowRefWithFlagE9HashCRC32IS7_EEEEEEDaOT_
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEENS_14RowRefWithFlagE9HashCRC32IS7_EEEEEEDaOT_
Line
Count
Source
514
4
            [&](auto&& arg) {
515
4
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
4
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
4
                    hash_table_size = arg.hash_table->size();
518
4
                }
519
4
            },
dependency.cpp:_ZZNK5doris14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_15MethodKeysFixedI9PHHashMapINS_7UInt136ENS_14RowRefWithFlagE9HashCRC32IS5_EEEEEEDaOT_
Line
Count
Source
514
42
            [&](auto&& arg) {
515
42
                using HashTableCtxType = std::decay_t<decltype(arg)>;
516
42
                if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
517
42
                    hash_table_size = arg.hash_table->size();
518
42
                }
519
42
            },
520
14.8k
            hash_table_variants->method_variant);
521
14.8k
    return hash_table_size;
522
14.8k
}
523
524
5.22k
Status SetSharedState::hash_table_init() {
525
5.22k
    std::vector<DataTypePtr> data_types;
526
40.8k
    for (size_t i = 0; i != child_exprs_lists[0].size(); ++i) {
527
35.6k
        auto& ctx = child_exprs_lists[0][i];
528
35.6k
        auto data_type = ctx->root()->data_type();
529
35.6k
        if (build_not_ignore_null[i]) {
530
35.2k
            data_type = make_nullable(data_type);
531
35.2k
        }
532
35.6k
        data_types.emplace_back(std::move(data_type));
533
35.6k
    }
534
5.22k
    return init_hash_method<SetDataVariants>(hash_table_variants.get(), data_types, true);
535
5.22k
}
536
537
53
void AggSharedState::refresh_top_limit(size_t row_id, const ColumnRawPtrs& key_columns) {
538
151
    for (int j = 0; j < key_columns.size(); ++j) {
539
98
        limit_columns[j]->insert_from(*key_columns[j], row_id);
540
98
    }
541
53
    limit_heap.emplace(limit_columns[0]->size() - 1, limit_columns, order_directions,
542
53
                       null_directions);
543
544
53
    limit_heap.pop();
545
53
    limit_columns_min = limit_heap.top()._row_id;
546
53
}
547
548
} // namespace doris