/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 | 397k | const std::string& name) { |
43 | 397k | source_deps.push_back(std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY")); |
44 | 397k | source_deps.back()->set_shared_state(this); |
45 | 397k | return source_deps.back().get(); |
46 | 397k | } |
47 | | |
48 | | void BasicSharedState::create_source_dependencies(int num_sources, int operator_id, int node_id, |
49 | 181k | const std::string& name) { |
50 | 181k | source_deps.resize(num_sources, nullptr); |
51 | 1.14M | for (auto& source_dep : source_deps) { |
52 | 1.14M | source_dep = std::make_shared<Dependency>(operator_id, node_id, name + "_DEPENDENCY"); |
53 | 1.14M | source_dep->set_shared_state(this); |
54 | 1.14M | } |
55 | 181k | } |
56 | | |
57 | | Dependency* BasicSharedState::create_sink_dependency(int dest_id, int node_id, |
58 | 1.17M | const std::string& name) { |
59 | 1.17M | sink_deps.push_back(std::make_shared<Dependency>(dest_id, node_id, name + "_DEPENDENCY", true)); |
60 | 1.17M | sink_deps.back()->set_shared_state(this); |
61 | 1.17M | return sink_deps.back().get(); |
62 | 1.17M | } |
63 | | |
64 | 6.48M | 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 | 6.48M | _blocked_task.push_back(task); |
69 | 6.48M | } |
70 | | |
71 | 22.6M | void Dependency::set_ready() { |
72 | 22.6M | if (_ready) { |
73 | 16.9M | return; |
74 | 16.9M | } |
75 | 5.72M | std::vector<std::weak_ptr<PipelineTask>> local_block_task {}; |
76 | 5.72M | { |
77 | 5.72M | std::unique_lock<std::mutex> lc(_task_lock); |
78 | 5.72M | if (_ready) { |
79 | 1 | return; |
80 | 1 | } |
81 | 5.72M | _watcher.stop(); |
82 | 5.72M | _ready = true; |
83 | 5.72M | local_block_task.swap(_blocked_task); |
84 | 5.72M | } |
85 | 6.50M | for (auto task : local_block_task) { |
86 | 6.50M | if (auto t = task.lock()) { |
87 | 6.50M | std::unique_lock<std::mutex> lc(_task_lock); |
88 | 6.50M | THROW_IF_ERROR(t->wake_up(this, lc)); |
89 | 6.50M | } |
90 | 6.50M | } |
91 | 5.72M | } |
92 | | |
93 | 55.9M | Dependency* Dependency::is_blocked_by(std::shared_ptr<PipelineTask> task) { |
94 | 55.9M | std::unique_lock<std::mutex> lc(_task_lock); |
95 | 55.9M | auto ready = _ready.load(); |
96 | 55.9M | if (!ready && task) { |
97 | 6.50M | _add_block_task(task); |
98 | 6.50M | start_watcher(); |
99 | 6.50M | THROW_IF_ERROR(task->blocked(this, lc)); |
100 | 6.50M | } |
101 | 55.9M | return ready ? nullptr : this; |
102 | 55.9M | } |
103 | | |
104 | 319k | std::string Dependency::debug_string(int indentation_level) { |
105 | 319k | fmt::memory_buffer debug_string_buffer; |
106 | 319k | fmt::format_to(debug_string_buffer, "{}{}: id={}, block task = {}, ready={}, _always_ready={}", |
107 | 319k | std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(), |
108 | 319k | _ready, _always_ready); |
109 | 319k | return fmt::to_string(debug_string_buffer); |
110 | 319k | } |
111 | | |
112 | 0 | std::string CountedFinishDependency::debug_string(int indentation_level) { |
113 | 0 | fmt::memory_buffer debug_string_buffer; |
114 | 0 | fmt::format_to(debug_string_buffer, |
115 | 0 | "{}{}: id={}, block_task={}, ready={}, _always_ready={}, count={}", |
116 | 0 | std::string(indentation_level * 2, ' '), _name, _node_id, _blocked_task.size(), |
117 | 0 | _ready, _always_ready, _counter); |
118 | 0 | return fmt::to_string(debug_string_buffer); |
119 | 0 | } |
120 | | |
121 | 4.07k | void RuntimeFilterTimer::call_timeout() { |
122 | 4.07k | _parent->set_ready(); |
123 | 4.07k | } |
124 | | |
125 | 25.7k | void RuntimeFilterTimer::call_ready() { |
126 | 25.7k | _parent->set_ready(); |
127 | 25.7k | } |
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 | 1.49M | bool RuntimeFilterTimer::should_be_check_timeout() { |
133 | 1.49M | if (!_parent->ready() && !_local_runtime_filter_dependencies.empty()) { |
134 | 92.6k | bool all_ready = true; |
135 | 92.7k | for (auto& dep : _local_runtime_filter_dependencies) { |
136 | 92.7k | if (!dep->ready()) { |
137 | 92.6k | all_ready = false; |
138 | 92.6k | break; |
139 | 92.6k | } |
140 | 92.7k | } |
141 | 92.6k | if (all_ready) { |
142 | 48 | _local_runtime_filter_dependencies.clear(); |
143 | 48 | _registration_time = MonotonicMillis(); |
144 | 48 | } |
145 | 92.6k | return all_ready; |
146 | 92.6k | } |
147 | 1.40M | return true; |
148 | 1.49M | } |
149 | | |
150 | 8 | void RuntimeFilterTimerQueue::start() { |
151 | 165k | while (!_stop) { |
152 | 165k | std::unique_lock<std::mutex> lk(cv_m); |
153 | | |
154 | 169k | while (_que.empty() && !_stop) { |
155 | 7.48k | cv.wait_for(lk, std::chrono::seconds(3), [this] { return !_que.empty() || _stop; }); |
156 | 3.74k | } |
157 | 165k | if (_stop) { |
158 | 3 | break; |
159 | 3 | } |
160 | 165k | { |
161 | 165k | std::unique_lock<std::mutex> lc(_que_lock); |
162 | 165k | std::list<std::shared_ptr<pipeline::RuntimeFilterTimer>> new_que; |
163 | 1.49M | for (auto& it : _que) { |
164 | 1.49M | if (it.use_count() == 1) { |
165 | | // `use_count == 1` means this runtime filter has been released |
166 | 1.49M | } else if (it->should_be_check_timeout()) { |
167 | 1.40M | 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 | 1.37M | int64_t ms_since_registration = MonotonicMillis() - it->registration_time(); |
170 | 1.37M | if (ms_since_registration > it->wait_time_ms()) { |
171 | 4.07k | it->call_timeout(); |
172 | 1.37M | } else { |
173 | 1.37M | new_que.push_back(std::move(it)); |
174 | 1.37M | } |
175 | 1.37M | } |
176 | 1.40M | } else { |
177 | 92.6k | new_que.push_back(std::move(it)); |
178 | 92.6k | } |
179 | 1.49M | } |
180 | 165k | new_que.swap(_que); |
181 | 165k | } |
182 | 165k | std::this_thread::sleep_for(std::chrono::milliseconds(interval)); |
183 | 165k | } |
184 | 8 | _shutdown = true; |
185 | 8 | } |
186 | | |
187 | 622k | void LocalExchangeSharedState::sub_running_sink_operators() { |
188 | 622k | std::unique_lock<std::mutex> lc(le_lock); |
189 | 622k | if (exchanger->_running_sink_operators.fetch_sub(1) == 1) { |
190 | 177k | _set_always_ready(); |
191 | 177k | } |
192 | 622k | } |
193 | | |
194 | 1.12M | void LocalExchangeSharedState::sub_running_source_operators() { |
195 | 1.12M | std::unique_lock<std::mutex> lc(le_lock); |
196 | 1.12M | if (exchanger->_running_source_operators.fetch_sub(1) == 1) { |
197 | 177k | _set_always_ready(); |
198 | 177k | exchanger->finalize(); |
199 | 177k | } |
200 | 1.12M | } |
201 | | |
202 | 176k | LocalExchangeSharedState::LocalExchangeSharedState(int num_instances) { |
203 | 176k | source_deps.resize(num_instances, nullptr); |
204 | 176k | mem_counters.resize(num_instances, nullptr); |
205 | 176k | } |
206 | | |
207 | 111 | vectorized::MutableColumns AggSharedState::_get_keys_hash_table() { |
208 | 111 | return std::visit( |
209 | 111 | vectorized::Overload { |
210 | 111 | [&](std::monostate& arg) { |
211 | 0 | throw doris::Exception(ErrorCode::INTERNAL_ERROR, "uninited hash table"); |
212 | 0 | return vectorized::MutableColumns(); |
213 | 0 | }, |
214 | 111 | [&](auto&& agg_method) -> vectorized::MutableColumns { |
215 | 111 | vectorized::MutableColumns key_columns; |
216 | 362 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { |
217 | 251 | key_columns.emplace_back( |
218 | 251 | probe_expr_ctxs[i]->root()->data_type()->create_column()); |
219 | 251 | } |
220 | 111 | auto& data = *agg_method.hash_table; |
221 | 111 | bool has_null_key = data.has_null_key_data(); |
222 | 111 | const auto size = data.size() - has_null_key; |
223 | 111 | using KeyType = std::decay_t<decltype(agg_method)>::Key; |
224 | 111 | std::vector<KeyType> keys(size); |
225 | | |
226 | 111 | uint32_t num_rows = 0; |
227 | 111 | auto iter = aggregate_data_container->begin(); |
228 | 111 | { |
229 | 29.0k | while (iter != aggregate_data_container->end()) { |
230 | 28.9k | keys[num_rows] = iter.get_key<KeyType>(); |
231 | 28.9k | ++iter; |
232 | 28.9k | ++num_rows; |
233 | 28.9k | } |
234 | 111 | } |
235 | 111 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); |
236 | 111 | if (has_null_key) { |
237 | 2 | key_columns[0]->insert_data(nullptr, 0); |
238 | 2 | } |
239 | 111 | return key_columns; |
240 | 111 | }}, dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISG_EESaISJ_EEOT_ Line | Count | Source | 214 | 10 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 215 | 10 | vectorized::MutableColumns key_columns; | 216 | 50 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 217 | 40 | key_columns.emplace_back( | 218 | 40 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 219 | 40 | } | 220 | 10 | auto& data = *agg_method.hash_table; | 221 | 10 | bool has_null_key = data.has_null_key_data(); | 222 | 10 | const auto size = data.size() - has_null_key; | 223 | 10 | using KeyType = std::decay_t<decltype(agg_method)>::Key; | 224 | 10 | std::vector<KeyType> keys(size); | 225 | | | 226 | 10 | uint32_t num_rows = 0; | 227 | 10 | auto iter = aggregate_data_container->begin(); | 228 | 10 | { | 229 | 21.6k | while (iter != aggregate_data_container->end()) { | 230 | 21.6k | keys[num_rows] = iter.get_key<KeyType>(); | 231 | 21.6k | ++iter; | 232 | 21.6k | ++num_rows; | 233 | 21.6k | } | 234 | 10 | } | 235 | 10 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 236 | 10 | if (has_null_key) { | 237 | 0 | key_columns[0]->insert_data(nullptr, 0); | 238 | 0 | } | 239 | 10 | return key_columns; | 240 | 10 | }}, |
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_ Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_ dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISF_EESaISI_EEOT_ Line | Count | Source | 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 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEESt6vectorINS_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 | 12 | while (iter != aggregate_data_container->end()) { | 230 | 10 | keys[num_rows] = iter.get_key<KeyType>(); | 231 | 10 | ++iter; | 232 | 10 | ++num_rows; | 233 | 10 | } | 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_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 | 4 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 215 | 4 | vectorized::MutableColumns key_columns; | 216 | 8 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 217 | 4 | key_columns.emplace_back( | 218 | 4 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 219 | 4 | } | 220 | 4 | auto& data = *agg_method.hash_table; | 221 | 4 | bool has_null_key = data.has_null_key_data(); | 222 | 4 | const auto size = data.size() - has_null_key; | 223 | 4 | using KeyType = std::decay_t<decltype(agg_method)>::Key; | 224 | 4 | std::vector<KeyType> keys(size); | 225 | | | 226 | 4 | uint32_t num_rows = 0; | 227 | 4 | auto iter = aggregate_data_container->begin(); | 228 | 4 | { | 229 | 20 | while (iter != aggregate_data_container->end()) { | 230 | 16 | keys[num_rows] = iter.get_key<KeyType>(); | 231 | 16 | ++iter; | 232 | 16 | ++num_rows; | 233 | 16 | } | 234 | 4 | } | 235 | 4 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 236 | 4 | if (has_null_key) { | 237 | 0 | key_columns[0]->insert_data(nullptr, 0); | 238 | 0 | } | 239 | 4 | return key_columns; | 240 | 4 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_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 | 11 | while (iter != aggregate_data_container->end()) { | 230 | 9 | keys[num_rows] = iter.get_key<KeyType>(); | 231 | 9 | ++iter; | 232 | 9 | ++num_rows; | 233 | 9 | } | 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_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 | 214 | 5 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 215 | 5 | vectorized::MutableColumns key_columns; | 216 | 10 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 217 | 5 | key_columns.emplace_back( | 218 | 5 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 219 | 5 | } | 220 | 5 | auto& data = *agg_method.hash_table; | 221 | 5 | bool has_null_key = data.has_null_key_data(); | 222 | 5 | const auto size = data.size() - has_null_key; | 223 | 5 | using KeyType = std::decay_t<decltype(agg_method)>::Key; | 224 | 5 | std::vector<KeyType> keys(size); | 225 | | | 226 | 5 | uint32_t num_rows = 0; | 227 | 5 | auto iter = aggregate_data_container->begin(); | 228 | 5 | { | 229 | 2.33k | while (iter != aggregate_data_container->end()) { | 230 | 2.33k | keys[num_rows] = iter.get_key<KeyType>(); | 231 | 2.33k | ++iter; | 232 | 2.33k | ++num_rows; | 233 | 2.33k | } | 234 | 5 | } | 235 | 5 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 236 | 5 | if (has_null_key) { | 237 | 0 | key_columns[0]->insert_data(nullptr, 0); | 238 | 0 | } | 239 | 5 | return key_columns; | 240 | 5 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISJ_EESaISM_EEOT_ Line | Count | Source | 214 | 5 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 215 | 5 | vectorized::MutableColumns key_columns; | 216 | 10 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 217 | 5 | key_columns.emplace_back( | 218 | 5 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 219 | 5 | } | 220 | 5 | auto& data = *agg_method.hash_table; | 221 | 5 | bool has_null_key = data.has_null_key_data(); | 222 | 5 | const auto size = data.size() - has_null_key; | 223 | 5 | using KeyType = std::decay_t<decltype(agg_method)>::Key; | 224 | 5 | std::vector<KeyType> keys(size); | 225 | | | 226 | 5 | uint32_t num_rows = 0; | 227 | 5 | auto iter = aggregate_data_container->begin(); | 228 | 5 | { | 229 | 2.45k | while (iter != aggregate_data_container->end()) { | 230 | 2.45k | keys[num_rows] = iter.get_key<KeyType>(); | 231 | 2.45k | ++iter; | 232 | 2.45k | ++num_rows; | 233 | 2.45k | } | 234 | 5 | } | 235 | 5 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 236 | 5 | if (has_null_key) { | 237 | 0 | key_columns[0]->insert_data(nullptr, 0); | 238 | 0 | } | 239 | 5 | return key_columns; | 240 | 5 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISL_EESaISO_EEOT_ Line | Count | Source | 214 | 8 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 215 | 8 | vectorized::MutableColumns key_columns; | 216 | 16 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 217 | 8 | key_columns.emplace_back( | 218 | 8 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 219 | 8 | } | 220 | 8 | auto& data = *agg_method.hash_table; | 221 | 8 | bool has_null_key = data.has_null_key_data(); | 222 | 8 | const auto size = data.size() - has_null_key; | 223 | 8 | using KeyType = std::decay_t<decltype(agg_method)>::Key; | 224 | 8 | std::vector<KeyType> keys(size); | 225 | | | 226 | 8 | uint32_t num_rows = 0; | 227 | 8 | auto iter = aggregate_data_container->begin(); | 228 | 8 | { | 229 | 28 | while (iter != aggregate_data_container->end()) { | 230 | 20 | keys[num_rows] = iter.get_key<KeyType>(); | 231 | 20 | ++iter; | 232 | 20 | ++num_rows; | 233 | 20 | } | 234 | 8 | } | 235 | 8 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 236 | 8 | if (has_null_key) { | 237 | 1 | key_columns[0]->insert_data(nullptr, 0); | 238 | 1 | } | 239 | 8 | return key_columns; | 240 | 8 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISL_EESaISO_EEOT_ Line | Count | Source | 214 | 10 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 215 | 10 | vectorized::MutableColumns key_columns; | 216 | 20 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 217 | 10 | key_columns.emplace_back( | 218 | 10 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 219 | 10 | } | 220 | 10 | auto& data = *agg_method.hash_table; | 221 | 10 | bool has_null_key = data.has_null_key_data(); | 222 | 10 | const auto size = data.size() - has_null_key; | 223 | 10 | using KeyType = std::decay_t<decltype(agg_method)>::Key; | 224 | 10 | std::vector<KeyType> keys(size); | 225 | | | 226 | 10 | uint32_t num_rows = 0; | 227 | 10 | auto iter = aggregate_data_container->begin(); | 228 | 10 | { | 229 | 46 | while (iter != aggregate_data_container->end()) { | 230 | 36 | keys[num_rows] = iter.get_key<KeyType>(); | 231 | 36 | ++iter; | 232 | 36 | ++num_rows; | 233 | 36 | } | 234 | 10 | } | 235 | 10 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 236 | 10 | if (has_null_key) { | 237 | 1 | key_columns[0]->insert_data(nullptr, 0); | 238 | 1 | } | 239 | 10 | return key_columns; | 240 | 10 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISM_EESaISP_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_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISM_EESaISP_EEOT_ Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState20_get_keys_hash_tableEvENK3$_1clIRNS_10vectorized26MethodSingleNullableColumnINS4_19MethodStringNoCacheINS4_15DataWithNullKeyINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEEEEESt6vectorINS_3COWINS4_7IColumnEE11mutable_ptrISK_EESaISN_EEOT_ 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_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 | 60 | [&](auto&& agg_method) -> vectorized::MutableColumns { | 215 | 60 | vectorized::MutableColumns key_columns; | 216 | 230 | for (int i = 0; i < probe_expr_ctxs.size(); ++i) { | 217 | 170 | key_columns.emplace_back( | 218 | 170 | probe_expr_ctxs[i]->root()->data_type()->create_column()); | 219 | 170 | } | 220 | 60 | auto& data = *agg_method.hash_table; | 221 | 60 | bool has_null_key = data.has_null_key_data(); | 222 | 60 | const auto size = data.size() - has_null_key; | 223 | 60 | using KeyType = std::decay_t<decltype(agg_method)>::Key; | 224 | 60 | std::vector<KeyType> keys(size); | 225 | | | 226 | 60 | uint32_t num_rows = 0; | 227 | 60 | auto iter = aggregate_data_container->begin(); | 228 | 60 | { | 229 | 2.40k | while (iter != aggregate_data_container->end()) { | 230 | 2.34k | keys[num_rows] = iter.get_key<KeyType>(); | 231 | 2.34k | ++iter; | 232 | 2.34k | ++num_rows; | 233 | 2.34k | } | 234 | 60 | } | 235 | 60 | agg_method.insert_keys_into_columns(keys, key_columns, num_rows); | 236 | 60 | if (has_null_key) { | 237 | 0 | key_columns[0]->insert_data(nullptr, 0); | 238 | 0 | } | 239 | 60 | return key_columns; | 240 | 60 | }}, |
|
241 | 111 | agg_data->method_variant); |
242 | 111 | } |
243 | | |
244 | 111 | void AggSharedState::build_limit_heap(size_t hash_table_size) { |
245 | 111 | limit_columns = _get_keys_hash_table(); |
246 | 28.4k | for (size_t i = 0; i < hash_table_size; ++i) { |
247 | 28.3k | limit_heap.emplace(i, limit_columns, order_directions, null_directions); |
248 | 28.3k | } |
249 | 28.6k | while (hash_table_size > limit) { |
250 | 28.5k | limit_heap.pop(); |
251 | 28.5k | hash_table_size--; |
252 | 28.5k | } |
253 | 111 | limit_columns_min = limit_heap.top()._row_id; |
254 | 111 | } |
255 | | |
256 | | bool AggSharedState::do_limit_filter(vectorized::Block* block, size_t num_rows, |
257 | 248 | const std::vector<int>* key_locs) { |
258 | 248 | if (num_rows) { |
259 | 248 | cmp_res.resize(num_rows); |
260 | 248 | need_computes.resize(num_rows); |
261 | 248 | memset(need_computes.data(), 0, need_computes.size()); |
262 | 248 | memset(cmp_res.data(), 0, cmp_res.size()); |
263 | | |
264 | 248 | const auto key_size = null_directions.size(); |
265 | 850 | for (int i = 0; i < key_size; i++) { |
266 | 602 | block->get_by_position(key_locs ? key_locs->operator[](i) : i) |
267 | 602 | .column->compare_internal(limit_columns_min, *limit_columns[i], |
268 | 602 | null_directions[i], order_directions[i], cmp_res, |
269 | 602 | need_computes.data()); |
270 | 602 | } |
271 | | |
272 | 248 | auto set_computes_arr = [](auto* __restrict res, auto* __restrict computes, size_t rows) { |
273 | 381k | for (size_t i = 0; i < rows; ++i) { |
274 | 381k | computes[i] = computes[i] == res[i]; |
275 | 381k | } |
276 | 248 | }; |
277 | 248 | set_computes_arr(cmp_res.data(), need_computes.data(), num_rows); |
278 | | |
279 | 248 | return std::find(need_computes.begin(), need_computes.end(), 0) != need_computes.end(); |
280 | 248 | } |
281 | | |
282 | 0 | return false; |
283 | 248 | } |
284 | | |
285 | 2.91k | Status AggSharedState::reset_hash_table() { |
286 | 2.91k | return std::visit( |
287 | 2.91k | vectorized::Overload { |
288 | 2.91k | [&](std::monostate& arg) -> Status { |
289 | 0 | return Status::InternalError("Uninited hash table"); |
290 | 0 | }, |
291 | 2.91k | [&](auto& agg_method) { |
292 | 2.91k | auto& hash_table = *agg_method.hash_table; |
293 | 2.91k | using HashTableType = std::decay_t<decltype(hash_table)>; |
294 | | |
295 | 2.91k | agg_method.arena.clear(); |
296 | 2.91k | agg_method.inited_iterator = false; |
297 | | |
298 | 1.84M | hash_table.for_each_mapped([&](auto& mapped) { |
299 | 1.84M | if (mapped) { |
300 | 1.84M | static_cast<void>(_destroy_agg_status(mapped)); |
301 | 1.84M | mapped = nullptr; |
302 | 1.84M | } |
303 | 1.84M | }); 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 | 88 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 88 | if (mapped) { | 300 | 88 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 88 | mapped = nullptr; | 302 | 88 | } | 303 | 88 | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_ENKUlSD_E_clIS7_EEDaSD_ Line | Count | Source | 298 | 302 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 302 | if (mapped) { | 300 | 302 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 302 | mapped = nullptr; | 302 | 302 | } | 303 | 302 | }); |
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 | 534 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 534 | if (mapped) { | 300 | 534 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 534 | mapped = nullptr; | 302 | 534 | } | 303 | 534 | }); |
Unexecuted instantiation: dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEDaRT_ENKUlSE_E_clIS7_EEDaSE_ dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_ENKUlSG_E_clISA_EEDaSG_ Line | Count | Source | 298 | 244 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 244 | if (mapped) { | 300 | 244 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 244 | mapped = nullptr; | 302 | 244 | } | 303 | 244 | }); |
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 | static_cast<void>(_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.66k | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 1.66k | if (mapped) { | 300 | 1.66k | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 1.66k | mapped = nullptr; | 302 | 1.66k | } | 303 | 1.66k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_ Line | Count | Source | 298 | 174 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 174 | if (mapped) { | 300 | 174 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 174 | mapped = nullptr; | 302 | 174 | } | 303 | 174 | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_ Line | Count | Source | 298 | 232 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 232 | if (mapped) { | 300 | 232 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 232 | mapped = nullptr; | 302 | 232 | } | 303 | 232 | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_ Line | Count | Source | 298 | 394k | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 394k | if (mapped) { | 300 | 394k | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 394k | mapped = nullptr; | 302 | 394k | } | 303 | 394k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_ENKUlSH_E_clIS9_EEDaSH_ Line | Count | Source | 298 | 948 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 948 | if (mapped) { | 300 | 948 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 948 | mapped = nullptr; | 302 | 948 | } | 303 | 948 | }); |
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 | static_cast<void>(_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.20k | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 1.20k | if (mapped) { | 300 | 1.20k | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 1.20k | mapped = nullptr; | 302 | 1.20k | } | 303 | 1.20k | }); |
dependency.cpp:_ZZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ENKUlSK_E_clISC_EEDaSK_ Line | Count | Source | 298 | 52 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 52 | if (mapped) { | 300 | 52 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 52 | mapped = nullptr; | 302 | 52 | } | 303 | 52 | }); |
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_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 | 2.91k | if (hash_table.has_null_key_data()) { |
306 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< |
307 | 0 | vectorized::AggregateDataPtr>()); |
308 | 0 | RETURN_IF_ERROR(st); |
309 | 0 | } |
310 | | |
311 | 2.91k | aggregate_data_container.reset(new AggregateDataContainer( |
312 | 2.91k | sizeof(typename HashTableType::key_type), |
313 | 2.91k | ((total_size_of_aggregate_states + align_aggregate_states - 1) / |
314 | 2.91k | align_aggregate_states) * |
315 | 2.91k | align_aggregate_states)); |
316 | 2.91k | agg_method.hash_table.reset(new HashTableType()); |
317 | 2.91k | return Status::OK(); |
318 | 2.91k | }}, Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefEPc11DefaultHashIS7_vEEEEEEDaRT_ dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIh9PHHashMapIhPc9HashCRC32IhEEEEEEDaRT_ Line | Count | Source | 291 | 52 | [&](auto& agg_method) { | 292 | 52 | auto& hash_table = *agg_method.hash_table; | 293 | 52 | using HashTableType = std::decay_t<decltype(hash_table)>; | 294 | | | 295 | 52 | agg_method.arena.clear(); | 296 | 52 | agg_method.inited_iterator = false; | 297 | | | 298 | 52 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 52 | if (mapped) { | 300 | 52 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 52 | mapped = nullptr; | 302 | 52 | } | 303 | 52 | }); | 304 | | | 305 | 52 | if (hash_table.has_null_key_data()) { | 306 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 307 | 0 | vectorized::AggregateDataPtr>()); | 308 | 0 | RETURN_IF_ERROR(st); | 309 | 0 | } | 310 | | | 311 | 52 | aggregate_data_container.reset(new AggregateDataContainer( | 312 | 52 | sizeof(typename HashTableType::key_type), | 313 | 52 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 314 | 52 | align_aggregate_states) * | 315 | 52 | align_aggregate_states)); | 316 | 52 | agg_method.hash_table.reset(new HashTableType()); | 317 | 52 | return Status::OK(); | 318 | 52 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIt9PHHashMapItPc9HashCRC32ItEEEEEEDaRT_ Line | Count | Source | 291 | 78 | [&](auto& agg_method) { | 292 | 78 | auto& hash_table = *agg_method.hash_table; | 293 | 78 | using HashTableType = std::decay_t<decltype(hash_table)>; | 294 | | | 295 | 78 | agg_method.arena.clear(); | 296 | 78 | agg_method.inited_iterator = false; | 297 | | | 298 | 78 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 78 | if (mapped) { | 300 | 78 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 78 | mapped = nullptr; | 302 | 78 | } | 303 | 78 | }); | 304 | | | 305 | 78 | if (hash_table.has_null_key_data()) { | 306 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 307 | 0 | vectorized::AggregateDataPtr>()); | 308 | 0 | RETURN_IF_ERROR(st); | 309 | 0 | } | 310 | | | 311 | 78 | aggregate_data_container.reset(new AggregateDataContainer( | 312 | 78 | sizeof(typename HashTableType::key_type), | 313 | 78 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 314 | 78 | align_aggregate_states) * | 315 | 78 | align_aggregate_states)); | 316 | 78 | agg_method.hash_table.reset(new HashTableType()); | 317 | 78 | return Status::OK(); | 318 | 78 | }}, |
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc9HashCRC32IjEEEEEEDaRT_ dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc9HashCRC32ImEEEEEEDaRT_ Line | Count | Source | 291 | 140 | [&](auto& agg_method) { | 292 | 140 | auto& hash_table = *agg_method.hash_table; | 293 | 140 | using HashTableType = std::decay_t<decltype(hash_table)>; | 294 | | | 295 | 140 | agg_method.arena.clear(); | 296 | 140 | agg_method.inited_iterator = false; | 297 | | | 298 | 140 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 140 | if (mapped) { | 300 | 140 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 140 | mapped = nullptr; | 302 | 140 | } | 303 | 140 | }); | 304 | | | 305 | 140 | if (hash_table.has_null_key_data()) { | 306 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 307 | 0 | vectorized::AggregateDataPtr>()); | 308 | 0 | RETURN_IF_ERROR(st); | 309 | 0 | } | 310 | | | 311 | 140 | aggregate_data_container.reset(new AggregateDataContainer( | 312 | 140 | sizeof(typename HashTableType::key_type), | 313 | 140 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 314 | 140 | align_aggregate_states) * | 315 | 140 | align_aggregate_states)); | 316 | 140 | agg_method.hash_table.reset(new HashTableType()); | 317 | 140 | return Status::OK(); | 318 | 140 | }}, |
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized19MethodStringNoCacheINS_13StringHashMapIPcNS_9AllocatorILb1ELb1ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEEEEEDaRT_ dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_ Line | Count | Source | 291 | 76 | [&](auto& agg_method) { | 292 | 76 | auto& hash_table = *agg_method.hash_table; | 293 | 76 | using HashTableType = std::decay_t<decltype(hash_table)>; | 294 | | | 295 | 76 | agg_method.arena.clear(); | 296 | 76 | agg_method.inited_iterator = false; | 297 | | | 298 | 76 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 76 | if (mapped) { | 300 | 76 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 76 | mapped = nullptr; | 302 | 76 | } | 303 | 76 | }); | 304 | | | 305 | 76 | if (hash_table.has_null_key_data()) { | 306 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 307 | 0 | vectorized::AggregateDataPtr>()); | 308 | 0 | RETURN_IF_ERROR(st); | 309 | 0 | } | 310 | | | 311 | 76 | aggregate_data_container.reset(new AggregateDataContainer( | 312 | 76 | sizeof(typename HashTableType::key_type), | 313 | 76 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 314 | 76 | align_aggregate_states) * | 315 | 76 | align_aggregate_states)); | 316 | 76 | agg_method.hash_table.reset(new HashTableType()); | 317 | 76 | return Status::OK(); | 318 | 76 | }}, |
Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_Pc9HashCRC32IS8_EEEEEEDaRT_ dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIj9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEDaRT_ 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 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 239 | mapped = nullptr; | 302 | 239 | } | 303 | 239 | }); | 304 | | | 305 | 239 | if (hash_table.has_null_key_data()) { | 306 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 307 | 0 | vectorized::AggregateDataPtr>()); | 308 | 0 | RETURN_IF_ERROR(st); | 309 | 0 | } | 310 | | | 311 | 239 | aggregate_data_container.reset(new AggregateDataContainer( | 312 | 239 | sizeof(typename HashTableType::key_type), | 313 | 239 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 314 | 239 | align_aggregate_states) * | 315 | 239 | align_aggregate_states)); | 316 | 239 | agg_method.hash_table.reset(new HashTableType()); | 317 | 239 | return Status::OK(); | 318 | 239 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodOneNumberIm9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEDaRT_ Line | Count | Source | 291 | 572 | [&](auto& agg_method) { | 292 | 572 | auto& hash_table = *agg_method.hash_table; | 293 | 572 | using HashTableType = std::decay_t<decltype(hash_table)>; | 294 | | | 295 | 572 | agg_method.arena.clear(); | 296 | 572 | agg_method.inited_iterator = false; | 297 | | | 298 | 572 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 572 | if (mapped) { | 300 | 572 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 572 | mapped = nullptr; | 302 | 572 | } | 303 | 572 | }); | 304 | | | 305 | 572 | if (hash_table.has_null_key_data()) { | 306 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 307 | 0 | vectorized::AggregateDataPtr>()); | 308 | 0 | RETURN_IF_ERROR(st); | 309 | 0 | } | 310 | | | 311 | 572 | aggregate_data_container.reset(new AggregateDataContainer( | 312 | 572 | sizeof(typename HashTableType::key_type), | 313 | 572 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 314 | 572 | align_aggregate_states) * | 315 | 572 | align_aggregate_states)); | 316 | 572 | agg_method.hash_table.reset(new HashTableType()); | 317 | 572 | return Status::OK(); | 318 | 572 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhPc9HashCRC32IhEEEEEEEEEEDaRT_ Line | Count | Source | 291 | 54 | [&](auto& agg_method) { | 292 | 54 | auto& hash_table = *agg_method.hash_table; | 293 | 54 | using HashTableType = std::decay_t<decltype(hash_table)>; | 294 | | | 295 | 54 | agg_method.arena.clear(); | 296 | 54 | agg_method.inited_iterator = false; | 297 | | | 298 | 54 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 54 | if (mapped) { | 300 | 54 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 54 | mapped = nullptr; | 302 | 54 | } | 303 | 54 | }); | 304 | | | 305 | 54 | if (hash_table.has_null_key_data()) { | 306 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 307 | 0 | vectorized::AggregateDataPtr>()); | 308 | 0 | RETURN_IF_ERROR(st); | 309 | 0 | } | 310 | | | 311 | 54 | aggregate_data_container.reset(new AggregateDataContainer( | 312 | 54 | sizeof(typename HashTableType::key_type), | 313 | 54 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 314 | 54 | align_aggregate_states) * | 315 | 54 | align_aggregate_states)); | 316 | 54 | agg_method.hash_table.reset(new HashTableType()); | 317 | 54 | return Status::OK(); | 318 | 54 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberItNS4_15DataWithNullKeyI9PHHashMapItPc9HashCRC32ItEEEEEEEEEEDaRT_ Line | Count | Source | 291 | 50 | [&](auto& agg_method) { | 292 | 50 | auto& hash_table = *agg_method.hash_table; | 293 | 50 | using HashTableType = std::decay_t<decltype(hash_table)>; | 294 | | | 295 | 50 | agg_method.arena.clear(); | 296 | 50 | agg_method.inited_iterator = false; | 297 | | | 298 | 50 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 50 | if (mapped) { | 300 | 50 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 50 | mapped = nullptr; | 302 | 50 | } | 303 | 50 | }); | 304 | | | 305 | 50 | if (hash_table.has_null_key_data()) { | 306 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 307 | 0 | vectorized::AggregateDataPtr>()); | 308 | 0 | RETURN_IF_ERROR(st); | 309 | 0 | } | 310 | | | 311 | 50 | aggregate_data_container.reset(new AggregateDataContainer( | 312 | 50 | sizeof(typename HashTableType::key_type), | 313 | 50 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 314 | 50 | align_aggregate_states) * | 315 | 50 | align_aggregate_states)); | 316 | 50 | agg_method.hash_table.reset(new HashTableType()); | 317 | 50 | return Status::OK(); | 318 | 50 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc9HashCRC32IjEEEEEEEEEEDaRT_ Line | Count | Source | 291 | 316 | [&](auto& agg_method) { | 292 | 316 | auto& hash_table = *agg_method.hash_table; | 293 | 316 | using HashTableType = std::decay_t<decltype(hash_table)>; | 294 | | | 295 | 316 | agg_method.arena.clear(); | 296 | 316 | agg_method.inited_iterator = false; | 297 | | | 298 | 316 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 316 | if (mapped) { | 300 | 316 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 316 | mapped = nullptr; | 302 | 316 | } | 303 | 316 | }); | 304 | | | 305 | 316 | if (hash_table.has_null_key_data()) { | 306 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 307 | 0 | vectorized::AggregateDataPtr>()); | 308 | 0 | RETURN_IF_ERROR(st); | 309 | 0 | } | 310 | | | 311 | 316 | aggregate_data_container.reset(new AggregateDataContainer( | 312 | 316 | sizeof(typename HashTableType::key_type), | 313 | 316 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 314 | 316 | align_aggregate_states) * | 315 | 316 | align_aggregate_states)); | 316 | 316 | agg_method.hash_table.reset(new HashTableType()); | 317 | 316 | return Status::OK(); | 318 | 316 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc9HashCRC32ImEEEEEEEEEEDaRT_ Line | Count | Source | 291 | 266 | [&](auto& agg_method) { | 292 | 266 | auto& hash_table = *agg_method.hash_table; | 293 | 266 | using HashTableType = std::decay_t<decltype(hash_table)>; | 294 | | | 295 | 266 | agg_method.arena.clear(); | 296 | 266 | agg_method.inited_iterator = false; | 297 | | | 298 | 266 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 266 | if (mapped) { | 300 | 266 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 266 | mapped = nullptr; | 302 | 266 | } | 303 | 266 | }); | 304 | | | 305 | 266 | if (hash_table.has_null_key_data()) { | 306 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 307 | 0 | vectorized::AggregateDataPtr>()); | 308 | 0 | RETURN_IF_ERROR(st); | 309 | 0 | } | 310 | | | 311 | 266 | aggregate_data_container.reset(new AggregateDataContainer( | 312 | 266 | sizeof(typename HashTableType::key_type), | 313 | 266 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 314 | 266 | align_aggregate_states) * | 315 | 266 | align_aggregate_states)); | 316 | 266 | agg_method.hash_table.reset(new HashTableType()); | 317 | 266 | return Status::OK(); | 318 | 266 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIjNS4_15DataWithNullKeyI9PHHashMapIjPc14HashMixWrapperIj9HashCRC32IjEEEEEEEEEEEDaRT_ Line | Count | Source | 291 | 502 | [&](auto& agg_method) { | 292 | 502 | auto& hash_table = *agg_method.hash_table; | 293 | 502 | using HashTableType = std::decay_t<decltype(hash_table)>; | 294 | | | 295 | 502 | agg_method.arena.clear(); | 296 | 502 | agg_method.inited_iterator = false; | 297 | | | 298 | 502 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 502 | if (mapped) { | 300 | 502 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 502 | mapped = nullptr; | 302 | 502 | } | 303 | 502 | }); | 304 | | | 305 | 502 | if (hash_table.has_null_key_data()) { | 306 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 307 | 0 | vectorized::AggregateDataPtr>()); | 308 | 0 | RETURN_IF_ERROR(st); | 309 | 0 | } | 310 | | | 311 | 502 | aggregate_data_container.reset(new AggregateDataContainer( | 312 | 502 | sizeof(typename HashTableType::key_type), | 313 | 502 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 314 | 502 | align_aggregate_states) * | 315 | 502 | align_aggregate_states)); | 316 | 502 | agg_method.hash_table.reset(new HashTableType()); | 317 | 502 | return Status::OK(); | 318 | 502 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImPc14HashMixWrapperIm9HashCRC32ImEEEEEEEEEEEDaRT_ Line | Count | Source | 291 | 530 | [&](auto& agg_method) { | 292 | 530 | auto& hash_table = *agg_method.hash_table; | 293 | 530 | using HashTableType = std::decay_t<decltype(hash_table)>; | 294 | | | 295 | 530 | agg_method.arena.clear(); | 296 | 530 | agg_method.inited_iterator = false; | 297 | | | 298 | 530 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 530 | if (mapped) { | 300 | 530 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 530 | mapped = nullptr; | 302 | 530 | } | 303 | 530 | }); | 304 | | | 305 | 530 | if (hash_table.has_null_key_data()) { | 306 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 307 | 0 | vectorized::AggregateDataPtr>()); | 308 | 0 | RETURN_IF_ERROR(st); | 309 | 0 | } | 310 | | | 311 | 530 | aggregate_data_container.reset(new AggregateDataContainer( | 312 | 530 | sizeof(typename HashTableType::key_type), | 313 | 530 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 314 | 530 | align_aggregate_states) * | 315 | 530 | align_aggregate_states)); | 316 | 530 | agg_method.hash_table.reset(new HashTableType()); | 317 | 530 | return Status::OK(); | 318 | 530 | }}, |
dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_Pc9HashCRC32IS9_EEEEEEEEEEDaRT_ Line | Count | Source | 291 | 38 | [&](auto& agg_method) { | 292 | 38 | auto& hash_table = *agg_method.hash_table; | 293 | 38 | using HashTableType = std::decay_t<decltype(hash_table)>; | 294 | | | 295 | 38 | agg_method.arena.clear(); | 296 | 38 | agg_method.inited_iterator = false; | 297 | | | 298 | 38 | hash_table.for_each_mapped([&](auto& mapped) { | 299 | 38 | if (mapped) { | 300 | 38 | static_cast<void>(_destroy_agg_status(mapped)); | 301 | 38 | mapped = nullptr; | 302 | 38 | } | 303 | 38 | }); | 304 | | | 305 | 38 | if (hash_table.has_null_key_data()) { | 306 | 0 | auto st = _destroy_agg_status(hash_table.template get_null_key_data< | 307 | 0 | vectorized::AggregateDataPtr>()); | 308 | 0 | RETURN_IF_ERROR(st); | 309 | 0 | } | 310 | | | 311 | 38 | aggregate_data_container.reset(new AggregateDataContainer( | 312 | 38 | sizeof(typename HashTableType::key_type), | 313 | 38 | ((total_size_of_aggregate_states + align_aggregate_states - 1) / | 314 | 38 | align_aggregate_states) * | 315 | 38 | align_aggregate_states)); | 316 | 38 | agg_method.hash_table.reset(new HashTableType()); | 317 | 38 | return Status::OK(); | 318 | 38 | }}, |
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_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEEPc9HashCRC32IS9_EEEEEEDaRT_ Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136EPc9HashCRC32IS7_EEEEEEDaRT_ Unexecuted instantiation: dependency.cpp:_ZZN5doris8pipeline14AggSharedState16reset_hash_tableEvENK3$_1clINS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEEPc9HashCRC32IS9_EEEEEEDaRT_ |
319 | 2.91k | agg_data->method_variant); |
320 | 2.91k | } |
321 | | |
322 | 355 | void PartitionedAggSharedState::init_spill_params(size_t spill_partition_count) { |
323 | 355 | partition_count = spill_partition_count; |
324 | 355 | max_partition_index = partition_count - 1; |
325 | | |
326 | 11.7k | for (int i = 0; i < partition_count; ++i) { |
327 | 11.3k | spill_partitions.emplace_back(std::make_shared<AggSpillPartition>()); |
328 | 11.3k | } |
329 | 355 | } |
330 | | |
331 | 344 | void PartitionedAggSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) { |
332 | 11.0k | for (auto& partition : spill_partitions) { |
333 | 11.0k | if (partition->spilling_stream_) { |
334 | 0 | partition->spilling_stream_->update_shared_profiles(source_profile); |
335 | 0 | } |
336 | 11.0k | for (auto& stream : partition->spill_streams_) { |
337 | 1.91k | if (stream) { |
338 | 1.91k | stream->update_shared_profiles(source_profile); |
339 | 1.91k | } |
340 | 1.91k | } |
341 | 11.0k | } |
342 | 344 | } |
343 | | |
344 | | Status AggSpillPartition::get_spill_stream(RuntimeState* state, int node_id, |
345 | | RuntimeProfile* profile, |
346 | 7.88k | vectorized::SpillStreamSPtr& spill_stream) { |
347 | 7.88k | if (spilling_stream_) { |
348 | 5.92k | spill_stream = spilling_stream_; |
349 | 5.92k | return Status::OK(); |
350 | 5.92k | } |
351 | 1.95k | RETURN_IF_ERROR(ExecEnv::GetInstance()->spill_stream_mgr()->register_spill_stream( |
352 | 1.95k | state, spilling_stream_, print_id(state->query_id()), "agg", node_id, |
353 | 1.95k | std::numeric_limits<int32_t>::max(), std::numeric_limits<size_t>::max(), profile)); |
354 | 1.95k | spill_streams_.emplace_back(spilling_stream_); |
355 | 1.95k | spill_stream = spilling_stream_; |
356 | 1.95k | return Status::OK(); |
357 | 1.95k | } |
358 | 8.17k | void AggSpillPartition::close() { |
359 | 8.17k | if (spilling_stream_) { |
360 | 1 | spilling_stream_.reset(); |
361 | 1 | } |
362 | 8.17k | for (auto& stream : spill_streams_) { |
363 | 5 | (void)ExecEnv::GetInstance()->spill_stream_mgr()->delete_spill_stream(stream); |
364 | 5 | } |
365 | 8.17k | spill_streams_.clear(); |
366 | 8.17k | } |
367 | | |
368 | 394 | void PartitionedAggSharedState::close() { |
369 | | // need to use CAS instead of only `if (!is_closed)` statement, |
370 | | // to avoid concurrent entry of close() both pass the if statement |
371 | 394 | bool false_close = false; |
372 | 394 | if (!is_closed.compare_exchange_strong(false_close, true)) { |
373 | 45 | return; |
374 | 45 | } |
375 | 394 | DCHECK(!false_close && is_closed); |
376 | 8.17k | for (auto partition : spill_partitions) { |
377 | 8.17k | partition->close(); |
378 | 8.17k | } |
379 | 349 | spill_partitions.clear(); |
380 | 349 | } |
381 | | |
382 | 17 | void SpillSortSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) { |
383 | 32 | for (auto& stream : sorted_streams) { |
384 | 32 | if (stream) { |
385 | 32 | stream->update_shared_profiles(source_profile); |
386 | 32 | } |
387 | 32 | } |
388 | 17 | } |
389 | | |
390 | 18 | void SpillSortSharedState::close() { |
391 | | // need to use CAS instead of only `if (!is_closed)` statement, |
392 | | // to avoid concurrent entry of close() both pass the if statement |
393 | 18 | bool false_close = false; |
394 | 18 | if (!is_closed.compare_exchange_strong(false_close, true)) { |
395 | 1 | return; |
396 | 1 | } |
397 | 18 | DCHECK(!false_close && is_closed); |
398 | 17 | for (auto& stream : sorted_streams) { |
399 | 1 | (void)ExecEnv::GetInstance()->spill_stream_mgr()->delete_spill_stream(stream); |
400 | 1 | } |
401 | 17 | sorted_streams.clear(); |
402 | 17 | } |
403 | | |
404 | | MultiCastSharedState::MultiCastSharedState(ObjectPool* pool, int cast_sender_count, int node_id) |
405 | 1.76k | : multi_cast_data_streamer(std::make_unique<pipeline::MultiCastDataStreamer>( |
406 | 1.76k | pool, cast_sender_count, node_id)) {} |
407 | | |
408 | 0 | void MultiCastSharedState::update_spill_stream_profiles(RuntimeProfile* source_profile) {} |
409 | | |
410 | 138k | int AggSharedState::get_slot_column_id(const vectorized::AggFnEvaluator* evaluator) { |
411 | 138k | auto ctxs = evaluator->input_exprs_ctxs(); |
412 | 18.4E | CHECK(ctxs.size() == 1 && ctxs[0]->root()->is_slot_ref()) |
413 | 18.4E | << "input_exprs_ctxs is invalid, input_exprs_ctx[0]=" |
414 | 18.4E | << ctxs[0]->root()->debug_string(); |
415 | 138k | return ((vectorized::VSlotRef*)ctxs[0]->root().get())->column_id(); |
416 | 138k | } |
417 | | |
418 | 3.99M | Status AggSharedState::_destroy_agg_status(vectorized::AggregateDataPtr data) { |
419 | 9.92M | for (int i = 0; i < aggregate_evaluators.size(); ++i) { |
420 | 5.92M | aggregate_evaluators[i]->function()->destroy(data + offsets_of_aggregate_states[i]); |
421 | 5.92M | } |
422 | 3.99M | return Status::OK(); |
423 | 3.99M | } |
424 | | |
425 | 177k | LocalExchangeSharedState::~LocalExchangeSharedState() = default; |
426 | | |
427 | 1.39k | Status SetSharedState::update_build_not_ignore_null(const vectorized::VExprContextSPtrs& ctxs) { |
428 | 1.39k | if (ctxs.size() > build_not_ignore_null.size()) { |
429 | 0 | return Status::InternalError("build_not_ignore_null not initialized"); |
430 | 0 | } |
431 | | |
432 | 3.53k | for (int i = 0; i < ctxs.size(); ++i) { |
433 | 2.14k | build_not_ignore_null[i] = build_not_ignore_null[i] || ctxs[i]->root()->is_nullable(); |
434 | 2.14k | } |
435 | | |
436 | 1.39k | return Status::OK(); |
437 | 1.39k | } |
438 | | |
439 | 1.43k | size_t SetSharedState::get_hash_table_size() const { |
440 | 1.43k | size_t hash_table_size = 0; |
441 | 1.43k | std::visit( |
442 | 1.43k | [&](auto&& arg) { |
443 | 1.43k | using HashTableCtxType = std::decay_t<decltype(arg)>; |
444 | 1.43k | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { |
445 | 1.43k | hash_table_size = arg.hash_table->size(); |
446 | 1.43k | } |
447 | 1.43k | }, Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRSt9monostateEEDaOT_ dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized16MethodSerializedI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS7_vEEEEEEDaOT_ Line | Count | Source | 442 | 639 | [&](auto&& arg) { | 443 | 639 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 444 | 639 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 445 | 639 | hash_table_size = arg.hash_table->size(); | 446 | 639 | } | 447 | 639 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized19MethodStringNoCacheI9PHHashMapINS_9StringRefENS_14RowRefWithFlagE11DefaultHashIS7_vEEEEEEDaOT_ Line | Count | Source | 442 | 273 | [&](auto&& arg) { | 443 | 273 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 444 | 273 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 445 | 273 | hash_table_size = arg.hash_table->size(); | 446 | 273 | } | 447 | 273 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIhNS4_15DataWithNullKeyI9PHHashMapIhNS_14RowRefWithFlagE9HashCRC32IhEEEEEEEEEEDaOT_ Line | Count | Source | 442 | 54 | [&](auto&& arg) { | 443 | 54 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 444 | 54 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 445 | 54 | hash_table_size = arg.hash_table->size(); | 446 | 54 | } | 447 | 54 | }, |
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 | 442 | 240 | [&](auto&& arg) { | 443 | 240 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 444 | 240 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 445 | 240 | hash_table_size = arg.hash_table->size(); | 446 | 240 | } | 447 | 240 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberImNS4_15DataWithNullKeyI9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEEEEEDaOT_ Line | Count | Source | 442 | 34 | [&](auto&& arg) { | 443 | 34 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 444 | 34 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 445 | 34 | hash_table_size = arg.hash_table->size(); | 446 | 34 | } | 447 | 34 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm128EjEENS4_15DataWithNullKeyI9PHHashMapIS9_NS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEEEEEDaOT_ Line | Count | Source | 442 | 32 | [&](auto&& arg) { | 443 | 32 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 444 | 32 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 445 | 32 | hash_table_size = arg.hash_table->size(); | 446 | 32 | } | 447 | 32 | }, |
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized26MethodSingleNullableColumnINS4_15MethodOneNumberIN4wide7integerILm256EjEENS4_15DataWithNullKeyI9PHHashMapIS9_NS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEEEEEDaOT_ Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIh9PHHashMapIhNS_14RowRefWithFlagE9HashCRC32IhEEEEEEDaOT_ Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIt9PHHashMapItNS_14RowRefWithFlagE9HashCRC32ItEEEEEEDaOT_ dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIj9PHHashMapIjNS_14RowRefWithFlagE9HashCRC32IjEEEEEEDaOT_ Line | Count | Source | 442 | 24 | [&](auto&& arg) { | 443 | 24 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 444 | 24 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 445 | 24 | hash_table_size = arg.hash_table->size(); | 446 | 24 | } | 447 | 24 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIm9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEDaOT_ Line | Count | Source | 442 | 8 | [&](auto&& arg) { | 443 | 8 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 444 | 8 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 445 | 8 | hash_table_size = arg.hash_table->size(); | 446 | 8 | } | 447 | 8 | }, |
Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIN4wide7integerILm128EjEE9PHHashMapIS8_NS_14RowRefWithFlagE9HashCRC32IS8_EEEEEEDaOT_ Unexecuted instantiation: dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodOneNumberIN4wide7integerILm256EjEE9PHHashMapIS8_NS_14RowRefWithFlagE9HashCRC32IS8_EEEEEEDaOT_ dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapImNS_14RowRefWithFlagE9HashCRC32ImEEEEEEDaOT_ Line | Count | Source | 442 | 12 | [&](auto&& arg) { | 443 | 12 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 444 | 12 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 445 | 12 | hash_table_size = arg.hash_table->size(); | 446 | 12 | } | 447 | 12 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_6UInt72ENS_14RowRefWithFlagE9HashCRC32IS7_EEEEEEDaOT_ Line | Count | Source | 442 | 64 | [&](auto&& arg) { | 443 | 64 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 444 | 64 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 445 | 64 | hash_table_size = arg.hash_table->size(); | 446 | 64 | } | 447 | 64 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm128EjEENS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEDaOT_ Line | Count | Source | 442 | 34 | [&](auto&& arg) { | 443 | 34 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 444 | 34 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 445 | 34 | hash_table_size = arg.hash_table->size(); | 446 | 34 | } | 447 | 34 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapIN4wide7integerILm256EjEENS_14RowRefWithFlagE9HashCRC32IS9_EEEEEEDaOT_ Line | Count | Source | 442 | 2 | [&](auto&& arg) { | 443 | 2 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 444 | 2 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 445 | 2 | hash_table_size = arg.hash_table->size(); | 446 | 2 | } | 447 | 2 | }, |
dependency.cpp:_ZZNK5doris8pipeline14SetSharedState19get_hash_table_sizeEvENK3$_0clIRNS_10vectorized15MethodKeysFixedI9PHHashMapINS4_7UInt136ENS_14RowRefWithFlagE9HashCRC32IS7_EEEEEEDaOT_ Line | Count | Source | 442 | 17 | [&](auto&& arg) { | 443 | 17 | using HashTableCtxType = std::decay_t<decltype(arg)>; | 444 | 17 | if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) { | 445 | 17 | hash_table_size = arg.hash_table->size(); | 446 | 17 | } | 447 | 17 | }, |
|
448 | 1.43k | hash_table_variants->method_variant); |
449 | 1.43k | return hash_table_size; |
450 | 1.43k | } |
451 | | |
452 | 669 | Status SetSharedState::hash_table_init() { |
453 | 669 | std::vector<vectorized::DataTypePtr> data_types; |
454 | 1.73k | for (size_t i = 0; i != child_exprs_lists[0].size(); ++i) { |
455 | 1.06k | auto& ctx = child_exprs_lists[0][i]; |
456 | 1.06k | auto data_type = ctx->root()->data_type(); |
457 | 1.06k | if (build_not_ignore_null[i]) { |
458 | 847 | data_type = vectorized::make_nullable(data_type); |
459 | 847 | } |
460 | 1.06k | data_types.emplace_back(std::move(data_type)); |
461 | 1.06k | } |
462 | 669 | return init_hash_method<SetDataVariants>(hash_table_variants.get(), data_types, true); |
463 | 669 | } |
464 | | |
465 | | void AggSharedState::refresh_top_limit(size_t row_id, |
466 | 29 | const vectorized::ColumnRawPtrs& key_columns) { |
467 | 112 | for (int j = 0; j < key_columns.size(); ++j) { |
468 | 83 | limit_columns[j]->insert_from(*key_columns[j], row_id); |
469 | 83 | } |
470 | 29 | limit_heap.emplace(limit_columns[0]->size() - 1, limit_columns, order_directions, |
471 | 29 | null_directions); |
472 | | |
473 | 29 | limit_heap.pop(); |
474 | 29 | limit_columns_min = limit_heap.top()._row_id; |
475 | 29 | } |
476 | | |
477 | | } // namespace doris::pipeline |