/root/doris/be/src/pipeline/dependency.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | // Licensed to the Apache Software Foundation (ASF) under one |
2 | | // or more contributor license agreements. See the NOTICE file |
3 | | // distributed with this work for additional information |
4 | | // regarding copyright ownership. The ASF licenses this file |
5 | | // to you under the Apache License, Version 2.0 (the |
6 | | // "License"); you may not use this file except in compliance |
7 | | // with the License. You may obtain a copy of the License at |
8 | | // |
9 | | // http://www.apache.org/licenses/LICENSE-2.0 |
10 | | // |
11 | | // Unless required by applicable law or agreed to in writing, |
12 | | // software distributed under the License is distributed on an |
13 | | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
14 | | // KIND, either express or implied. See the License for the |
15 | | // specific language governing permissions and limitations |
16 | | // under the License. |
17 | | |
18 | | #include "dependency.h" |
19 | | |
20 | | #include <memory> |
21 | | #include <mutex> |
22 | | |
23 | | #include "common/logging.h" |
24 | | #include "pipeline/exec/multi_cast_data_streamer.h" |
25 | | #include "pipeline/pipeline_fragment_context.h" |
26 | | #include "pipeline/pipeline_task.h" |
27 | | #include "runtime/exec_env.h" |
28 | | #include "runtime/memory/mem_tracker.h" |
29 | | #include "runtime_filter/runtime_filter_consumer.h" |
30 | | #include "vec/exprs/vectorized_agg_fn.h" |
31 | | #include "vec/exprs/vslot_ref.h" |
32 | | #include "vec/spill/spill_stream_manager.h" |
33 | | |
34 | | namespace doris::pipeline { |
35 | | #include "common/compile_check_begin.h" |
36 | | |
37 | | Dependency* BasicSharedState::create_source_dependency(int operator_id, int node_id, |
38 | 1.24M | const std::string& name) { |
39 | 1.24M | source_deps.push_back(std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY")); |
40 | 1.24M | source_deps.back()->set_shared_state(this); |
41 | 1.24M | return source_deps.back().get(); |
42 | 1.24M | } |
43 | | |
44 | | void BasicSharedState::create_source_dependencies(int num_sources, int operator_id, int node_id, |
45 | 127k | const std::string& name) { |
46 | 127k | source_deps.resize(num_sources, nullptr); |
47 | 851k | for (auto& source_dep : source_deps) { |
48 | 851k | source_dep = std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY"); |
49 | 851k | source_dep->set_shared_state(this); |
50 | 851k | } |
51 | 127k | } |
52 | | |
53 | | Dependency* BasicSharedState::create_sink_dependency(int dest_id, int node_id, |
54 | 1.74M | const std::string& name) { |
55 | 1.74M | sink_deps.push_back(std::make_shared<Dependency>(dest_id, node_id, name + "_DEPENDENCY", true)); |
56 | 1.74M | sink_deps.back()->set_shared_state(this); |
57 | 1.74M | return sink_deps.back().get(); |
58 | 1.74M | } |
59 | | |
60 | 8.21M | void Dependency::_add_block_task(std::shared_ptr<PipelineTask> task) { |
61 | 18.4E | DCHECK(_blocked_task.empty() || _blocked_task[_blocked_task.size() - 1].lock() == nullptr || |
62 | 18.4E | _blocked_task[_blocked_task.size() - 1].lock().get() != task.get()) |
63 | 18.4E | << "Duplicate task: " << task->debug_string(); |
64 | 8.21M | _blocked_task.push_back(task); |
65 | 8.21M | } |
66 | | |
67 | 412M | void Dependency::set_ready() { |
68 | 412M | if (_ready) { |
69 | 404M | return; |
70 | 404M | } |
71 | 8.05M | _watcher.stop(); |
72 | 8.05M | std::vector<std::weak_ptr<PipelineTask>> local_block_task {}; |
73 | 8.05M | { |
74 | 8.05M | std::unique_lock<std::mutex> lc(_task_lock); |
75 | 8.05M | if (_ready) { |
76 | 94 | return; |
77 | 94 | } |
78 | 8.05M | _ready = true; |
79 | 8.05M | local_block_task.swap(_blocked_task); |
80 | 8.05M | } |
81 | 8.21M | for (auto task : local_block_task) { |
82 | 8.22M | if (auto t = task.lock()) { |
83 | 8.22M | std::unique_lock<std::mutex> lc(_task_lock); |
84 | 8.22M | THROW_IF_ERROR(t->wake_up(this)); |
85 | 8.22M | } |
86 | 8.21M | } |
87 | 8.05M | } |
88 | | |
89 | 479M | Dependency* Dependency::is_blocked_by(std::shared_ptr<PipelineTask> task) { |
90 | 479M | std::unique_lock<std::mutex> lc(_task_lock); |
91 | 479M | auto ready = _ready.load(); |
92 | 479M | if (!ready && task) { |
93 | 8.22M | _add_block_task(task); |
94 | 8.22M | start_watcher(); |
95 | 8.22M | THROW_IF_ERROR(task->blocked(this)); |
96 | 8.22M | } |
97 | 479M | return ready ? nullptr : this; |
98 | 479M | } |
99 | | |
100 | 288k | std::string Dependency::debug_string(int indentation_level) { |
101 | 288k | fmt::memory_buffer debug_string_buffer; |
102 | 288k | fmt::format_to(debug_string_buffer, "{}{}: id={}, block task = {}, ready={}, _always_ready={}", |
103 | 288k | std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(), |
104 | 288k | _ready, _always_ready); |
105 | 288k | return fmt::to_string(debug_string_buffer); |
106 | 288k | } |
107 | | |
108 | 0 | std::string CountedFinishDependency::debug_string(int indentation_level) { |
109 | 0 | fmt::memory_buffer debug_string_buffer; |
110 | 0 | fmt::format_to(debug_string_buffer, |
111 | 0 | "{}{}: id={}, block_task={}, ready={}, _always_ready={}, count={}", |
112 | 0 | std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(), |
113 | 0 | _ready, _always_ready, _counter); |
114 | 0 | return fmt::to_string(debug_string_buffer); |
115 | 0 | } |
116 | | |
117 | 8.06k | void RuntimeFilterTimer::call_timeout() { |
118 | 8.06k | _parent->set_ready(); |
119 | 8.06k | } |
120 | | |
121 | 52.9k | void RuntimeFilterTimer::call_ready() { |
122 | 52.9k | _parent->set_ready(); |
123 | 52.9k | } |
124 | | |
125 | | // should check rf timeout in two case: |
126 | | // 1. the rf is ready just remove the wait queue |
127 | | // 2. if the rf have local dependency, the rf should start wait when all local dependency is ready |
128 | 1.69M | bool RuntimeFilterTimer::should_be_check_timeout() { |
129 | 1.69M | if (!_parent->ready() && !_local_runtime_filter_dependencies.empty()) { |
130 | 19.6k | bool all_ready = true; |
131 | 19.8k | for (auto& dep : _local_runtime_filter_dependencies) { |
132 | 19.8k | if (!dep->ready()) { |
133 | 19.4k | all_ready = false; |
134 | 19.4k | break; |
135 | 19.4k | } |
136 | 19.8k | } |
137 | 19.6k | if (all_ready) { |
138 | 170 | _local_runtime_filter_dependencies.clear(); |
139 | 170 | _registration_time = MonotonicMillis(); |
140 | 170 | } |
141 | 19.6k | return all_ready; |
142 | 19.6k | } |
143 | 1.67M | return true; |
144 | 1.69M | } |
145 | | |
146 | 5 | void RuntimeFilterTimerQueue::start() { |
147 | 168k | while (!_stop) { |
148 | 168k | std::unique_lock<std::mutex> lk(cv_m); |
149 | | |
150 | 176k | while (_que.empty() && !_stop) { |
151 | 16.4k | cv.wait_for(lk, std::chrono::seconds(3), [this] { return !_que.empty() || _stop; }); |
152 | 8.24k | } |
153 | 168k | if (_stop) { |
154 | 2 | break; |
155 | 2 | } |
156 | 168k | { |
157 | 168k | std::unique_lock<std::mutex> lc(_que_lock); |
158 | 168k | std::list<std::shared_ptr<pipeline::RuntimeFilterTimer>> new_que; |
159 | 1.69M | for (auto& it : _que) { |
160 | 1.69M | if (it.use_count() == 1) { |
161 | | // `use_count == 1` means this runtime filter has been released |
162 | 1.69M | } else if (it->should_be_check_timeout()) { |
163 | 1.67M | if (it->_parent->is_blocked_by()) { |
164 | | // This means runtime filter is not ready, so we call timeout or continue to poll this timer. |
165 | 1.62M | int64_t ms_since_registration = MonotonicMillis() - it->registration_time(); |
166 | 1.62M | if (ms_since_registration > it->wait_time_ms()) { |
167 | 8.06k | it->call_timeout(); |
168 | 1.61M | } else { |
169 | 1.61M | new_que.push_back(std::move(it)); |
170 | 1.61M | } |
171 | 1.62M | } |
172 | 1.67M | } else { |
173 | 19.4k | new_que.push_back(std::move(it)); |
174 | 19.4k | } |
175 | 1.69M | } |
176 | 168k | new_que.swap(_que); |
177 | 168k | } |
178 | 168k | std::this_thread::sleep_for(std::chrono::milliseconds(interval)); |
179 | 168k | } |
180 | 5 | _shutdown = true; |
181 | 5 | } |
182 | | |
183 | 327k | void LocalExchangeSharedState::sub_running_sink_operators() { |
184 | 327k | std::unique_lock<std::mutex> lc(le_lock); |
185 | 327k | if (exchanger->_running_sink_operators.fetch_sub(1) == 1) { |
186 | 120k | _set_always_ready(); |
187 | 120k | } |
188 | 327k | } |
189 | | |
190 | 815k | void LocalExchangeSharedState::sub_running_source_operators() { |
191 | 815k | std::unique_lock<std::mutex> lc(le_lock); |
192 | 815k | if (exchanger->_running_source_operators.fetch_sub(1) == 1) { |
193 | 120k | _set_always_ready(); |
194 | 120k | exchanger->finalize(); |
195 | 120k | } |
196 | 815k | } |
197 | | |
198 | 120k | LocalExchangeSharedState::LocalExchangeSharedState(int num_instances) { |
199 | 120k | source_deps.resize(num_instances, nullptr); |
200 | 120k | mem_counters.resize(num_instances, nullptr); |
201 | 120k | } |
202 | | |
203 | 130 | vectorized::MutableColumns AggSharedState::_get_keys_hash_table() { |
204 | 130 | return std::visit( |
205 | 130 | vectorized::Overload { |
206 | 130 | [&](std::monostate& arg) { |
207 | 0 | throw doris::Exception(ErrorCode::INTERNAL_ERROR, "uninited hash table"); |
208 | 0 | return vectorized::MutableColumns(); |
209 | 0 | }, |
210 | 130 | [&](auto&& agg_method) -> vectorized::MutableColumns { |
211 | 130 | vectorized::MutableColumns key_columns; |
212 | 330 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { |
213 | 200 | key_columns.emplace_back( |
214 | 200 | probe_expr_ctxs[i]->root()->data_type()->create_column()); |
215 | 200 | } |
216 | 130 | auto& data = *agg_method.hash_table; |
217 | 130 | bool has_null_key = data.has_null_key_data(); |
218 | 130 | const auto size = data.size() - has_null_key; |
219 | 130 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; |
220 | 130 | std::vector<KeyType> keys(size); |
221 | | |
222 | 130 | size_t num_rows = 0; |
223 | 130 | auto iter = aggregate_data_container->begin(); |
224 | 130 | { |
225 | 27.6k | while (iter != aggregate_data_container->end()) { |
226 | 27.4k | keys[num_rows] = iter.get_key<KeyType>(); |
227 | 27.4k | ++iter; |
228 | 27.4k | ++num_rows; |
229 | 27.4k | } |
230 | 130 | } |
231 | 130 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); |
232 | 130 | if (has_null_key) { |
233 | 3 | key_columns[0]->insert_data(nullptr, 0); |
234 | 3 | } |
235 | 130 | return key_columns; |
236 | 130 | }}, dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_ Line | Count | Source | 210 | 10 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 10 | vectorized::MutableColumns key_columns; | 212 | 46 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 36 | key_columns.emplace_back( | 214 | 36 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 36 | } | 216 | 10 | auto& data = *agg_method.hash_table; | 217 | 10 | bool has_null_key = data.has_null_key_data(); | 218 | 10 | const auto size = data.size() - has_null_key; | 219 | 10 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 10 | std::vector<KeyType> keys(size); | 221 | | | 222 | 10 | size_t num_rows = 0; | 223 | 10 | auto iter = aggregate_data_container->begin(); | 224 | 10 | { | 225 | 12.2k | while (iter != aggregate_data_container->end()) { | 226 | 12.2k | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 12.2k | ++iter; | 228 | 12.2k | ++num_rows; | 229 | 12.2k | } | 230 | 10 | } | 231 | 10 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 10 | if (has_null_key) { | 233 | 0 | key_columns[0]->insert_data(nullptr, 0); | 234 | 0 | } | 235 | 10 | return key_columns; | 236 | 10 | }}, |
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_ Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_ dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_ Line | Count | Source | 210 | 4 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 4 | vectorized::MutableColumns key_columns; | 212 | 8 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 4 | key_columns.emplace_back( | 214 | 4 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 4 | } | 216 | 4 | auto& data = *agg_method.hash_table; | 217 | 4 | bool has_null_key = data.has_null_key_data(); | 218 | 4 | const auto size = data.size() - has_null_key; | 219 | 4 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 4 | std::vector<KeyType> keys(size); | 221 | | | 222 | 4 | size_t num_rows = 0; | 223 | 4 | auto iter = aggregate_data_container->begin(); | 224 | 4 | { | 225 | 12 | while (iter != aggregate_data_container->end()) { | 226 | 8 | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 8 | ++iter; | 228 | 8 | ++num_rows; | 229 | 8 | } | 230 | 4 | } | 231 | 4 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 4 | if (has_null_key) { | 233 | 0 | key_columns[0]->insert_data(nullptr, 0); | 234 | 0 | } | 235 | 4 | return key_columns; | 236 | 4 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_ Line | Count | Source | 210 | 14 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 14 | vectorized::MutableColumns key_columns; | 212 | 28 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 14 | key_columns.emplace_back( | 214 | 14 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 14 | } | 216 | 14 | auto& data = *agg_method.hash_table; | 217 | 14 | bool has_null_key = data.has_null_key_data(); | 218 | 14 | const auto size = data.size() - has_null_key; | 219 | 14 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 14 | std::vector<KeyType> keys(size); | 221 | | | 222 | 14 | size_t num_rows = 0; | 223 | 14 | auto iter = aggregate_data_container->begin(); | 224 | 14 | { | 225 | 84 | while (iter != aggregate_data_container->end()) { | 226 | 70 | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 70 | ++iter; | 228 | 70 | ++num_rows; | 229 | 70 | } | 230 | 14 | } | 231 | 14 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 14 | if (has_null_key) { | 233 | 0 | key_columns[0]->insert_data(nullptr, 0); | 234 | 0 | } | 235 | 14 | return key_columns; | 236 | 14 | }}, |
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_ Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISI_EESaISL_EEOT_ Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISI_EESaISL_EEOT_ dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISH_EESaISK_EEOT_ Line | Count | Source | 210 | 8 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 8 | vectorized::MutableColumns key_columns; | 212 | 16 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 8 | key_columns.emplace_back( | 214 | 8 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 8 | } | 216 | 8 | auto& data = *agg_method.hash_table; | 217 | 8 | bool has_null_key = data.has_null_key_data(); | 218 | 8 | const auto size = data.size() - has_null_key; | 219 | 8 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 8 | std::vector<KeyType> keys(size); | 221 | | | 222 | 8 | size_t num_rows = 0; | 223 | 8 | auto iter = aggregate_data_container->begin(); | 224 | 8 | { | 225 | 16 | while (iter != aggregate_data_container->end()) { | 226 | 8 | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 8 | ++iter; | 228 | 8 | ++num_rows; | 229 | 8 | } | 230 | 8 | } | 231 | 8 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 8 | if (has_null_key) { | 233 | 0 | key_columns[0]->insert_data(nullptr, 0); | 234 | 0 | } | 235 | 8 | return key_columns; | 236 | 8 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISH_EESaISK_EEOT_ Line | Count | Source | 210 | 8 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 8 | vectorized::MutableColumns key_columns; | 212 | 16 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 8 | key_columns.emplace_back( | 214 | 8 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 8 | } | 216 | 8 | auto& data = *agg_method.hash_table; | 217 | 8 | bool has_null_key = data.has_null_key_data(); | 218 | 8 | const auto size = data.size() - has_null_key; | 219 | 8 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 8 | std::vector<KeyType> keys(size); | 221 | | | 222 | 8 | size_t num_rows = 0; | 223 | 8 | auto iter = aggregate_data_container->begin(); | 224 | 8 | { | 225 | 32 | while (iter != aggregate_data_container->end()) { | 226 | 24 | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 24 | ++iter; | 228 | 24 | ++num_rows; | 229 | 24 | } | 230 | 8 | } | 231 | 8 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 8 | if (has_null_key) { | 233 | 0 | key_columns[0]->insert_data(nullptr, 0); | 234 | 0 | } | 235 | 8 | return key_columns; | 236 | 8 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_ Line | Count | Source | 210 | 6 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 6 | vectorized::MutableColumns key_columns; | 212 | 12 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 6 | key_columns.emplace_back( | 214 | 6 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 6 | } | 216 | 6 | auto& data = *agg_method.hash_table; | 217 | 6 | bool has_null_key = data.has_null_key_data(); | 218 | 6 | const auto size = data.size() - has_null_key; | 219 | 6 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 6 | std::vector<KeyType> keys(size); | 221 | | | 222 | 6 | size_t num_rows = 0; | 223 | 6 | auto iter = aggregate_data_container->begin(); | 224 | 6 | { | 225 | 60 | while (iter != aggregate_data_container->end()) { | 226 | 54 | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 54 | ++iter; | 228 | 54 | ++num_rows; | 229 | 54 | } | 230 | 6 | } | 231 | 6 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 6 | if (has_null_key) { | 233 | 0 | key_columns[0]->insert_data(nullptr, 0); | 234 | 0 | } | 235 | 6 | return key_columns; | 236 | 6 | }}, |
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_ dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_ Line | Count | Source | 210 | 8 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 8 | vectorized::MutableColumns key_columns; | 212 | 16 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 8 | key_columns.emplace_back( | 214 | 8 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 8 | } | 216 | 8 | auto& data = *agg_method.hash_table; | 217 | 8 | bool has_null_key = data.has_null_key_data(); | 218 | 8 | const auto size = data.size() - has_null_key; | 219 | 8 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 8 | std::vector<KeyType> keys(size); | 221 | | | 222 | 8 | size_t num_rows = 0; | 223 | 8 | auto iter = aggregate_data_container->begin(); | 224 | 8 | { | 225 | 3.28k | while (iter != aggregate_data_container->end()) { | 226 | 3.27k | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 3.27k | ++iter; | 228 | 3.27k | ++num_rows; | 229 | 3.27k | } | 230 | 8 | } | 231 | 8 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 8 | if (has_null_key) { | 233 | 0 | key_columns[0]->insert_data(nullptr, 0); | 234 | 0 | } | 235 | 8 | return key_columns; | 236 | 8 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_ Line | Count | Source | 210 | 8 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 8 | vectorized::MutableColumns key_columns; | 212 | 16 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 8 | key_columns.emplace_back( | 214 | 8 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 8 | } | 216 | 8 | auto& data = *agg_method.hash_table; | 217 | 8 | bool has_null_key = data.has_null_key_data(); | 218 | 8 | const auto size = data.size() - has_null_key; | 219 | 8 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 8 | std::vector<KeyType> keys(size); | 221 | | | 222 | 8 | size_t num_rows = 0; | 223 | 8 | auto iter = aggregate_data_container->begin(); | 224 | 8 | { | 225 | 3.29k | while (iter != aggregate_data_container->end()) { | 226 | 3.28k | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 3.28k | ++iter; | 228 | 3.28k | ++num_rows; | 229 | 3.28k | } | 230 | 8 | } | 231 | 8 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 8 | if (has_null_key) { | 233 | 0 | key_columns[0]->insert_data(nullptr, 0); | 234 | 0 | } | 235 | 8 | return key_columns; | 236 | 8 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISL_EESaISO_EEOT_ Line | Count | Source | 210 | 6 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 6 | vectorized::MutableColumns key_columns; | 212 | 12 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 6 | key_columns.emplace_back( | 214 | 6 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 6 | } | 216 | 6 | auto& data = *agg_method.hash_table; | 217 | 6 | bool has_null_key = data.has_null_key_data(); | 218 | 6 | const auto size = data.size() - has_null_key; | 219 | 6 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 6 | std::vector<KeyType> keys(size); | 221 | | | 222 | 6 | size_t num_rows = 0; | 223 | 6 | auto iter = aggregate_data_container->begin(); | 224 | 6 | { | 225 | 14 | while (iter != aggregate_data_container->end()) { | 226 | 8 | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 8 | ++iter; | 228 | 8 | ++num_rows; | 229 | 8 | } | 230 | 6 | } | 231 | 6 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 6 | if (has_null_key) { | 233 | 2 | key_columns[0]->insert_data(nullptr, 0); | 234 | 2 | } | 235 | 6 | return key_columns; | 236 | 6 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISL_EESaISO_EEOT_ Line | Count | Source | 210 | 4 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 4 | vectorized::MutableColumns key_columns; | 212 | 8 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 4 | key_columns.emplace_back( | 214 | 4 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 4 | } | 216 | 4 | auto& data = *agg_method.hash_table; | 217 | 4 | bool has_null_key = data.has_null_key_data(); | 218 | 4 | const auto size = data.size() - has_null_key; | 219 | 4 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 4 | std::vector<KeyType> keys(size); | 221 | | | 222 | 4 | size_t num_rows = 0; | 223 | 4 | auto iter = aggregate_data_container->begin(); | 224 | 4 | { | 225 | 21 | while (iter != aggregate_data_container->end()) { | 226 | 17 | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 17 | ++iter; | 228 | 17 | ++num_rows; | 229 | 17 | } | 230 | 4 | } | 231 | 4 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 4 | if (has_null_key) { | 233 | 1 | key_columns[0]->insert_data(nullptr, 0); | 234 | 1 | } | 235 | 4 | return key_columns; | 236 | 4 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISM_EESaISP_EEOT_ Line | Count | Source | 210 | 6 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 6 | vectorized::MutableColumns key_columns; | 212 | 12 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 6 | key_columns.emplace_back( | 214 | 6 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 6 | } | 216 | 6 | auto& data = *agg_method.hash_table; | 217 | 6 | bool has_null_key = data.has_null_key_data(); | 218 | 6 | const auto size = data.size() - has_null_key; | 219 | 6 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 6 | std::vector<KeyType> keys(size); | 221 | | | 222 | 6 | size_t num_rows = 0; | 223 | 6 | auto iter = aggregate_data_container->begin(); | 224 | 6 | { | 225 | 40 | while (iter != aggregate_data_container->end()) { | 226 | 34 | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 34 | ++iter; | 228 | 34 | ++num_rows; | 229 | 34 | } | 230 | 6 | } | 231 | 6 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 6 | if (has_null_key) { | 233 | 0 | key_columns[0]->insert_data(nullptr, 0); | 234 | 0 | } | 235 | 6 | return key_columns; | 236 | 6 | }}, |
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISM_EESaISP_EEOT_ dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISK_EESaISN_EEOT_ Line | Count | Source | 210 | 24 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 24 | vectorized::MutableColumns key_columns; | 212 | 48 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 24 | key_columns.emplace_back( | 214 | 24 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 24 | } | 216 | 24 | auto& data = *agg_method.hash_table; | 217 | 24 | bool has_null_key = data.has_null_key_data(); | 218 | 24 | const auto size = data.size() - has_null_key; | 219 | 24 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 24 | std::vector<KeyType> keys(size); | 221 | | | 222 | 24 | size_t num_rows = 0; | 223 | 24 | auto iter = aggregate_data_container->begin(); | 224 | 24 | { | 225 | 894 | while (iter != aggregate_data_container->end()) { | 226 | 870 | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 870 | ++iter; | 228 | 870 | ++num_rows; | 229 | 870 | } | 230 | 24 | } | 231 | 24 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 24 | if (has_null_key) { | 233 | 0 | key_columns[0]->insert_data(nullptr, 0); | 234 | 0 | } | 235 | 24 | return key_columns; | 236 | 24 | }}, |
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_ Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISI_EESaISL_EEOT_ dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISI_EESaISL_EEOT_ Line | Count | Source | 210 | 24 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 24 | vectorized::MutableColumns key_columns; | 212 | 92 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 68 | key_columns.emplace_back( | 214 | 68 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 68 | } | 216 | 24 | auto& data = *agg_method.hash_table; | 217 | 24 | bool has_null_key = data.has_null_key_data(); | 218 | 24 | const auto size = data.size() - has_null_key; | 219 | 24 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 24 | std::vector<KeyType> keys(size); | 221 | | | 222 | 24 | size_t num_rows = 0; | 223 | 24 | auto iter = aggregate_data_container->begin(); | 224 | 24 | { | 225 | 7.61k | while (iter != aggregate_data_container->end()) { | 226 | 7.58k | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 7.58k | ++iter; | 228 | 7.58k | ++num_rows; | 229 | 7.58k | } | 230 | 24 | } | 231 | 24 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 24 | if (has_null_key) { | 233 | 0 | key_columns[0]->insert_data(nullptr, 0); | 234 | 0 | } | 235 | 24 | return key_columns; | 236 | 24 | }}, |
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_ |
237 | 130 | agg_data->method_variant); |
238 | 130 | } |
239 | | |
240 | 130 | void AggSharedState::build_limit_heap(size_t hash_table_size) { |
241 | 130 | limit_columns = _get_keys_hash_table(); |
242 | 27.5k | for (size_t i = 0; i < hash_table_size; ++i) { |
243 | 27.4k | limit_heap.emplace(i, limit_columns, order_directions, null_directions); |
244 | 27.4k | } |
245 | 27.0k | while (hash_table_size > limit) { |
246 | 26.9k | limit_heap.pop(); |
247 | 26.9k | hash_table_size--; |
248 | 26.9k | } |
249 | 130 | limit_columns_min = limit_heap.top()._row_id; |
250 | 130 | } |
251 | | |
252 | | bool AggSharedState::do_limit_filter(vectorized::Block* block, size_t num_rows, |
253 | 1.72k | const std::vector<int>* key_locs) { |
254 | 1.72k | if (num_rows) { |
255 | 1.72k | cmp_res.resize(num_rows); |
256 | 1.72k | need_computes.resize(num_rows); |
257 | 1.72k | memset(need_computes.data(), 0, need_computes.size()); |
258 | 1.72k | memset(cmp_res.data(), 0, cmp_res.size()); |
259 | | |
260 | 1.72k | const auto key_size = null_directions.size(); |
261 | 5.20k | for (int i = 0; i < key_size; i++) { |
262 | 3.48k | block->get_by_position(key_locs ? key_locs->operator[](i) : i) |
263 | 3.48k | .column->compare_internal(limit_columns_min, *limit_columns[i], |
264 | 3.48k | null_directions[i], order_directions[i], cmp_res, |
265 | 3.48k | need_computes.data()); |
266 | 3.48k | } |
267 | | |
268 | 1.72k | auto set_computes_arr = [](auto* __restrict res, auto* __restrict computes, size_t rows) { |
269 | 1.73M | for (size_t i = 0; i < rows; ++i) { |
270 | 1.72M | computes[i] = computes[i] == res[i]; |
271 | 1.72M | } |
272 | 1.72k | }; |
273 | 1.72k | set_computes_arr(cmp_res.data(), need_computes.data(), num_rows); |
274 | | |
275 | 1.72k | return std::find(need_computes.begin(), need_computes.end(), 0) != need_computes.end(); |
276 | 1.72k | } |
277 | | |
278 | 0 | return false; |
279 | 1.72k | } |
280 | | |
281 | 29.2k | Status AggSharedState::reset_hash_table() { |
282 | 29.2k | return std::visit( |
283 | 29.2k | vectorized::Overload { |
284 | 29.2k | [&](std::monostate& arg) -> Status { |
285 | 0 | return Status::InternalError("Uninited hash table"); |
286 | 0 | }, |
287 | 29.2k | [&](auto& agg_method) { |
288 | 29.2k | auto& hash_table = *agg_method.hash_table; |
289 | 29.2k | using HashTableType = std::decay_t<decltype(hash_table)>; |
290 | | |
291 | 29.2k | agg_method.reset(); |
292 | | |
293 | 1.50M | hash_table.for_each_mapped([&](auto& mapped) { |
294 | 1.50M | if (mapped) { |
295 | 1.50M | static_cast<void>(_destroy_agg_status(mapped)); |
296 | 1.50M | mapped = nullptr; |
297 | 1.50M | } |
298 | 1.50M | }); dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_ Line | Count | Source | 293 | 52.3k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 52.3k | if (mapped) { | 295 | 52.3k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 52.3k | mapped = nullptr; | 297 | 52.3k | } | 298 | 52.3k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_ Line | Count | Source | 293 | 10 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 10 | if (mapped) { | 295 | 10 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 10 | mapped = nullptr; | 297 | 10 | } | 298 | 10 | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_ Line | Count | Source | 293 | 72 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 72 | if (mapped) { | 295 | 72 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 72 | mapped = nullptr; | 297 | 72 | } | 298 | 72 | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_ Line | Count | Source | 293 | 189k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 189k | if (mapped) { | 295 | 189k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 189k | mapped = nullptr; | 297 | 189k | } | 298 | 189k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_ Line | Count | Source | 293 | 80.7k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 80.7k | if (mapped) { | 295 | 80.7k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 80.7k | mapped = nullptr; | 297 | 80.7k | } | 298 | 80.7k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEEDaRT_ENKUlSE_E_clIS7_EEDaSE_ Line | Count | Source | 293 | 9.24k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 9.24k | if (mapped) { | 295 | 9.24k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 9.24k | mapped = nullptr; | 297 | 9.24k | } | 298 | 9.24k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_ Line | Count | Source | 293 | 100 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 100 | if (mapped) { | 295 | 100 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 100 | mapped = nullptr; | 297 | 100 | } | 298 | 100 | }); |
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_ dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEDaRT_ENKUlSF_E_clIS7_EEDaSF_ Line | Count | Source | 293 | 1.06M | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 1.06M | if (mapped) { | 295 | 1.06M | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 1.06M | mapped = nullptr; | 297 | 1.06M | } | 298 | 1.06M | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEDaRT_ENKUlSF_E_clIS7_EEDaSF_ Line | Count | Source | 293 | 79.0k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 79.0k | if (mapped) { | 295 | 79.0k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 79.0k | mapped = nullptr; | 297 | 79.0k | } | 298 | 79.0k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_ Line | Count | Source | 293 | 266 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 266 | if (mapped) { | 295 | 266 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 266 | mapped = nullptr; | 297 | 266 | } | 298 | 266 | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_ Line | Count | Source | 293 | 350 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 350 | if (mapped) { | 295 | 350 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 350 | mapped = nullptr; | 297 | 350 | } | 298 | 350 | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_ Line | Count | Source | 293 | 618 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 618 | if (mapped) { | 295 | 618 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 618 | mapped = nullptr; | 297 | 618 | } | 298 | 618 | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_ Line | Count | Source | 293 | 40 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 40 | if (mapped) { | 295 | 40 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 40 | mapped = nullptr; | 297 | 40 | } | 298 | 40 | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_ENKUlSJ_E_clIS9_EEDaSJ_ Line | Count | Source | 293 | 768 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 768 | if (mapped) { | 295 | 768 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 768 | mapped = nullptr; | 297 | 768 | } | 298 | 768 | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_ENKUlSJ_E_clIS9_EEDaSJ_ Line | Count | Source | 293 | 302 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 302 | if (mapped) { | 295 | 302 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 302 | mapped = nullptr; | 297 | 302 | } | 298 | 302 | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ENKUlSK_E_clISC_EEDaSK_ Line | Count | Source | 293 | 24 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 24 | if (mapped) { | 295 | 24 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 24 | mapped = nullptr; | 297 | 24 | } | 298 | 24 | }); |
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ENKUlSK_E_clISC_EEDaSK_ dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEEEEEEDaRT_ENKUlSI_E_clIS9_EEDaSI_ Line | Count | Source | 293 | 3.50k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 3.50k | if (mapped) { | 295 | 3.50k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 3.50k | mapped = nullptr; | 297 | 3.50k | } | 298 | 3.50k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_ Line | Count | Source | 293 | 290 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 290 | if (mapped) { | 295 | 290 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 290 | mapped = nullptr; | 297 | 290 | } | 298 | 290 | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_ Line | Count | Source | 293 | 20.3k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 20.3k | if (mapped) { | 295 | 20.3k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 20.3k | mapped = nullptr; | 297 | 20.3k | } | 298 | 20.3k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_ Line | Count | Source | 293 | 528 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 528 | if (mapped) { | 295 | 528 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 528 | mapped = nullptr; | 297 | 528 | } | 298 | 528 | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_ Line | Count | Source | 293 | 3.57k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 3.57k | if (mapped) { | 295 | 3.57k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 3.57k | mapped = nullptr; | 297 | 3.57k | } | 298 | 3.57k | }); |
|
299 | | |
300 | 29.2k | if (hash_table.has_null_key_data()) { |
301 | 132 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< |
302 | 132 | vectorized::AggregateDataPtr>()); |
303 | 132 | RETURN_IF_ERROR(st); |
304 | 132 | } |
305 | | |
306 | 29.2k | aggregate_data_container.reset(new AggregateDataContainer( |
307 | 29.2k | sizeof(typename HashTableType::key_type), |
308 | 29.2k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / |
309 | 29.2k | align_aggregate_states) * |
310 | 29.2k | align_aggregate_states)); |
311 | 29.2k | agg_method.hash_table.reset(new HashTableType()); |
312 | 29.2k | agg_arena_pool.reset(new vectorized::Arena); |
313 | 29.2k | return Status::OK(); |
314 | 29.2k | }}, dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEDaRT_ Line | Count | Source | 287 | 7.91k | [&](auto& agg_method) { | 288 | 7.91k | auto& hash_table = *agg_method.hash_table; | 289 | 7.91k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 7.91k | agg_method.reset(); | 292 | | | 293 | 7.91k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 7.91k | if (mapped) { | 295 | 7.91k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 7.91k | mapped = nullptr; | 297 | 7.91k | } | 298 | 7.91k | }); | 299 | | | 300 | 7.91k | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 7.91k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 7.91k | sizeof(typename HashTableType::key_type), | 308 | 7.91k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 7.91k | align_aggregate_states) * | 310 | 7.91k | align_aggregate_states)); | 311 | 7.91k | agg_method.hash_table.reset(new HashTableType()); | 312 | 7.91k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 7.91k | return Status::OK(); | 314 | 7.91k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEDaRT_ Line | Count | Source | 287 | 14 | [&](auto& agg_method) { | 288 | 14 | auto& hash_table = *agg_method.hash_table; | 289 | 14 | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 14 | agg_method.reset(); | 292 | | | 293 | 14 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 14 | if (mapped) { | 295 | 14 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 14 | mapped = nullptr; | 297 | 14 | } | 298 | 14 | }); | 299 | | | 300 | 14 | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 14 | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 14 | sizeof(typename HashTableType::key_type), | 308 | 14 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 14 | align_aggregate_states) * | 310 | 14 | align_aggregate_states)); | 311 | 14 | agg_method.hash_table.reset(new HashTableType()); | 312 | 14 | agg_arena_pool.reset(new vectorized::Arena); | 313 | 14 | return Status::OK(); | 314 | 14 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_ Line | Count | Source | 287 | 88 | [&](auto& agg_method) { | 288 | 88 | auto& hash_table = *agg_method.hash_table; | 289 | 88 | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 88 | agg_method.reset(); | 292 | | | 293 | 88 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 88 | if (mapped) { | 295 | 88 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 88 | mapped = nullptr; | 297 | 88 | } | 298 | 88 | }); | 299 | | | 300 | 88 | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 88 | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 88 | sizeof(typename HashTableType::key_type), | 308 | 88 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 88 | align_aggregate_states) * | 310 | 88 | align_aggregate_states)); | 311 | 88 | agg_method.hash_table.reset(new HashTableType()); | 312 | 88 | agg_arena_pool.reset(new vectorized::Arena); | 313 | 88 | return Status::OK(); | 314 | 88 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEDaRT_ Line | Count | Source | 287 | 2.71k | [&](auto& agg_method) { | 288 | 2.71k | auto& hash_table = *agg_method.hash_table; | 289 | 2.71k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 2.71k | agg_method.reset(); | 292 | | | 293 | 2.71k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 2.71k | if (mapped) { | 295 | 2.71k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 2.71k | mapped = nullptr; | 297 | 2.71k | } | 298 | 2.71k | }); | 299 | | | 300 | 2.71k | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 2.71k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 2.71k | sizeof(typename HashTableType::key_type), | 308 | 2.71k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 2.71k | align_aggregate_states) * | 310 | 2.71k | align_aggregate_states)); | 311 | 2.71k | agg_method.hash_table.reset(new HashTableType()); | 312 | 2.71k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 2.71k | return Status::OK(); | 314 | 2.71k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ Line | Count | Source | 287 | 328 | [&](auto& agg_method) { | 288 | 328 | auto& hash_table = *agg_method.hash_table; | 289 | 328 | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 328 | agg_method.reset(); | 292 | | | 293 | 328 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 328 | if (mapped) { | 295 | 328 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 328 | mapped = nullptr; | 297 | 328 | } | 298 | 328 | }); | 299 | | | 300 | 328 | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 328 | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 328 | sizeof(typename HashTableType::key_type), | 308 | 328 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 328 | align_aggregate_states) * | 310 | 328 | align_aggregate_states)); | 311 | 328 | agg_method.hash_table.reset(new HashTableType()); | 312 | 328 | agg_arena_pool.reset(new vectorized::Arena); | 313 | 328 | return Status::OK(); | 314 | 328 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEEDaRT_ Line | Count | Source | 287 | 2.58k | [&](auto& agg_method) { | 288 | 2.58k | auto& hash_table = *agg_method.hash_table; | 289 | 2.58k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 2.58k | agg_method.reset(); | 292 | | | 293 | 2.58k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 2.58k | if (mapped) { | 295 | 2.58k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 2.58k | mapped = nullptr; | 297 | 2.58k | } | 298 | 2.58k | }); | 299 | | | 300 | 2.58k | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 2.58k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 2.58k | sizeof(typename HashTableType::key_type), | 308 | 2.58k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 2.58k | align_aggregate_states) * | 310 | 2.58k | align_aggregate_states)); | 311 | 2.58k | agg_method.hash_table.reset(new HashTableType()); | 312 | 2.58k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 2.58k | return Status::OK(); | 314 | 2.58k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_ Line | Count | Source | 287 | 96 | [&](auto& agg_method) { | 288 | 96 | auto& hash_table = *agg_method.hash_table; | 289 | 96 | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 96 | agg_method.reset(); | 292 | | | 293 | 96 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 96 | if (mapped) { | 295 | 96 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 96 | mapped = nullptr; | 297 | 96 | } | 298 | 96 | }); | 299 | | | 300 | 96 | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 96 | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 96 | sizeof(typename HashTableType::key_type), | 308 | 96 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 96 | align_aggregate_states) * | 310 | 96 | align_aggregate_states)); | 311 | 96 | agg_method.hash_table.reset(new HashTableType()); | 312 | 96 | agg_arena_pool.reset(new vectorized::Arena); | 313 | 96 | return Status::OK(); | 314 | 96 | }}, |
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_ dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEDaRT_ Line | Count | Source | 287 | 1.86k | [&](auto& agg_method) { | 288 | 1.86k | auto& hash_table = *agg_method.hash_table; | 289 | 1.86k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 1.86k | agg_method.reset(); | 292 | | | 293 | 1.86k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 1.86k | if (mapped) { | 295 | 1.86k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 1.86k | mapped = nullptr; | 297 | 1.86k | } | 298 | 1.86k | }); | 299 | | | 300 | 1.86k | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 1.86k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 1.86k | sizeof(typename HashTableType::key_type), | 308 | 1.86k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 1.86k | align_aggregate_states) * | 310 | 1.86k | align_aggregate_states)); | 311 | 1.86k | agg_method.hash_table.reset(new HashTableType()); | 312 | 1.86k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 1.86k | return Status::OK(); | 314 | 1.86k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEDaRT_ Line | Count | Source | 287 | 462 | [&](auto& agg_method) { | 288 | 462 | auto& hash_table = *agg_method.hash_table; | 289 | 462 | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 462 | agg_method.reset(); | 292 | | | 293 | 462 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 462 | if (mapped) { | 295 | 462 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 462 | mapped = nullptr; | 297 | 462 | } | 298 | 462 | }); | 299 | | | 300 | 462 | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 462 | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 462 | sizeof(typename HashTableType::key_type), | 308 | 462 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 462 | align_aggregate_states) * | 310 | 462 | align_aggregate_states)); | 311 | 462 | agg_method.hash_table.reset(new HashTableType()); | 312 | 462 | agg_arena_pool.reset(new vectorized::Arena); | 313 | 462 | return Status::OK(); | 314 | 462 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_ Line | Count | Source | 287 | 266 | [&](auto& agg_method) { | 288 | 266 | auto& hash_table = *agg_method.hash_table; | 289 | 266 | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 266 | agg_method.reset(); | 292 | | | 293 | 266 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 266 | if (mapped) { | 295 | 266 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 266 | mapped = nullptr; | 297 | 266 | } | 298 | 266 | }); | 299 | | | 300 | 266 | if (hash_table.has_null_key_data()) { | 301 | 2 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 2 | vectorized::AggregateDataPtr>()); | 303 | 2 | RETURN_IF_ERROR(st); | 304 | 2 | } | 305 | | | 306 | 266 | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 266 | sizeof(typename HashTableType::key_type), | 308 | 266 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 266 | align_aggregate_states) * | 310 | 266 | align_aggregate_states)); | 311 | 266 | agg_method.hash_table.reset(new HashTableType()); | 312 | 266 | agg_arena_pool.reset(new vectorized::Arena); | 313 | 266 | return Status::OK(); | 314 | 266 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_ Line | Count | Source | 287 | 370 | [&](auto& agg_method) { | 288 | 370 | auto& hash_table = *agg_method.hash_table; | 289 | 370 | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 370 | agg_method.reset(); | 292 | | | 293 | 370 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 370 | if (mapped) { | 295 | 370 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 370 | mapped = nullptr; | 297 | 370 | } | 298 | 370 | }); | 299 | | | 300 | 370 | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 370 | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 370 | sizeof(typename HashTableType::key_type), | 308 | 370 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 370 | align_aggregate_states) * | 310 | 370 | align_aggregate_states)); | 311 | 370 | agg_method.hash_table.reset(new HashTableType()); | 312 | 370 | agg_arena_pool.reset(new vectorized::Arena); | 313 | 370 | return Status::OK(); | 314 | 370 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_ Line | Count | Source | 287 | 808 | [&](auto& agg_method) { | 288 | 808 | auto& hash_table = *agg_method.hash_table; | 289 | 808 | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 808 | agg_method.reset(); | 292 | | | 293 | 808 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 808 | if (mapped) { | 295 | 808 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 808 | mapped = nullptr; | 297 | 808 | } | 298 | 808 | }); | 299 | | | 300 | 808 | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 808 | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 808 | sizeof(typename HashTableType::key_type), | 308 | 808 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 808 | align_aggregate_states) * | 310 | 808 | align_aggregate_states)); | 311 | 808 | agg_method.hash_table.reset(new HashTableType()); | 312 | 808 | agg_arena_pool.reset(new vectorized::Arena); | 313 | 808 | return Status::OK(); | 314 | 808 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_ Line | Count | Source | 287 | 58 | [&](auto& agg_method) { | 288 | 58 | auto& hash_table = *agg_method.hash_table; | 289 | 58 | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 58 | agg_method.reset(); | 292 | | | 293 | 58 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 58 | if (mapped) { | 295 | 58 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 58 | mapped = nullptr; | 297 | 58 | } | 298 | 58 | }); | 299 | | | 300 | 58 | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 58 | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 58 | sizeof(typename HashTableType::key_type), | 308 | 58 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 58 | align_aggregate_states) * | 310 | 58 | align_aggregate_states)); | 311 | 58 | agg_method.hash_table.reset(new HashTableType()); | 312 | 58 | agg_arena_pool.reset(new vectorized::Arena); | 313 | 58 | return Status::OK(); | 314 | 58 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_ Line | Count | Source | 287 | 1.00k | [&](auto& agg_method) { | 288 | 1.00k | auto& hash_table = *agg_method.hash_table; | 289 | 1.00k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 1.00k | agg_method.reset(); | 292 | | | 293 | 1.00k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 1.00k | if (mapped) { | 295 | 1.00k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 1.00k | mapped = nullptr; | 297 | 1.00k | } | 298 | 1.00k | }); | 299 | | | 300 | 1.00k | if (hash_table.has_null_key_data()) { | 301 | 2 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 2 | vectorized::AggregateDataPtr>()); | 303 | 2 | RETURN_IF_ERROR(st); | 304 | 2 | } | 305 | | | 306 | 1.00k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 1.00k | sizeof(typename HashTableType::key_type), | 308 | 1.00k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 1.00k | align_aggregate_states) * | 310 | 1.00k | align_aggregate_states)); | 311 | 1.00k | agg_method.hash_table.reset(new HashTableType()); | 312 | 1.00k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 1.00k | return Status::OK(); | 314 | 1.00k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_ Line | Count | Source | 287 | 396 | [&](auto& agg_method) { | 288 | 396 | auto& hash_table = *agg_method.hash_table; | 289 | 396 | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 396 | agg_method.reset(); | 292 | | | 293 | 396 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 396 | if (mapped) { | 295 | 396 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 396 | mapped = nullptr; | 297 | 396 | } | 298 | 396 | }); | 299 | | | 300 | 396 | if (hash_table.has_null_key_data()) { | 301 | 12 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 12 | vectorized::AggregateDataPtr>()); | 303 | 12 | RETURN_IF_ERROR(st); | 304 | 12 | } | 305 | | | 306 | 396 | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 396 | sizeof(typename HashTableType::key_type), | 308 | 396 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 396 | align_aggregate_states) * | 310 | 396 | align_aggregate_states)); | 311 | 396 | agg_method.hash_table.reset(new HashTableType()); | 312 | 396 | agg_arena_pool.reset(new vectorized::Arena); | 313 | 396 | return Status::OK(); | 314 | 396 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ Line | Count | Source | 287 | 22 | [&](auto& agg_method) { | 288 | 22 | auto& hash_table = *agg_method.hash_table; | 289 | 22 | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 22 | agg_method.reset(); | 292 | | | 293 | 22 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 22 | if (mapped) { | 295 | 22 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 22 | mapped = nullptr; | 297 | 22 | } | 298 | 22 | }); | 299 | | | 300 | 22 | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 22 | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 22 | sizeof(typename HashTableType::key_type), | 308 | 22 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 22 | align_aggregate_states) * | 310 | 22 | align_aggregate_states)); | 311 | 22 | agg_method.hash_table.reset(new HashTableType()); | 312 | 22 | agg_arena_pool.reset(new vectorized::Arena); | 313 | 22 | return Status::OK(); | 314 | 22 | }}, |
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEEEEEEDaRT_ Line | Count | Source | 287 | 2.65k | [&](auto& agg_method) { | 288 | 2.65k | auto& hash_table = *agg_method.hash_table; | 289 | 2.65k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 2.65k | agg_method.reset(); | 292 | | | 293 | 2.65k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 2.65k | if (mapped) { | 295 | 2.65k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 2.65k | mapped = nullptr; | 297 | 2.65k | } | 298 | 2.65k | }); | 299 | | | 300 | 2.65k | if (hash_table.has_null_key_data()) { | 301 | 116 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 116 | vectorized::AggregateDataPtr>()); | 303 | 116 | RETURN_IF_ERROR(st); | 304 | 116 | } | 305 | | | 306 | 2.65k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 2.65k | sizeof(typename HashTableType::key_type), | 308 | 2.65k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 2.65k | align_aggregate_states) * | 310 | 2.65k | align_aggregate_states)); | 311 | 2.65k | agg_method.hash_table.reset(new HashTableType()); | 312 | 2.65k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 2.65k | return Status::OK(); | 314 | 2.65k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ Line | Count | Source | 287 | 254 | [&](auto& agg_method) { | 288 | 254 | auto& hash_table = *agg_method.hash_table; | 289 | 254 | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 254 | agg_method.reset(); | 292 | | | 293 | 254 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 254 | if (mapped) { | 295 | 254 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 254 | mapped = nullptr; | 297 | 254 | } | 298 | 254 | }); | 299 | | | 300 | 254 | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 254 | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 254 | sizeof(typename HashTableType::key_type), | 308 | 254 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 254 | align_aggregate_states) * | 310 | 254 | align_aggregate_states)); | 311 | 254 | agg_method.hash_table.reset(new HashTableType()); | 312 | 254 | agg_arena_pool.reset(new vectorized::Arena); | 313 | 254 | return Status::OK(); | 314 | 254 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEEDaRT_ Line | Count | Source | 287 | 3.10k | [&](auto& agg_method) { | 288 | 3.10k | auto& hash_table = *agg_method.hash_table; | 289 | 3.10k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 3.10k | agg_method.reset(); | 292 | | | 293 | 3.10k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 3.10k | if (mapped) { | 295 | 3.10k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 3.10k | mapped = nullptr; | 297 | 3.10k | } | 298 | 3.10k | }); | 299 | | | 300 | 3.10k | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 3.10k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 3.10k | sizeof(typename HashTableType::key_type), | 308 | 3.10k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 3.10k | align_aggregate_states) * | 310 | 3.10k | align_aggregate_states)); | 311 | 3.10k | agg_method.hash_table.reset(new HashTableType()); | 312 | 3.10k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 3.10k | return Status::OK(); | 314 | 3.10k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEEDaRT_ Line | Count | Source | 287 | 684 | [&](auto& agg_method) { | 288 | 684 | auto& hash_table = *agg_method.hash_table; | 289 | 684 | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 684 | agg_method.reset(); | 292 | | | 293 | 684 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 684 | if (mapped) { | 295 | 684 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 684 | mapped = nullptr; | 297 | 684 | } | 298 | 684 | }); | 299 | | | 300 | 684 | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 684 | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 684 | sizeof(typename HashTableType::key_type), | 308 | 684 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 684 | align_aggregate_states) * | 310 | 684 | align_aggregate_states)); | 311 | 684 | agg_method.hash_table.reset(new HashTableType()); | 312 | 684 | agg_arena_pool.reset(new vectorized::Arena); | 313 | 684 | return Status::OK(); | 314 | 684 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEEDaRT_ Line | Count | Source | 287 | 3.57k | [&](auto& agg_method) { | 288 | 3.57k | auto& hash_table = *agg_method.hash_table; | 289 | 3.57k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 3.57k | agg_method.reset(); | 292 | | | 293 | 3.57k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 3.57k | if (mapped) { | 295 | 3.57k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 3.57k | mapped = nullptr; | 297 | 3.57k | } | 298 | 3.57k | }); | 299 | | | 300 | 3.57k | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 3.57k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 3.57k | sizeof(typename HashTableType::key_type), | 308 | 3.57k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 3.57k | align_aggregate_states) * | 310 | 3.57k | align_aggregate_states)); | 311 | 3.57k | agg_method.hash_table.reset(new HashTableType()); | 312 | 3.57k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 3.57k | return Status::OK(); | 314 | 3.57k | }}, |
|
315 | 29.2k | agg_data->method_variant); |
316 | 29.2k | } |
317 | | |
318 | 82.9k | void PartitionedAggSharedState::init_spill_params(size_t spill_partition_count) { |
319 | 82.9k | partition_count = spill_partition_count; |
320 | 82.9k | max_partition_index = partition_count - 1; |
321 | | |
322 | 2.73M | for (int i = 0; i < partition_count; ++i) { |
323 | 2.64M | spill_partitions.emplace_back(std::make_shared<AggSpillPartition>()); |
324 | 2.64M | } |
325 | 82.9k | } |
326 | | |
327 | 82.2k | void PartitionedAggSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) { |
328 | 2.61M | for (auto& partition : spill_partitions) { |
329 | 2.61M | if (partition->spilling_stream_) { |
330 | 0 | partition->spilling_stream_->update_shared_profiles(source_profile); |
331 | 0 | } |
332 | 2.61M | for (auto& stream : partition->spill_streams_) { |
333 | 14.3k | if (stream) { |
334 | 14.3k | stream->update_shared_profiles(source_profile); |
335 | 14.3k | } |
336 | 14.3k | } |
337 | 2.61M | } |
338 | 82.2k | } |
339 | | |
340 | | Status AggSpillPartition::get_spill_stream(RuntimeState* state, int node_id, |
341 | | RuntimeProfile* profile, |
342 | 52.2k | vectorized::SpillStreamSPtr& spill_stream) { |
343 | 52.2k | if (spilling_stream_) { |
344 | 37.8k | spill_stream = spilling_stream_; |
345 | 37.8k | return Status::OK(); |
346 | 37.8k | } |
347 | 14.3k | RETURN_IF_ERROR(ExecEnv::GetInstance()->spill_stream_mgr()->register_spill_stream( |
348 | 14.3k | state, spilling_stream_, print_id(state->query_id()), "agg", node_id, |
349 | 14.3k | std::numeric_limits<int32_t>::max(), std::numeric_limits<size_t>::max(), profile)); |
350 | 14.3k | spill_streams_.emplace_back(spilling_stream_); |
351 | 14.3k | spill_stream = spilling_stream_; |
352 | 14.3k | return Status::OK(); |
353 | 14.3k | } |
354 | 2.49M | void AggSpillPartition::close() { |
355 | 2.49M | if (spilling_stream_) { |
356 | 1 | spilling_stream_.reset(); |
357 | 1 | } |
358 | 2.49M | for (auto& stream : spill_streams_) { |
359 | 5 | (void)ExecEnv::GetInstance()->spill_stream_mgr()->delete_spill_stream(stream); |
360 | 5 | } |
361 | 2.49M | spill_streams_.clear(); |
362 | 2.49M | } |
363 | | |
364 | 85.8k | void PartitionedAggSharedState::close() { |
365 | | // need to use CAS instead of only `if (!is_closed)` statement, |
366 | | // to avoid concurrent entry of close() both pass the if statement |
367 | 85.8k | bool false_close = false; |
368 | 85.8k | if (!is_closed.compare_exchange_strong(false_close, true)) { |
369 | 3.61k | return; |
370 | 3.61k | } |
371 | 82.2k | DCHECK(!false_close && is_closed); |
372 | 2.49M | for (auto partition : spill_partitions) { |
373 | 2.49M | partition->close(); |
374 | 2.49M | } |
375 | 82.2k | spill_partitions.clear(); |
376 | 82.2k | } |
377 | | |
378 | 311k | void SpillSortSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) { |
379 | 311k | for (auto& stream : sorted_streams) { |
380 | 556 | if (stream) { |
381 | 556 | stream->update_shared_profiles(source_profile); |
382 | 556 | } |
383 | 556 | } |
384 | 311k | } |
385 | | |
386 | 311k | void SpillSortSharedState::close() { |
387 | | // need to use CAS instead of only `if (!is_closed)` statement, |
388 | | // to avoid concurrent entry of close() both pass the if statement |
389 | 311k | bool false_close = false; |
390 | 311k | if (!is_closed.compare_exchange_strong(false_close, true)) { |
391 | 2 | return; |
392 | 2 | } |
393 | 311k | DCHECK(!false_close && is_closed); |
394 | 311k | for (auto& stream : sorted_streams) { |
395 | 1 | (void)ExecEnv::GetInstance()->spill_stream_mgr()->delete_spill_stream(stream); |
396 | 1 | } |
397 | 311k | sorted_streams.clear(); |
398 | 311k | } |
399 | | |
400 | | MultiCastSharedState::MultiCastSharedState(ObjectPool* pool, int cast_sender_count, int node_id) |
401 | | : multi_cast_data_streamer(std::make_unique<pipeline::MultiCastDataStreamer>( |
402 | 2.64k | this, pool, cast_sender_count, node_id)) {} |
403 | | |
404 | 0 | void MultiCastSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {} |
405 | | |
406 | 244k | int AggSharedState::get_slot_column_id(const vectorized::AggFnEvaluator* evaluator) { |
407 | 244k | auto ctxs = evaluator->input_exprs_ctxs(); |
408 | 18.4E | CHECK(ctxs.size() == 1 && ctxs[0]->root()->is_slot_ref()) |
409 | 18.4E | << "input_exprs_ctxs is invalid, input_exprs_ctx[0]=" |
410 | 18.4E | << ctxs[0]->root()->debug_string(); |
411 | 244k | return ((vectorized::VSlotRef*)ctxs[0]->root().get())->column_id(); |
412 | 244k | } |
413 | | |
414 | 4.36M | Status AggSharedState::_destroy_agg_status(vectorized::AggregateDataPtr data) { |
415 | 9.56M | for (int i = 0; i < aggregate_evaluators.size(); ++i) { |
416 | 5.19M | aggregate_evaluators[i]->function()->destroy(data + offsets_of_aggregate_states[i]); |
417 | 5.19M | } |
418 | 4.36M | return Status::OK(); |
419 | 4.36M | } |
420 | | |
421 | 120k | LocalExchangeSharedState::~LocalExchangeSharedState() = default; |
422 | | |
423 | 3.87k | Status SetSharedState::update_build_not_ignore_null(const vectorized::VExprContextSPtrs& ctxs) { |
424 | 3.87k | if (ctxs.size() > build_not_ignore_null.size()) { |
425 | 0 | return Status::InternalError("build_not_ignore_null not initialized"); |
426 | 0 | } |
427 | | |
428 | 10.0k | for (int i = 0; i < ctxs.size(); ++i) { |
429 | 6.18k | build_not_ignore_null[i] = build_not_ignore_null[i] || ctxs[i]->root()->is_nullable(); |
430 | 6.18k | } |
431 | | |
432 | 3.87k | return Status::OK(); |
433 | 3.87k | } |
434 | | |
435 | 3.86k | size_t SetSharedState::get_hash_table_size() const { |
436 | 3.86k | size_t hash_table_size = 0; |
437 | 3.86k | std::visit( |
438 | 3.86k | [&](auto&& arg) { |
439 | 3.86k | using HashTableCtxType = std::decay_t<decltype(arg)>; |
440 | 3.86k | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { |
441 | 3.86k | hash_table_size = arg.hash_table->size(); |
442 | 3.86k | } |
443 | 3.86k | }, Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRSt9monostateEEDaOT_ dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS7_vEEEEEEDaOT_ Line | Count | Source | 438 | 1.55k | [&](auto&& arg) { | 439 | 1.55k | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 1.55k | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 1.55k | hash_table_size = arg.hash_table->size(); | 442 | 1.55k | } | 443 | 1.55k | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized19MethodStringNoCacheI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS7_vEEEEEEDaOT_ Line | Count | Source | 438 | 670 | [&](auto&& arg) { | 439 | 670 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 670 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 670 | hash_table_size = arg.hash_table->size(); | 442 | 670 | } | 443 | 670 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhNS_14RowRefWithFlagE9HashCRC32IhEEEEEEEEEEDaOT_ Line | Count | Source | 438 | 140 | [&](auto&& arg) { | 439 | 140 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 140 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 140 | hash_table_size = arg.hash_table->size(); | 442 | 140 | } | 443 | 140 | }, |
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItNS_14RowRefWithFlagE9HashCRC32ItEEEEEEEEEEDaOT_ dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjNS_14RowRefWithFlagE9HashCRC32IjEEEEEEEEEEDaOT_ Line | Count | Source | 438 | 388 | [&](auto&& arg) { | 439 | 388 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 388 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 388 | hash_table_size = arg.hash_table->size(); | 442 | 388 | } | 443 | 388 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEEEEEDaOT_ Line | Count | Source | 438 | 450 | [&](auto&& arg) { | 439 | 450 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 450 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 450 | hash_table_size = arg.hash_table->size(); | 442 | 450 | } | 443 | 450 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_NS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEEEEEDaOT_ Line | Count | Source | 438 | 32 | [&](auto&& arg) { | 439 | 32 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 32 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 32 | hash_table_size = arg.hash_table->size(); | 442 | 32 | } | 443 | 32 | }, |
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_NS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEEEEEDaOT_ Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIh9PHHashMapIhNS_14RowRefWithFlagE9HashCRC32IhEEEEEEDaOT_ Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIt9PHHashMapItNS_14RowRefWithFlagE9HashCRC32ItEEEEEEDaOT_ dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIj9PHHashMapIjNS_14RowRefWithFlagE9HashCRC32IjEEEEEEDaOT_ Line | Count | Source | 438 | 128 | [&](auto&& arg) { | 439 | 128 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 128 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 128 | hash_table_size = arg.hash_table->size(); | 442 | 128 | } | 443 | 128 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEDaOT_ Line | Count | Source | 438 | 8 | [&](auto&& arg) { | 439 | 8 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 8 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 8 | hash_table_size = arg.hash_table->size(); | 442 | 8 | } | 443 | 8 | }, |
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_NS_14RowRefWithFlagE9HashCRC32IS8_EEEEEEDaOT_ Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_NS_14RowRefWithFlagE9HashCRC32IS8_EEEEEEDaOT_ dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEDaOT_ Line | Count | Source | 438 | 96 | [&](auto&& arg) { | 439 | 96 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 96 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 96 | hash_table_size = arg.hash_table->size(); | 442 | 96 | } | 443 | 96 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEENS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEDaOT_ Line | Count | Source | 438 | 136 | [&](auto&& arg) { | 439 | 136 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 136 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 136 | hash_table_size = arg.hash_table->size(); | 442 | 136 | } | 443 | 136 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEENS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEDaOT_ Line | Count | Source | 438 | 2 | [&](auto&& arg) { | 439 | 2 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 2 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 2 | hash_table_size = arg.hash_table->size(); | 442 | 2 | } | 443 | 2 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136ENS_14RowRefWithFlagE9HashCRC32IS7_EEEEEEDaOT_ Line | Count | Source | 438 | 257 | [&](auto&& arg) { | 439 | 257 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 257 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 257 | hash_table_size = arg.hash_table->size(); | 442 | 257 | } | 443 | 257 | }, |
|
444 | 3.86k | hash_table_variants->method_variant); |
445 | 3.86k | return hash_table_size; |
446 | 3.86k | } |
447 | | |
448 | 1.88k | Status SetSharedState::hash_table_init() { |
449 | 1.88k | std::vector<vectorized::DataTypePtr> data_types; |
450 | 4.90k | for (size_t i = 0; i != child_exprs_lists[0].size(); ++i) { |
451 | 3.01k | auto& ctx = child_exprs_lists[0][i]; |
452 | 3.01k | auto data_type = ctx->root()->data_type(); |
453 | 3.01k | if (build_not_ignore_null[i]) { |
454 | 2.29k | data_type = vectorized::make_nullable(data_type); |
455 | 2.29k | } |
456 | 3.01k | data_types.emplace_back(std::move(data_type)); |
457 | 3.01k | } |
458 | 1.88k | return init_hash_method<SetDataVariants>(hash_table_variants.get(), data_types, true); |
459 | 1.88k | } |
460 | | |
461 | | void AggSharedState::refresh_top_limit(size_t row_id, |
462 | 206 | const vectorized::ColumnRawPtrs& key_columns) { |
463 | 586 | for (int j = 0; j < key_columns.size(); ++j) { |
464 | 380 | limit_columns[j]->insert_from(*key_columns[j], row_id); |
465 | 380 | } |
466 | 206 | limit_heap.emplace(limit_columns[0]->size() - 1, limit_columns, order_directions, |
467 | 206 | null_directions); |
468 | | |
469 | 206 | limit_heap.pop(); |
470 | 206 | limit_columns_min = limit_heap.top()._row_id; |
471 | 206 | } |
472 | | |
473 | | } // namespace doris::pipeline |