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