/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.29M | const std::string& name) { |
39 | 1.29M | source_deps.push_back(std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY")); |
40 | 1.29M | source_deps.back()->set_shared_state(this); |
41 | 1.29M | return source_deps.back().get(); |
42 | 1.29M | } |
43 | | |
44 | | void BasicSharedState::create_source_dependencies(int num_sources, int operator_id, int node_id, |
45 | 136k | const std::string& name) { |
46 | 136k | source_deps.resize(num_sources, nullptr); |
47 | 853k | for (auto& source_dep : source_deps) { |
48 | 853k | source_dep = std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY"); |
49 | 853k | source_dep->set_shared_state(this); |
50 | 853k | } |
51 | 136k | } |
52 | | |
53 | | Dependency* BasicSharedState::create_sink_dependency(int dest_id, int node_id, |
54 | 1.83M | const std::string& name) { |
55 | 1.83M | sink_deps.push_back(std::make_shared<Dependency>(dest_id, node_id, name + "_DEPENDENCY", true)); |
56 | 1.83M | sink_deps.back()->set_shared_state(this); |
57 | 1.83M | return sink_deps.back().get(); |
58 | 1.83M | } |
59 | | |
60 | 9.00M | 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 | 9.00M | _blocked_task.push_back(task); |
65 | 9.00M | } |
66 | | |
67 | 1.56G | void Dependency::set_ready() { |
68 | 1.56G | if (_ready) { |
69 | 1.48G | return; |
70 | 1.48G | } |
71 | 79.9M | _watcher.stop(); |
72 | 79.9M | std::vector<std::weak_ptr<PipelineTask>> local_block_task {}; |
73 | 79.9M | { |
74 | 79.9M | std::unique_lock<std::mutex> lc(_task_lock); |
75 | 79.9M | if (_ready) { |
76 | 115 | return; |
77 | 115 | } |
78 | 79.9M | _ready = true; |
79 | 79.9M | local_block_task.swap(_blocked_task); |
80 | 79.9M | } |
81 | 9.01M | for (auto task : local_block_task) { |
82 | 9.01M | if (auto t = task.lock()) { |
83 | 9.01M | std::unique_lock<std::mutex> lc(_task_lock); |
84 | 9.01M | THROW_IF_ERROR(t->wake_up(this)); |
85 | 9.01M | } |
86 | 9.01M | } |
87 | 79.9M | } |
88 | | |
89 | 71.6M | Dependency* Dependency::is_blocked_by(std::shared_ptr<PipelineTask> task) { |
90 | 71.6M | std::unique_lock<std::mutex> lc(_task_lock); |
91 | 71.6M | auto ready = _ready.load(); |
92 | 71.6M | if (!ready && task) { |
93 | 9.01M | _add_block_task(task); |
94 | 9.01M | start_watcher(); |
95 | 9.01M | THROW_IF_ERROR(task->blocked(this)); |
96 | 9.01M | } |
97 | 71.6M | return ready ? nullptr : this; |
98 | 71.6M | } |
99 | | |
100 | 109k | std::string Dependency::debug_string(int indentation_level) { |
101 | 109k | fmt::memory_buffer debug_string_buffer; |
102 | 109k | fmt::format_to(debug_string_buffer, "{}{}: id={}, block task = {}, ready={}, _always_ready={}", |
103 | 109k | std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(), |
104 | 109k | _ready, _always_ready); |
105 | 109k | return fmt::to_string(debug_string_buffer); |
106 | 109k | } |
107 | | |
108 | 7.04k | std::string CountedFinishDependency::debug_string(int indentation_level) { |
109 | 7.04k | fmt::memory_buffer debug_string_buffer; |
110 | 7.04k | fmt::format_to(debug_string_buffer, |
111 | 7.04k | "{}{}: id={}, block_task={}, ready={}, _always_ready={}, count={}", |
112 | 7.04k | std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(), |
113 | 7.04k | _ready, _always_ready, _counter); |
114 | 7.04k | return fmt::to_string(debug_string_buffer); |
115 | 7.04k | } |
116 | | |
117 | 7.45k | void RuntimeFilterTimer::call_timeout() { |
118 | 7.45k | _parent->set_ready(); |
119 | 7.45k | } |
120 | | |
121 | 50.4k | void RuntimeFilterTimer::call_ready() { |
122 | 50.4k | _parent->set_ready(); |
123 | 50.4k | } |
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 | 4.37M | bool RuntimeFilterTimer::should_be_check_timeout() { |
129 | 4.37M | if (!_parent->ready() && !_local_runtime_filter_dependencies.empty()) { |
130 | 209k | bool all_ready = true; |
131 | 209k | for (auto& dep : _local_runtime_filter_dependencies) { |
132 | 209k | if (!dep->ready()) { |
133 | 209k | all_ready = false; |
134 | 209k | break; |
135 | 209k | } |
136 | 209k | } |
137 | 209k | if (all_ready) { |
138 | 72 | _local_runtime_filter_dependencies.clear(); |
139 | 72 | _registration_time = MonotonicMillis(); |
140 | 72 | } |
141 | 209k | return all_ready; |
142 | 209k | } |
143 | 4.17M | return true; |
144 | 4.37M | } |
145 | | |
146 | 4 | void RuntimeFilterTimerQueue::start() { |
147 | 318k | while (!_stop) { |
148 | 318k | std::unique_lock<std::mutex> lk(cv_m); |
149 | | |
150 | 326k | while (_que.empty() && !_stop) { |
151 | 17.6k | cv.wait_for(lk, std::chrono::seconds(3), [this] { return !_que.empty() || _stop; }); |
152 | 8.80k | } |
153 | 318k | if (_stop) { |
154 | 1 | break; |
155 | 1 | } |
156 | 318k | { |
157 | 318k | std::unique_lock<std::mutex> lc(_que_lock); |
158 | 318k | std::list<std::shared_ptr<pipeline::RuntimeFilterTimer>> new_que; |
159 | 4.37M | for (auto& it : _que) { |
160 | 4.37M | if (it.use_count() == 1) { |
161 | | // `use_count == 1` means this runtime filter has been released |
162 | 4.37M | } else if (it->should_be_check_timeout()) { |
163 | 4.17M | 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 | 4.12M | int64_t ms_since_registration = MonotonicMillis() - it->registration_time(); |
166 | 4.12M | if (ms_since_registration > it->wait_time_ms()) { |
167 | 7.45k | it->call_timeout(); |
168 | 4.12M | } else { |
169 | 4.12M | new_que.push_back(std::move(it)); |
170 | 4.12M | } |
171 | 4.12M | } |
172 | 4.17M | } else { |
173 | 209k | new_que.push_back(std::move(it)); |
174 | 209k | } |
175 | 4.37M | } |
176 | 318k | new_que.swap(_que); |
177 | 318k | } |
178 | 318k | std::this_thread::sleep_for(std::chrono::milliseconds(interval)); |
179 | 318k | } |
180 | 4 | _shutdown = true; |
181 | 4 | } |
182 | | |
183 | 340k | void LocalExchangeSharedState::sub_running_sink_operators() { |
184 | 340k | std::unique_lock<std::mutex> lc(le_lock); |
185 | 340k | if (exchanger->_running_sink_operators.fetch_sub(1) == 1) { |
186 | 130k | _set_always_ready(); |
187 | 130k | } |
188 | 340k | } |
189 | | |
190 | 821k | void LocalExchangeSharedState::sub_running_source_operators() { |
191 | 821k | std::unique_lock<std::mutex> lc(le_lock); |
192 | 821k | if (exchanger->_running_source_operators.fetch_sub(1) == 1) { |
193 | 130k | _set_always_ready(); |
194 | 130k | exchanger->finalize(); |
195 | 130k | } |
196 | 821k | } |
197 | | |
198 | 130k | LocalExchangeSharedState::LocalExchangeSharedState(int num_instances) { |
199 | 130k | source_deps.resize(num_instances, nullptr); |
200 | 130k | mem_counters.resize(num_instances, nullptr); |
201 | 130k | } |
202 | | |
203 | 205 | vectorized::MutableColumns AggSharedState::_get_keys_hash_table() { |
204 | 205 | return std::visit( |
205 | 205 | vectorized::Overload { |
206 | 205 | [&](std::monostate& arg) { |
207 | 0 | throw doris::Exception(ErrorCode::INTERNAL_ERROR, "uninited hash table"); |
208 | 0 | return vectorized::MutableColumns(); |
209 | 0 | }, |
210 | 205 | [&](auto&& agg_method) -> vectorized::MutableColumns { |
211 | 205 | vectorized::MutableColumns key_columns; |
212 | 490 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { |
213 | 285 | key_columns.emplace_back( |
214 | 285 | probe_expr_ctxs[i]->root()->data_type()->create_column()); |
215 | 285 | } |
216 | 205 | auto& data = *agg_method.hash_table; |
217 | 205 | bool has_null_key = data.has_null_key_data(); |
218 | 205 | const auto size = data.size() - has_null_key; |
219 | 205 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; |
220 | 205 | std::vector<KeyType> keys(size); |
221 | | |
222 | 205 | size_t num_rows = 0; |
223 | 205 | auto iter = aggregate_data_container->begin(); |
224 | 205 | { |
225 | 54.3k | while (iter != aggregate_data_container->end()) { |
226 | 54.1k | keys[num_rows] = iter.get_key<KeyType>(); |
227 | 54.1k | ++iter; |
228 | 54.1k | ++num_rows; |
229 | 54.1k | } |
230 | 205 | } |
231 | 205 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); |
232 | 205 | if (has_null_key) { |
233 | 4 | key_columns[0]->insert_data(nullptr, 0); |
234 | 4 | } |
235 | 205 | return key_columns; |
236 | 205 | }}, dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_ Line | Count | Source | 210 | 20 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 20 | vectorized::MutableColumns key_columns; | 212 | 76 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 56 | key_columns.emplace_back( | 214 | 56 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 56 | } | 216 | 20 | auto& data = *agg_method.hash_table; | 217 | 20 | bool has_null_key = data.has_null_key_data(); | 218 | 20 | const auto size = data.size() - has_null_key; | 219 | 20 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 20 | std::vector<KeyType> keys(size); | 221 | | | 222 | 20 | size_t num_rows = 0; | 223 | 20 | auto iter = aggregate_data_container->begin(); | 224 | 20 | { | 225 | 25.9k | while (iter != aggregate_data_container->end()) { | 226 | 25.9k | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 25.9k | ++iter; | 228 | 25.9k | ++num_rows; | 229 | 25.9k | } | 230 | 20 | } | 231 | 20 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 20 | if (has_null_key) { | 233 | 0 | key_columns[0]->insert_data(nullptr, 0); | 234 | 0 | } | 235 | 20 | return key_columns; | 236 | 20 | }}, |
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_ Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_ Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_ dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_ Line | Count | Source | 210 | 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 | 36 | while (iter != aggregate_data_container->end()) { | 226 | 30 | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 30 | ++iter; | 228 | 30 | ++num_rows; | 229 | 30 | } | 230 | 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_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 | 20 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 20 | vectorized::MutableColumns key_columns; | 212 | 40 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 20 | key_columns.emplace_back( | 214 | 20 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 20 | } | 216 | 20 | auto& data = *agg_method.hash_table; | 217 | 20 | bool has_null_key = data.has_null_key_data(); | 218 | 20 | const auto size = data.size() - has_null_key; | 219 | 20 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 20 | std::vector<KeyType> keys(size); | 221 | | | 222 | 20 | size_t num_rows = 0; | 223 | 20 | auto iter = aggregate_data_container->begin(); | 224 | 20 | { | 225 | 40 | while (iter != aggregate_data_container->end()) { | 226 | 20 | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 20 | ++iter; | 228 | 20 | ++num_rows; | 229 | 20 | } | 230 | 20 | } | 231 | 20 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 20 | if (has_null_key) { | 233 | 0 | key_columns[0]->insert_data(nullptr, 0); | 234 | 0 | } | 235 | 20 | return key_columns; | 236 | 20 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISH_EESaISK_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 | 20 | while (iter != aggregate_data_container->end()) { | 226 | 16 | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 16 | ++iter; | 228 | 16 | ++num_rows; | 229 | 16 | } | 230 | 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_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 | 33 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 33 | vectorized::MutableColumns key_columns; | 212 | 66 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 33 | key_columns.emplace_back( | 214 | 33 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 33 | } | 216 | 33 | auto& data = *agg_method.hash_table; | 217 | 33 | bool has_null_key = data.has_null_key_data(); | 218 | 33 | const auto size = data.size() - has_null_key; | 219 | 33 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 33 | std::vector<KeyType> keys(size); | 221 | | | 222 | 33 | size_t num_rows = 0; | 223 | 33 | auto iter = aggregate_data_container->begin(); | 224 | 33 | { | 225 | 5.89k | while (iter != aggregate_data_container->end()) { | 226 | 5.86k | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 5.86k | ++iter; | 228 | 5.86k | ++num_rows; | 229 | 5.86k | } | 230 | 33 | } | 231 | 33 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 33 | if (has_null_key) { | 233 | 1 | key_columns[0]->insert_data(nullptr, 0); | 234 | 1 | } | 235 | 33 | return key_columns; | 236 | 33 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_ Line | Count | Source | 210 | 32 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 32 | vectorized::MutableColumns key_columns; | 212 | 64 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 32 | key_columns.emplace_back( | 214 | 32 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 32 | } | 216 | 32 | auto& data = *agg_method.hash_table; | 217 | 32 | bool has_null_key = data.has_null_key_data(); | 218 | 32 | const auto size = data.size() - has_null_key; | 219 | 32 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 32 | std::vector<KeyType> keys(size); | 221 | | | 222 | 32 | size_t num_rows = 0; | 223 | 32 | auto iter = aggregate_data_container->begin(); | 224 | 32 | { | 225 | 13.2k | while (iter != aggregate_data_container->end()) { | 226 | 13.2k | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 13.2k | ++iter; | 228 | 13.2k | ++num_rows; | 229 | 13.2k | } | 230 | 32 | } | 231 | 32 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 32 | if (has_null_key) { | 233 | 0 | key_columns[0]->insert_data(nullptr, 0); | 234 | 0 | } | 235 | 32 | return key_columns; | 236 | 32 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISL_EESaISO_EEOT_ Line | Count | Source | 210 | 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 | 102 | while (iter != aggregate_data_container->end()) { | 226 | 88 | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 88 | ++iter; | 228 | 88 | ++num_rows; | 229 | 88 | } | 230 | 14 | } | 231 | 14 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 14 | if (has_null_key) { | 233 | 2 | key_columns[0]->insert_data(nullptr, 0); | 234 | 2 | } | 235 | 14 | return key_columns; | 236 | 14 | }}, |
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 | 36 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 211 | 36 | vectorized::MutableColumns key_columns; | 212 | 72 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 213 | 36 | key_columns.emplace_back( | 214 | 36 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 215 | 36 | } | 216 | 36 | auto& data = *agg_method.hash_table; | 217 | 36 | bool has_null_key = data.has_null_key_data(); | 218 | 36 | const auto size = data.size() - has_null_key; | 219 | 36 | using KeyType = std::decay_t<decltype(agg_method.iterator->get_first())>; | 220 | 36 | std::vector<KeyType> keys(size); | 221 | | | 222 | 36 | size_t num_rows = 0; | 223 | 36 | auto iter = aggregate_data_container->begin(); | 224 | 36 | { | 225 | 1.34k | while (iter != aggregate_data_container->end()) { | 226 | 1.30k | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 1.30k | ++iter; | 228 | 1.30k | ++num_rows; | 229 | 1.30k | } | 230 | 36 | } | 231 | 36 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 232 | 36 | if (has_null_key) { | 233 | 0 | key_columns[0]->insert_data(nullptr, 0); | 234 | 0 | } | 235 | 36 | return key_columns; | 236 | 36 | }}, |
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.52k | while (iter != aggregate_data_container->end()) { | 226 | 7.49k | keys[num_rows] = iter.get_key<KeyType>(); | 227 | 7.49k | ++iter; | 228 | 7.49k | ++num_rows; | 229 | 7.49k | } | 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 | 205 | agg_data->method_variant); |
238 | 205 | } |
239 | | |
240 | 205 | void AggSharedState::build_limit_heap(size_t hash_table_size) { |
241 | 205 | limit_columns = _get_keys_hash_table(); |
242 | 53.9k | for (size_t i = 0; i < hash_table_size; ++i) { |
243 | 53.7k | limit_heap.emplace(i, limit_columns, order_directions, null_directions); |
244 | 53.7k | } |
245 | 53.0k | while (hash_table_size > limit) { |
246 | 52.8k | limit_heap.pop(); |
247 | 52.8k | hash_table_size--; |
248 | 52.8k | } |
249 | 205 | limit_columns_min = limit_heap.top()._row_id; |
250 | 205 | } |
251 | | |
252 | | bool AggSharedState::do_limit_filter(vectorized::Block* block, size_t num_rows, |
253 | 1.97k | const std::vector<int>* key_locs) { |
254 | 1.97k | if (num_rows) { |
255 | 1.97k | cmp_res.resize(num_rows); |
256 | 1.97k | need_computes.resize(num_rows); |
257 | 1.97k | memset(need_computes.data(), 0, need_computes.size()); |
258 | 1.97k | memset(cmp_res.data(), 0, cmp_res.size()); |
259 | | |
260 | 1.97k | const auto key_size = null_directions.size(); |
261 | 5.90k | for (int i = 0; i < key_size; i++) { |
262 | 3.93k | block->get_by_position(key_locs ? key_locs->operator[](i) : i) |
263 | 3.93k | .column->compare_internal(limit_columns_min, *limit_columns[i], |
264 | 3.93k | null_directions[i], order_directions[i], cmp_res, |
265 | 3.93k | need_computes.data()); |
266 | 3.93k | } |
267 | | |
268 | 1.97k | auto set_computes_arr = [](auto* __restrict res, auto* __restrict computes, size_t rows) { |
269 | 1.84M | for (size_t i = 0; i < rows; ++i) { |
270 | 1.84M | computes[i] = computes[i] == res[i]; |
271 | 1.84M | } |
272 | 1.97k | }; |
273 | 1.97k | set_computes_arr(cmp_res.data(), need_computes.data(), num_rows); |
274 | | |
275 | 1.97k | return std::find(need_computes.begin(), need_computes.end(), 0) != need_computes.end(); |
276 | 1.97k | } |
277 | | |
278 | 0 | return false; |
279 | 1.97k | } |
280 | | |
281 | 100k | Status AggSharedState::reset_hash_table() { |
282 | 100k | return std::visit( |
283 | 100k | vectorized::Overload { |
284 | 100k | [&](std::monostate& arg) -> Status { |
285 | 0 | return Status::InternalError("Uninited hash table"); |
286 | 0 | }, |
287 | 100k | [&](auto& agg_method) { |
288 | 100k | auto& hash_table = *agg_method.hash_table; |
289 | 100k | using HashTableType = std::decay_t<decltype(hash_table)>; |
290 | | |
291 | 100k | agg_method.reset(); |
292 | | |
293 | 5.80M | hash_table.for_each_mapped([&](auto& mapped) { |
294 | 5.80M | if (mapped) { |
295 | 5.80M | static_cast<void>(_destroy_agg_status(mapped)); |
296 | 5.80M | mapped = nullptr; |
297 | 5.80M | } |
298 | 5.80M | }); dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_ Line | Count | Source | 293 | 143k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 143k | if (mapped) { | 295 | 143k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 143k | mapped = nullptr; | 297 | 143k | } | 298 | 143k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_ Line | Count | Source | 293 | 30 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 30 | if (mapped) { | 295 | 30 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 30 | mapped = nullptr; | 297 | 30 | } | 298 | 30 | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_ Line | Count | Source | 293 | 80 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 80 | if (mapped) { | 295 | 80 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 80 | mapped = nullptr; | 297 | 80 | } | 298 | 80 | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_ Line | Count | Source | 293 | 3.97M | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 3.97M | if (mapped) { | 295 | 3.97M | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 3.97M | mapped = nullptr; | 297 | 3.97M | } | 298 | 3.97M | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_ Line | Count | Source | 293 | 80.4k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 80.4k | if (mapped) { | 295 | 80.4k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 80.4k | mapped = nullptr; | 297 | 80.4k | } | 298 | 80.4k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEEDaRT_ENKUlSE_E_clIS7_EEDaSE_ Line | Count | Source | 293 | 8.65k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 8.65k | if (mapped) { | 295 | 8.65k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 8.65k | mapped = nullptr; | 297 | 8.65k | } | 298 | 8.65k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_ Line | Count | Source | 293 | 48 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 48 | if (mapped) { | 295 | 48 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 48 | mapped = nullptr; | 297 | 48 | } | 298 | 48 | }); |
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_ dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEDaRT_ENKUlSF_E_clIS7_EEDaSF_ Line | Count | Source | 293 | 1.05M | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 1.05M | if (mapped) { | 295 | 1.05M | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 1.05M | mapped = nullptr; | 297 | 1.05M | } | 298 | 1.05M | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEDaRT_ENKUlSF_E_clIS7_EEDaSF_ Line | Count | Source | 293 | 42.8k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 42.8k | if (mapped) { | 295 | 42.8k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 42.8k | mapped = nullptr; | 297 | 42.8k | } | 298 | 42.8k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_ Line | Count | Source | 293 | 440 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 440 | if (mapped) { | 295 | 440 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 440 | mapped = nullptr; | 297 | 440 | } | 298 | 440 | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_ Line | Count | Source | 293 | 1.13k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 1.13k | if (mapped) { | 295 | 1.13k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 1.13k | mapped = nullptr; | 297 | 1.13k | } | 298 | 1.13k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_ Line | Count | Source | 293 | 90.1k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 90.1k | if (mapped) { | 295 | 90.1k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 90.1k | mapped = nullptr; | 297 | 90.1k | } | 298 | 90.1k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_ Line | Count | Source | 293 | 1.02k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 1.02k | if (mapped) { | 295 | 1.02k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 1.02k | mapped = nullptr; | 297 | 1.02k | } | 298 | 1.02k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_ENKUlSJ_E_clIS9_EEDaSJ_ Line | Count | Source | 293 | 60.8k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 60.8k | if (mapped) { | 295 | 60.8k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 60.8k | mapped = nullptr; | 297 | 60.8k | } | 298 | 60.8k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_ENKUlSJ_E_clIS9_EEDaSJ_ Line | Count | Source | 293 | 3.03k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 3.03k | if (mapped) { | 295 | 3.03k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 3.03k | mapped = nullptr; | 297 | 3.03k | } | 298 | 3.03k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ENKUlSK_E_clISC_EEDaSK_ Line | Count | Source | 293 | 1.09k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 1.09k | if (mapped) { | 295 | 1.09k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 1.09k | mapped = nullptr; | 297 | 1.09k | } | 298 | 1.09k | }); |
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 | 1.62k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 1.62k | if (mapped) { | 295 | 1.62k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 1.62k | mapped = nullptr; | 297 | 1.62k | } | 298 | 1.62k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_ Line | Count | Source | 293 | 285k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 285k | if (mapped) { | 295 | 285k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 285k | mapped = nullptr; | 297 | 285k | } | 298 | 285k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_ Line | Count | Source | 293 | 37.5k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 37.5k | if (mapped) { | 295 | 37.5k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 37.5k | mapped = nullptr; | 297 | 37.5k | } | 298 | 37.5k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_ Line | Count | Source | 293 | 15.9k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 15.9k | if (mapped) { | 295 | 15.9k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 15.9k | mapped = nullptr; | 297 | 15.9k | } | 298 | 15.9k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEEDaRT_ENKUlSE_E_clIS8_EEDaSE_ Line | Count | Source | 293 | 5.57k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 5.57k | if (mapped) { | 295 | 5.57k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 5.57k | mapped = nullptr; | 297 | 5.57k | } | 298 | 5.57k | }); |
|
299 | | |
300 | 100k | if (hash_table.has_null_key_data()) { |
301 | 460 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< |
302 | 460 | vectorized::AggregateDataPtr>()); |
303 | 460 | RETURN_IF_ERROR(st); |
304 | 460 | } |
305 | | |
306 | 100k | aggregate_data_container.reset(new AggregateDataContainer( |
307 | 100k | sizeof(typename HashTableType::key_type), |
308 | 100k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / |
309 | 100k | align_aggregate_states) * |
310 | 100k | align_aggregate_states)); |
311 | 100k | agg_method.hash_table.reset(new HashTableType()); |
312 | 100k | agg_arena_pool.reset(new vectorized::Arena); |
313 | 100k | return Status::OK(); |
314 | 100k | }}, dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEDaRT_ Line | Count | Source | 287 | 22.0k | [&](auto& agg_method) { | 288 | 22.0k | auto& hash_table = *agg_method.hash_table; | 289 | 22.0k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 22.0k | agg_method.reset(); | 292 | | | 293 | 22.0k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 22.0k | if (mapped) { | 295 | 22.0k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 22.0k | mapped = nullptr; | 297 | 22.0k | } | 298 | 22.0k | }); | 299 | | | 300 | 22.0k | 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.0k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 22.0k | sizeof(typename HashTableType::key_type), | 308 | 22.0k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 22.0k | align_aggregate_states) * | 310 | 22.0k | align_aggregate_states)); | 311 | 22.0k | agg_method.hash_table.reset(new HashTableType()); | 312 | 22.0k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 22.0k | return Status::OK(); | 314 | 22.0k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEDaRT_ Line | Count | Source | 287 | 40 | [&](auto& agg_method) { | 288 | 40 | auto& hash_table = *agg_method.hash_table; | 289 | 40 | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 40 | agg_method.reset(); | 292 | | | 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 | }); | 299 | | | 300 | 40 | 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 | 40 | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 40 | sizeof(typename HashTableType::key_type), | 308 | 40 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 40 | align_aggregate_states) * | 310 | 40 | align_aggregate_states)); | 311 | 40 | agg_method.hash_table.reset(new HashTableType()); | 312 | 40 | agg_arena_pool.reset(new vectorized::Arena); | 313 | 40 | return Status::OK(); | 314 | 40 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_ Line | Count | Source | 287 | 84 | [&](auto& agg_method) { | 288 | 84 | auto& hash_table = *agg_method.hash_table; | 289 | 84 | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 84 | agg_method.reset(); | 292 | | | 293 | 84 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 84 | if (mapped) { | 295 | 84 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 84 | mapped = nullptr; | 297 | 84 | } | 298 | 84 | }); | 299 | | | 300 | 84 | 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 | 84 | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 84 | sizeof(typename HashTableType::key_type), | 308 | 84 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 84 | align_aggregate_states) * | 310 | 84 | align_aggregate_states)); | 311 | 84 | agg_method.hash_table.reset(new HashTableType()); | 312 | 84 | agg_arena_pool.reset(new vectorized::Arena); | 313 | 84 | return Status::OK(); | 314 | 84 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEDaRT_ Line | Count | Source | 287 | 14.7k | [&](auto& agg_method) { | 288 | 14.7k | auto& hash_table = *agg_method.hash_table; | 289 | 14.7k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 14.7k | agg_method.reset(); | 292 | | | 293 | 14.7k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 14.7k | if (mapped) { | 295 | 14.7k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 14.7k | mapped = nullptr; | 297 | 14.7k | } | 298 | 14.7k | }); | 299 | | | 300 | 14.7k | 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.7k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 14.7k | sizeof(typename HashTableType::key_type), | 308 | 14.7k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 14.7k | align_aggregate_states) * | 310 | 14.7k | align_aggregate_states)); | 311 | 14.7k | agg_method.hash_table.reset(new HashTableType()); | 312 | 14.7k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 14.7k | return Status::OK(); | 314 | 14.7k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ Line | Count | Source | 287 | 4.57k | [&](auto& agg_method) { | 288 | 4.57k | auto& hash_table = *agg_method.hash_table; | 289 | 4.57k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 4.57k | agg_method.reset(); | 292 | | | 293 | 4.57k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 4.57k | if (mapped) { | 295 | 4.57k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 4.57k | mapped = nullptr; | 297 | 4.57k | } | 298 | 4.57k | }); | 299 | | | 300 | 4.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 | 4.57k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 4.57k | sizeof(typename HashTableType::key_type), | 308 | 4.57k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 4.57k | align_aggregate_states) * | 310 | 4.57k | align_aggregate_states)); | 311 | 4.57k | agg_method.hash_table.reset(new HashTableType()); | 312 | 4.57k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 4.57k | return Status::OK(); | 314 | 4.57k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorEEEEEEEEEDaRT_ Line | Count | Source | 287 | 3.33k | [&](auto& agg_method) { | 288 | 3.33k | auto& hash_table = *agg_method.hash_table; | 289 | 3.33k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 3.33k | agg_method.reset(); | 292 | | | 293 | 3.33k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 3.33k | if (mapped) { | 295 | 3.33k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 3.33k | mapped = nullptr; | 297 | 3.33k | } | 298 | 3.33k | }); | 299 | | | 300 | 3.33k | 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.33k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 3.33k | sizeof(typename HashTableType::key_type), | 308 | 3.33k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 3.33k | align_aggregate_states) * | 310 | 3.33k | align_aggregate_states)); | 311 | 3.33k | agg_method.hash_table.reset(new HashTableType()); | 312 | 3.33k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 3.33k | return Status::OK(); | 314 | 3.33k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_ 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 | }}, |
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_ dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEDaRT_ Line | Count | Source | 287 | 1.94k | [&](auto& agg_method) { | 288 | 1.94k | auto& hash_table = *agg_method.hash_table; | 289 | 1.94k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 1.94k | agg_method.reset(); | 292 | | | 293 | 1.94k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 1.94k | if (mapped) { | 295 | 1.94k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 1.94k | mapped = nullptr; | 297 | 1.94k | } | 298 | 1.94k | }); | 299 | | | 300 | 1.94k | 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.94k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 1.94k | sizeof(typename HashTableType::key_type), | 308 | 1.94k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 1.94k | align_aggregate_states) * | 310 | 1.94k | align_aggregate_states)); | 311 | 1.94k | agg_method.hash_table.reset(new HashTableType()); | 312 | 1.94k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 1.94k | return Status::OK(); | 314 | 1.94k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEDaRT_ Line | Count | Source | 287 | 2.19k | [&](auto& agg_method) { | 288 | 2.19k | auto& hash_table = *agg_method.hash_table; | 289 | 2.19k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 2.19k | agg_method.reset(); | 292 | | | 293 | 2.19k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 2.19k | if (mapped) { | 295 | 2.19k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 2.19k | mapped = nullptr; | 297 | 2.19k | } | 298 | 2.19k | }); | 299 | | | 300 | 2.19k | 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.19k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 2.19k | sizeof(typename HashTableType::key_type), | 308 | 2.19k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 2.19k | align_aggregate_states) * | 310 | 2.19k | align_aggregate_states)); | 311 | 2.19k | agg_method.hash_table.reset(new HashTableType()); | 312 | 2.19k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 2.19k | return Status::OK(); | 314 | 2.19k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_ Line | Count | Source | 287 | 478 | [&](auto& agg_method) { | 288 | 478 | auto& hash_table = *agg_method.hash_table; | 289 | 478 | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 478 | agg_method.reset(); | 292 | | | 293 | 478 | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 478 | if (mapped) { | 295 | 478 | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 478 | mapped = nullptr; | 297 | 478 | } | 298 | 478 | }); | 299 | | | 300 | 478 | 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 | 478 | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 478 | sizeof(typename HashTableType::key_type), | 308 | 478 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 478 | align_aggregate_states) * | 310 | 478 | align_aggregate_states)); | 311 | 478 | agg_method.hash_table.reset(new HashTableType()); | 312 | 478 | agg_arena_pool.reset(new vectorized::Arena); | 313 | 478 | return Status::OK(); | 314 | 478 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_ Line | Count | Source | 287 | 1.41k | [&](auto& agg_method) { | 288 | 1.41k | auto& hash_table = *agg_method.hash_table; | 289 | 1.41k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 1.41k | agg_method.reset(); | 292 | | | 293 | 1.41k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 1.41k | if (mapped) { | 295 | 1.41k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 1.41k | mapped = nullptr; | 297 | 1.41k | } | 298 | 1.41k | }); | 299 | | | 300 | 1.41k | if (hash_table.has_null_key_data()) { | 301 | 18 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 18 | vectorized::AggregateDataPtr>()); | 303 | 18 | RETURN_IF_ERROR(st); | 304 | 18 | } | 305 | | | 306 | 1.41k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 1.41k | sizeof(typename HashTableType::key_type), | 308 | 1.41k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 1.41k | align_aggregate_states) * | 310 | 1.41k | align_aggregate_states)); | 311 | 1.41k | agg_method.hash_table.reset(new HashTableType()); | 312 | 1.41k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 1.41k | return Status::OK(); | 314 | 1.41k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_ Line | Count | Source | 287 | 7.76k | [&](auto& agg_method) { | 288 | 7.76k | auto& hash_table = *agg_method.hash_table; | 289 | 7.76k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 7.76k | agg_method.reset(); | 292 | | | 293 | 7.76k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 7.76k | if (mapped) { | 295 | 7.76k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 7.76k | mapped = nullptr; | 297 | 7.76k | } | 298 | 7.76k | }); | 299 | | | 300 | 7.76k | if (hash_table.has_null_key_data()) { | 301 | 206 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 206 | vectorized::AggregateDataPtr>()); | 303 | 206 | RETURN_IF_ERROR(st); | 304 | 206 | } | 305 | | | 306 | 7.76k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 7.76k | sizeof(typename HashTableType::key_type), | 308 | 7.76k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 7.76k | align_aggregate_states) * | 310 | 7.76k | align_aggregate_states)); | 311 | 7.76k | agg_method.hash_table.reset(new HashTableType()); | 312 | 7.76k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 7.76k | return Status::OK(); | 314 | 7.76k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_ Line | Count | Source | 287 | 1.09k | [&](auto& agg_method) { | 288 | 1.09k | auto& hash_table = *agg_method.hash_table; | 289 | 1.09k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 1.09k | agg_method.reset(); | 292 | | | 293 | 1.09k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 1.09k | if (mapped) { | 295 | 1.09k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 1.09k | mapped = nullptr; | 297 | 1.09k | } | 298 | 1.09k | }); | 299 | | | 300 | 1.09k | if (hash_table.has_null_key_data()) { | 301 | 32 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 32 | vectorized::AggregateDataPtr>()); | 303 | 32 | RETURN_IF_ERROR(st); | 304 | 32 | } | 305 | | | 306 | 1.09k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 1.09k | sizeof(typename HashTableType::key_type), | 308 | 1.09k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 1.09k | align_aggregate_states) * | 310 | 1.09k | align_aggregate_states)); | 311 | 1.09k | agg_method.hash_table.reset(new HashTableType()); | 312 | 1.09k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 1.09k | return Status::OK(); | 314 | 1.09k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_ Line | Count | Source | 287 | 2.66k | [&](auto& agg_method) { | 288 | 2.66k | auto& hash_table = *agg_method.hash_table; | 289 | 2.66k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 2.66k | agg_method.reset(); | 292 | | | 293 | 2.66k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 2.66k | if (mapped) { | 295 | 2.66k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 2.66k | mapped = nullptr; | 297 | 2.66k | } | 298 | 2.66k | }); | 299 | | | 300 | 2.66k | if (hash_table.has_null_key_data()) { | 301 | 18 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 18 | vectorized::AggregateDataPtr>()); | 303 | 18 | RETURN_IF_ERROR(st); | 304 | 18 | } | 305 | | | 306 | 2.66k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 2.66k | sizeof(typename HashTableType::key_type), | 308 | 2.66k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 2.66k | align_aggregate_states) * | 310 | 2.66k | align_aggregate_states)); | 311 | 2.66k | agg_method.hash_table.reset(new HashTableType()); | 312 | 2.66k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 2.66k | return Status::OK(); | 314 | 2.66k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_ Line | Count | Source | 287 | 3.31k | [&](auto& agg_method) { | 288 | 3.31k | auto& hash_table = *agg_method.hash_table; | 289 | 3.31k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 3.31k | agg_method.reset(); | 292 | | | 293 | 3.31k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 3.31k | if (mapped) { | 295 | 3.31k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 3.31k | mapped = nullptr; | 297 | 3.31k | } | 298 | 3.31k | }); | 299 | | | 300 | 3.31k | if (hash_table.has_null_key_data()) { | 301 | 134 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 134 | vectorized::AggregateDataPtr>()); | 303 | 134 | RETURN_IF_ERROR(st); | 304 | 134 | } | 305 | | | 306 | 3.31k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 3.31k | sizeof(typename HashTableType::key_type), | 308 | 3.31k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 3.31k | align_aggregate_states) * | 310 | 3.31k | align_aggregate_states)); | 311 | 3.31k | agg_method.hash_table.reset(new HashTableType()); | 312 | 3.31k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 3.31k | return Status::OK(); | 314 | 3.31k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ Line | Count | Source | 287 | 1.35k | [&](auto& agg_method) { | 288 | 1.35k | auto& hash_table = *agg_method.hash_table; | 289 | 1.35k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 1.35k | agg_method.reset(); | 292 | | | 293 | 1.35k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 1.35k | if (mapped) { | 295 | 1.35k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 1.35k | mapped = nullptr; | 297 | 1.35k | } | 298 | 1.35k | }); | 299 | | | 300 | 1.35k | if (hash_table.has_null_key_data()) { | 301 | 30 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 30 | vectorized::AggregateDataPtr>()); | 303 | 30 | RETURN_IF_ERROR(st); | 304 | 30 | } | 305 | | | 306 | 1.35k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 1.35k | sizeof(typename HashTableType::key_type), | 308 | 1.35k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 1.35k | align_aggregate_states) * | 310 | 1.35k | align_aggregate_states)); | 311 | 1.35k | agg_method.hash_table.reset(new HashTableType()); | 312 | 1.35k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 1.35k | return Status::OK(); | 314 | 1.35k | }}, |
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 | 1.76k | [&](auto& agg_method) { | 288 | 1.76k | auto& hash_table = *agg_method.hash_table; | 289 | 1.76k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 1.76k | agg_method.reset(); | 292 | | | 293 | 1.76k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 1.76k | if (mapped) { | 295 | 1.76k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 1.76k | mapped = nullptr; | 297 | 1.76k | } | 298 | 1.76k | }); | 299 | | | 300 | 1.76k | if (hash_table.has_null_key_data()) { | 301 | 22 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 22 | vectorized::AggregateDataPtr>()); | 303 | 22 | RETURN_IF_ERROR(st); | 304 | 22 | } | 305 | | | 306 | 1.76k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 1.76k | sizeof(typename HashTableType::key_type), | 308 | 1.76k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 1.76k | align_aggregate_states) * | 310 | 1.76k | align_aggregate_states)); | 311 | 1.76k | agg_method.hash_table.reset(new HashTableType()); | 312 | 1.76k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 1.76k | return Status::OK(); | 314 | 1.76k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ Line | Count | Source | 287 | 4.64k | [&](auto& agg_method) { | 288 | 4.64k | auto& hash_table = *agg_method.hash_table; | 289 | 4.64k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 4.64k | agg_method.reset(); | 292 | | | 293 | 4.64k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 4.64k | if (mapped) { | 295 | 4.64k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 4.64k | mapped = nullptr; | 297 | 4.64k | } | 298 | 4.64k | }); | 299 | | | 300 | 4.64k | 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 | 4.64k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 4.64k | sizeof(typename HashTableType::key_type), | 308 | 4.64k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 4.64k | align_aggregate_states) * | 310 | 4.64k | align_aggregate_states)); | 311 | 4.64k | agg_method.hash_table.reset(new HashTableType()); | 312 | 4.64k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 4.64k | return Status::OK(); | 314 | 4.64k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEEDaRT_ Line | Count | Source | 287 | 10.0k | [&](auto& agg_method) { | 288 | 10.0k | auto& hash_table = *agg_method.hash_table; | 289 | 10.0k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 10.0k | agg_method.reset(); | 292 | | | 293 | 10.0k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 10.0k | if (mapped) { | 295 | 10.0k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 10.0k | mapped = nullptr; | 297 | 10.0k | } | 298 | 10.0k | }); | 299 | | | 300 | 10.0k | 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 | 10.0k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 10.0k | sizeof(typename HashTableType::key_type), | 308 | 10.0k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 10.0k | align_aggregate_states) * | 310 | 10.0k | align_aggregate_states)); | 311 | 10.0k | agg_method.hash_table.reset(new HashTableType()); | 312 | 10.0k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 10.0k | return Status::OK(); | 314 | 10.0k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEEDaRT_ Line | Count | Source | 287 | 11.3k | [&](auto& agg_method) { | 288 | 11.3k | auto& hash_table = *agg_method.hash_table; | 289 | 11.3k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 11.3k | agg_method.reset(); | 292 | | | 293 | 11.3k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 11.3k | if (mapped) { | 295 | 11.3k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 11.3k | mapped = nullptr; | 297 | 11.3k | } | 298 | 11.3k | }); | 299 | | | 300 | 11.3k | if (hash_table.has_null_key_data()) { | 301 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 302 | 0 | vectorized::AggregateDataPtr>()); | 303 | 0 | RETURN_IF_ERROR(st); | 304 | 0 | } | 305 | | | 306 | 11.3k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 11.3k | sizeof(typename HashTableType::key_type), | 308 | 11.3k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 11.3k | align_aggregate_states) * | 310 | 11.3k | align_aggregate_states)); | 311 | 11.3k | agg_method.hash_table.reset(new HashTableType()); | 312 | 11.3k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 11.3k | return Status::OK(); | 314 | 11.3k | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEEDaRT_ Line | Count | Source | 287 | 5.63k | [&](auto& agg_method) { | 288 | 5.63k | auto& hash_table = *agg_method.hash_table; | 289 | 5.63k | using HashTableType = std::decay_t<decltype(hash_table)>; | 290 | | | 291 | 5.63k | agg_method.reset(); | 292 | | | 293 | 5.63k | hash_table.for_each_mapped([&](auto& mapped) { | 294 | 5.63k | if (mapped) { | 295 | 5.63k | static_cast<void>(_destroy_agg_status(mapped)); | 296 | 5.63k | mapped = nullptr; | 297 | 5.63k | } | 298 | 5.63k | }); | 299 | | | 300 | 5.63k | 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 | 5.63k | aggregate_data_container.reset(new AggregateDataContainer( | 307 | 5.63k | sizeof(typename HashTableType::key_type), | 308 | 5.63k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 309 | 5.63k | align_aggregate_states) * | 310 | 5.63k | align_aggregate_states)); | 311 | 5.63k | agg_method.hash_table.reset(new HashTableType()); | 312 | 5.63k | agg_arena_pool.reset(new vectorized::Arena); | 313 | 5.63k | return Status::OK(); | 314 | 5.63k | }}, |
|
315 | 100k | agg_data->method_variant); |
316 | 100k | } |
317 | | |
318 | 116k | void PartitionedAggSharedState::init_spill_params(size_t spill_partition_count) { |
319 | 116k | partition_count = spill_partition_count; |
320 | 116k | max_partition_index = partition_count - 1; |
321 | | |
322 | 3.83M | for (int i = 0; i < partition_count; ++i) { |
323 | 3.72M | spill_partitions.emplace_back(std::make_shared<AggSpillPartition>()); |
324 | 3.72M | } |
325 | 116k | } |
326 | | |
327 | 115k | void PartitionedAggSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) { |
328 | 3.68M | for (auto& partition : spill_partitions) { |
329 | 3.68M | if (partition->spilling_stream_) { |
330 | 0 | partition->spilling_stream_->update_shared_profiles(source_profile); |
331 | 0 | } |
332 | 3.68M | for (auto& stream : partition->spill_streams_) { |
333 | 52.6k | if (stream) { |
334 | 52.6k | stream->update_shared_profiles(source_profile); |
335 | 52.6k | } |
336 | 52.6k | } |
337 | 3.68M | } |
338 | 115k | } |
339 | | |
340 | | Status AggSpillPartition::get_spill_stream(RuntimeState* state, int node_id, |
341 | | RuntimeProfile* profile, |
342 | 270k | vectorized::SpillStreamSPtr& spill_stream) { |
343 | 270k | if (spilling_stream_) { |
344 | 218k | spill_stream = spilling_stream_; |
345 | 218k | return Status::OK(); |
346 | 218k | } |
347 | 51.8k | RETURN_IF_ERROR(ExecEnv::GetInstance()->spill_stream_mgr()->register_spill_stream( |
348 | 51.8k | state, spilling_stream_, print_id(state->query_id()), "agg", node_id, |
349 | 51.8k | std::numeric_limits<int32_t>::max(), std::numeric_limits<size_t>::max(), profile)); |
350 | 51.8k | spill_streams_.emplace_back(spilling_stream_); |
351 | 51.8k | spill_stream = spilling_stream_; |
352 | 51.8k | return Status::OK(); |
353 | 51.8k | } |
354 | 3.28M | void AggSpillPartition::close() { |
355 | 3.28M | if (spilling_stream_) { |
356 | 1 | spilling_stream_.reset(); |
357 | 1 | } |
358 | 3.28M | for (auto& stream : spill_streams_) { |
359 | 5 | (void)ExecEnv::GetInstance()->spill_stream_mgr()->delete_spill_stream(stream); |
360 | 5 | } |
361 | 3.28M | spill_streams_.clear(); |
362 | 3.28M | } |
363 | | |
364 | 125k | 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 | 125k | bool false_close = false; |
368 | 125k | if (!is_closed.compare_exchange_strong(false_close, true)) { |
369 | 10.4k | return; |
370 | 10.4k | } |
371 | 115k | DCHECK(!false_close && is_closed); |
372 | 3.28M | for (auto partition : spill_partitions) { |
373 | 3.28M | partition->close(); |
374 | 3.28M | } |
375 | 115k | spill_partitions.clear(); |
376 | 115k | } |
377 | | |
378 | 281k | void SpillSortSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) { |
379 | 281k | for (auto& stream : sorted_streams) { |
380 | 104 | if (stream) { |
381 | 104 | stream->update_shared_profiles(source_profile); |
382 | 104 | } |
383 | 104 | } |
384 | 281k | } |
385 | | |
386 | 281k | 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 | 281k | bool false_close = false; |
390 | 281k | if (!is_closed.compare_exchange_strong(false_close, true)) { |
391 | 2 | return; |
392 | 2 | } |
393 | 281k | DCHECK(!false_close && is_closed); |
394 | 281k | for (auto& stream : sorted_streams) { |
395 | 1 | (void)ExecEnv::GetInstance()->spill_stream_mgr()->delete_spill_stream(stream); |
396 | 1 | } |
397 | 281k | sorted_streams.clear(); |
398 | 281k | } |
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.79k | this, pool, cast_sender_count, node_id)) {} |
403 | | |
404 | 0 | void MultiCastSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {} |
405 | | |
406 | 266k | int AggSharedState::get_slot_column_id(const vectorized::AggFnEvaluator* evaluator) { |
407 | 266k | auto ctxs = evaluator->input_exprs_ctxs(); |
408 | 266k | CHECK(ctxs.size() == 1 && ctxs[0]->root()->is_slot_ref()) |
409 | 0 | << "input_exprs_ctxs is invalid, input_exprs_ctx[0]=" |
410 | 0 | << ctxs[0]->root()->debug_string(); |
411 | 266k | return ((vectorized::VSlotRef*)ctxs[0]->root().get())->column_id(); |
412 | 266k | } |
413 | | |
414 | 19.3M | Status AggSharedState::_destroy_agg_status(vectorized::AggregateDataPtr data) { |
415 | 39.2M | for (int i = 0; i < aggregate_evaluators.size(); ++i) { |
416 | 19.8M | aggregate_evaluators[i]->function()->destroy(data + offsets_of_aggregate_states[i]); |
417 | 19.8M | } |
418 | 19.3M | return Status::OK(); |
419 | 19.3M | } |
420 | | |
421 | 130k | LocalExchangeSharedState::~LocalExchangeSharedState() = default; |
422 | | |
423 | 2.19k | Status SetSharedState::update_build_not_ignore_null(const vectorized::VExprContextSPtrs& ctxs) { |
424 | 2.19k | if (ctxs.size() > build_not_ignore_null.size()) { |
425 | 0 | return Status::InternalError("build_not_ignore_null not initialized"); |
426 | 0 | } |
427 | | |
428 | 5.20k | for (int i = 0; i < ctxs.size(); ++i) { |
429 | 3.00k | build_not_ignore_null[i] = build_not_ignore_null[i] || ctxs[i]->root()->is_nullable(); |
430 | 3.00k | } |
431 | | |
432 | 2.19k | return Status::OK(); |
433 | 2.19k | } |
434 | | |
435 | 2.17k | size_t SetSharedState::get_hash_table_size() const { |
436 | 2.17k | size_t hash_table_size = 0; |
437 | 2.17k | std::visit( |
438 | 2.17k | [&](auto&& arg) { |
439 | 2.17k | using HashTableCtxType = std::decay_t<decltype(arg)>; |
440 | 2.17k | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { |
441 | 2.17k | hash_table_size = arg.hash_table->size(); |
442 | 2.17k | } |
443 | 2.17k | }, Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRSt9monostateEEDaOT_ dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS7_vEEEEEEDaOT_ Line | Count | Source | 438 | 582 | [&](auto&& arg) { | 439 | 582 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 582 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 582 | hash_table_size = arg.hash_table->size(); | 442 | 582 | } | 443 | 582 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized19MethodStringNoCacheI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS7_vEEEEEEDaOT_ Line | Count | Source | 438 | 528 | [&](auto&& arg) { | 439 | 528 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 528 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 528 | hash_table_size = arg.hash_table->size(); | 442 | 528 | } | 443 | 528 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhNS_14RowRefWithFlagE9HashCRC32IhEEEEEEEEEEDaOT_ Line | Count | Source | 438 | 172 | [&](auto&& arg) { | 439 | 172 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 172 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 172 | hash_table_size = arg.hash_table->size(); | 442 | 172 | } | 443 | 172 | }, |
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 | 316 | [&](auto&& arg) { | 439 | 316 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 316 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 316 | hash_table_size = arg.hash_table->size(); | 442 | 316 | } | 443 | 316 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEEEEEDaOT_ Line | Count | Source | 438 | 209 | [&](auto&& arg) { | 439 | 209 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 209 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 209 | hash_table_size = arg.hash_table->size(); | 442 | 209 | } | 443 | 209 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_NS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEEEEEDaOT_ Line | Count | Source | 438 | 112 | [&](auto&& arg) { | 439 | 112 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 112 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 112 | hash_table_size = arg.hash_table->size(); | 442 | 112 | } | 443 | 112 | }, |
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_NS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEEEEEDaOT_ dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIh9PHHashMapIhNS_14RowRefWithFlagE9HashCRC32IhEEEEEEDaOT_ Line | Count | Source | 438 | 31 | [&](auto&& arg) { | 439 | 31 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 31 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 31 | hash_table_size = arg.hash_table->size(); | 442 | 31 | } | 443 | 31 | }, |
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIt9PHHashMapItNS_14RowRefWithFlagE9HashCRC32ItEEEEEEDaOT_ dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIj9PHHashMapIjNS_14RowRefWithFlagE9HashCRC32IjEEEEEEDaOT_ Line | Count | Source | 438 | 40 | [&](auto&& arg) { | 439 | 40 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 40 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 40 | hash_table_size = arg.hash_table->size(); | 442 | 40 | } | 443 | 40 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEDaOT_ Line | Count | Source | 438 | 12 | [&](auto&& arg) { | 439 | 12 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 12 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 12 | hash_table_size = arg.hash_table->size(); | 442 | 12 | } | 443 | 12 | }, |
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 | 92 | [&](auto&& arg) { | 439 | 92 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 92 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 92 | hash_table_size = arg.hash_table->size(); | 442 | 92 | } | 443 | 92 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEENS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEDaOT_ Line | Count | Source | 438 | 48 | [&](auto&& arg) { | 439 | 48 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 48 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 48 | hash_table_size = arg.hash_table->size(); | 442 | 48 | } | 443 | 48 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_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 | 33 | [&](auto&& arg) { | 439 | 33 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 440 | 33 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 441 | 33 | hash_table_size = arg.hash_table->size(); | 442 | 33 | } | 443 | 33 | }, |
|
444 | 2.17k | hash_table_variants->method_variant); |
445 | 2.17k | return hash_table_size; |
446 | 2.17k | } |
447 | | |
448 | 1.06k | Status SetSharedState::hash_table_init() { |
449 | 1.06k | std::vector<vectorized::DataTypePtr> data_types; |
450 | 2.51k | for (size_t i = 0; i != child_exprs_lists[0].size(); ++i) { |
451 | 1.45k | auto& ctx = child_exprs_lists[0][i]; |
452 | 1.45k | auto data_type = ctx->root()->data_type(); |
453 | 1.45k | if (build_not_ignore_null[i]) { |
454 | 1.06k | data_type = vectorized::make_nullable(data_type); |
455 | 1.06k | } |
456 | 1.45k | data_types.emplace_back(std::move(data_type)); |
457 | 1.45k | } |
458 | 1.06k | return init_hash_method<SetDataVariants>(hash_table_variants.get(), data_types, true); |
459 | 1.06k | } |
460 | | |
461 | | void AggSharedState::refresh_top_limit(size_t row_id, |
462 | 2.37k | const vectorized::ColumnRawPtrs& key_columns) { |
463 | 5.00k | for (int j = 0; j < key_columns.size(); ++j) { |
464 | 2.63k | limit_columns[j]->insert_from(*key_columns[j], row_id); |
465 | 2.63k | } |
466 | 2.37k | limit_heap.emplace(limit_columns[0]->size() - 1, limit_columns, order_directions, |
467 | 2.37k | null_directions); |
468 | | |
469 | 2.37k | limit_heap.pop(); |
470 | 2.37k | limit_columns_min = limit_heap.top()._row_id; |
471 | 2.37k | } |
472 | | |
473 | | } // namespace doris::pipeline |