be/src/exec/operator/operator.h
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 | | #pragma once |
19 | | |
20 | | #include <fmt/format.h> |
21 | | #include <glog/logging.h> |
22 | | |
23 | | #include <atomic> |
24 | | #include <cstdint> |
25 | | #include <functional> |
26 | | #include <memory> |
27 | | #include <string> |
28 | | #include <utility> |
29 | | #include <vector> |
30 | | |
31 | | #include "common/be_mock_util.h" |
32 | | #include "common/exception.h" |
33 | | #include "common/logging.h" |
34 | | #include "common/status.h" |
35 | | #include "core/block/block.h" |
36 | | #include "exec/exchange/local_exchanger.h" |
37 | | #include "exec/exchange/vdata_stream_recvr.h" |
38 | | #include "exec/operator/operator.h" |
39 | | #include "exec/operator/spill_utils.h" |
40 | | #include "exec/pipeline/dependency.h" |
41 | | #include "runtime/memory/mem_tracker.h" |
42 | | #include "runtime/query_context.h" |
43 | | #include "runtime/runtime_profile.h" |
44 | | #include "runtime/runtime_state.h" |
45 | | #include "runtime/thread_context.h" |
46 | | |
47 | | namespace doris { |
48 | | #include "common/compile_check_begin.h" |
49 | | class RowDescriptor; |
50 | | class RuntimeState; |
51 | | class TDataSink; |
52 | | class AsyncResultWriter; |
53 | | class ScoreRuntime; |
54 | | class AnnTopNRuntime; |
55 | | } // namespace doris |
56 | | |
57 | | namespace doris { |
58 | | |
59 | | class OperatorBase; |
60 | | class OperatorXBase; |
61 | | class DataSinkOperatorXBase; |
62 | | |
63 | | using OperatorPtr = std::shared_ptr<OperatorXBase>; |
64 | | using Operators = std::vector<OperatorPtr>; |
65 | | |
66 | | using DataSinkOperatorPtr = std::shared_ptr<DataSinkOperatorXBase>; |
67 | | |
68 | | // This suffix will be added back to the name of sink operator |
69 | | // when we creating runtime profile. |
70 | | const std::string exchange_sink_name_suffix = "(dest_id={})"; |
71 | | |
72 | | const std::string operator_name_suffix = "(id={})"; |
73 | | |
74 | | // This struct is used only for initializing local state. |
75 | | struct LocalStateInfo { |
76 | | RuntimeProfile* parent_profile = nullptr; |
77 | | const std::vector<TScanRangeParams>& scan_ranges; |
78 | | BasicSharedState* shared_state; |
79 | | const std::map<int, std::pair<std::shared_ptr<BasicSharedState>, |
80 | | std::vector<std::shared_ptr<Dependency>>>>& shared_state_map; |
81 | | const int task_idx; |
82 | | }; |
83 | | |
84 | | // This struct is used only for initializing local sink state. |
85 | | struct LocalSinkStateInfo { |
86 | | const int task_idx; |
87 | | RuntimeProfile* parent_profile = nullptr; |
88 | | const int sender_id; |
89 | | BasicSharedState* shared_state; |
90 | | const std::map<int, std::pair<std::shared_ptr<BasicSharedState>, |
91 | | std::vector<std::shared_ptr<Dependency>>>>& shared_state_map; |
92 | | const TDataSink& tsink; |
93 | | }; |
94 | | |
95 | | class OperatorBase { |
96 | | public: |
97 | 216k | explicit OperatorBase() : _child(nullptr), _is_closed(false) {} |
98 | | explicit OperatorBase(bool is_serial_operator) |
99 | 144k | : _child(nullptr), _is_closed(false), _is_serial_operator(is_serial_operator) {} |
100 | 361k | virtual ~OperatorBase() = default; |
101 | | |
102 | 0 | virtual bool is_sink() const { return false; } |
103 | | |
104 | 65 | virtual bool is_source() const { return false; } |
105 | | |
106 | | [[nodiscard]] virtual const RowDescriptor& row_desc() const; |
107 | | |
108 | 0 | [[nodiscard]] virtual Status init(const TDataSink& tsink) { return Status::OK(); } |
109 | | |
110 | | [[nodiscard]] virtual std::string get_name() const = 0; |
111 | | [[nodiscard]] virtual Status prepare(RuntimeState* state) = 0; |
112 | | [[nodiscard]] virtual Status terminate(RuntimeState* state) = 0; |
113 | | [[nodiscard]] virtual Status close(RuntimeState* state); |
114 | | [[nodiscard]] virtual int node_id() const = 0; |
115 | 18 | [[nodiscard]] virtual int parallelism(RuntimeState* state) const { |
116 | 18 | return _is_serial_operator ? 1 : state->query_parallel_instance_num(); |
117 | 18 | } |
118 | | |
119 | 144k | [[nodiscard]] virtual Status set_child(OperatorPtr child) { |
120 | 144k | if (_child && child != nullptr) { |
121 | 0 | return Status::InternalError("Child is already set in node name={}", get_name()); |
122 | 0 | } |
123 | 144k | _child = child; |
124 | 144k | return Status::OK(); |
125 | 144k | } |
126 | | |
127 | | // Operators need to be executed serially. (e.g. finalized agg without key) |
128 | 144k | [[nodiscard]] virtual bool is_serial_operator() const { return _is_serial_operator; } |
129 | | |
130 | 1 | [[nodiscard]] bool is_closed() const { return _is_closed; } |
131 | | |
132 | 0 | virtual size_t revocable_mem_size(RuntimeState* state) const { return 0; } |
133 | | |
134 | | virtual Status revoke_memory(RuntimeState* state, |
135 | 0 | const std::shared_ptr<SpillContext>& spill_context) { |
136 | 0 | return Status::OK(); |
137 | 0 | } |
138 | | |
139 | 0 | virtual bool is_hash_join_probe() const { return false; } |
140 | | |
141 | | /** |
142 | | * Pipeline task is blockable means it will be blocked in the next run. So we should put the |
143 | | * pipeline task into the blocking task scheduler. |
144 | | */ |
145 | | virtual bool is_blockable(RuntimeState* state) const = 0; |
146 | 0 | virtual void set_low_memory_mode(RuntimeState* state) {} |
147 | | |
148 | 48.0k | OperatorPtr child() { return _child; } |
149 | 0 | virtual Status reset(RuntimeState* state) { |
150 | 0 | return Status::InternalError("Reset is not implemented in operator: {}", get_name()); |
151 | 0 | } |
152 | | |
153 | | /* -------------- Interfaces to determine the input data properties -------------- */ |
154 | | /** |
155 | | * Return True if this operator relies on the bucket distribution (e.g. COLOCATE join, 1-phase AGG). |
156 | | * Data input to this kind of operators must have the same distribution with the table buckets. |
157 | | * It is also means `required_data_distribution` should be `BUCKET_HASH_SHUFFLE`. |
158 | | * @return |
159 | | */ |
160 | 342 | [[nodiscard]] virtual bool is_colocated_operator() const { return false; } |
161 | | /** |
162 | | * Return True if this operator relies on the bucket distribution or specific hash data distribution (e.g. SHUFFLED HASH join). |
163 | | * Data input to this kind of operators must be HASH distributed according to some rules. |
164 | | * All colocated operators are also shuffled operators. |
165 | | * It is also means `required_data_distribution` should be `BUCKET_HASH_SHUFFLE` or `HASH_SHUFFLE`. |
166 | | * @return |
167 | | */ |
168 | 342 | [[nodiscard]] virtual bool is_shuffled_operator() const { return false; } |
169 | | /** |
170 | | * For multiple children's operators, return true if this is a shuffled operator or this is followed by a shuffled operator (HASH JOIN and SET OPERATION). |
171 | | * |
172 | | * For single child's operators, return true if this operator is followed by a shuffled operator. |
173 | | * For example, in the plan fragment: |
174 | | * `UNION` -> `SHUFFLED HASH JOIN` |
175 | | * The `SHUFFLED HASH JOIN` is a shuffled operator so the UNION operator is followed by a shuffled operator. |
176 | | */ |
177 | 438 | [[nodiscard]] virtual bool followed_by_shuffled_operator() const { |
178 | 438 | return _followed_by_shuffled_operator; |
179 | 438 | } |
180 | | /** |
181 | | * Update the operator properties according to the plan node. |
182 | | * This is called before `prepare`. |
183 | | */ |
184 | | virtual void update_operator(const TPlanNode& tnode, bool followed_by_shuffled_operator, |
185 | 0 | bool require_bucket_distribution) { |
186 | 0 | _followed_by_shuffled_operator = followed_by_shuffled_operator; |
187 | 0 | _require_bucket_distribution = require_bucket_distribution; |
188 | 0 | } |
189 | | /** |
190 | | * Return the required data distribution of this operator. |
191 | | */ |
192 | | [[nodiscard]] virtual DataDistribution required_data_distribution( |
193 | | RuntimeState* /*state*/) const; |
194 | | |
195 | | protected: |
196 | | OperatorPtr _child = nullptr; |
197 | | |
198 | | bool _is_closed; |
199 | | bool _followed_by_shuffled_operator = false; |
200 | | bool _require_bucket_distribution = false; |
201 | | bool _is_serial_operator = false; |
202 | | }; |
203 | | |
204 | | class PipelineXLocalStateBase { |
205 | | public: |
206 | | PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent); |
207 | 24.4k | virtual ~PipelineXLocalStateBase() = default; |
208 | | |
209 | | template <class TARGET> |
210 | 1.79M | TARGET& cast() { |
211 | 1.79M | DCHECK(dynamic_cast<TARGET*>(this)) |
212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() |
213 | 0 | << " and expect type is" << typeid(TARGET).name(); |
214 | 1.79M | return reinterpret_cast<TARGET&>(*this); |
215 | 1.79M | } _ZN5doris23PipelineXLocalStateBase4castINS_23DummyOperatorLocalStateEEERT_v Line | Count | Source | 210 | 1.79M | TARGET& cast() { | 211 | 1.79M | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 1.79M | return reinterpret_cast<TARGET&>(*this); | 215 | 1.79M | } |
_ZN5doris23PipelineXLocalStateBase4castINS_13AggLocalStateEEERT_v Line | Count | Source | 210 | 50 | TARGET& cast() { | 211 | 50 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 50 | return reinterpret_cast<TARGET&>(*this); | 215 | 50 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_18AnalyticLocalStateEEERT_v Line | Count | Source | 210 | 46 | TARGET& cast() { | 211 | 46 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 46 | return reinterpret_cast<TARGET&>(*this); | 215 | 46 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_23AssertNumRowsLocalStateEEERT_v Line | Count | Source | 210 | 4 | TARGET& cast() { | 211 | 4 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 4 | return reinterpret_cast<TARGET&>(*this); | 215 | 4 | } |
Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_14MockLocalStateEEERT_v _ZN5doris23PipelineXLocalStateBase4castINS_17DataGenLocalStateEEERT_v Line | Count | Source | 210 | 3 | TARGET& cast() { | 211 | 3 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 3 | return reinterpret_cast<TARGET&>(*this); | 215 | 3 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_30DistinctStreamingAggLocalStateEEERT_v Line | Count | Source | 210 | 24 | TARGET& cast() { | 211 | 24 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 24 | return reinterpret_cast<TARGET&>(*this); | 215 | 24 | } |
Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_18EmptySetLocalStateEEERT_v _ZN5doris23PipelineXLocalStateBase4castINS_18ExchangeLocalStateEEERT_v Line | Count | Source | 210 | 48 | TARGET& cast() { | 211 | 48 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 48 | return reinterpret_cast<TARGET&>(*this); | 215 | 48 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_23HashJoinProbeLocalStateEEERT_v Line | Count | Source | 210 | 331 | TARGET& cast() { | 211 | 331 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 331 | return reinterpret_cast<TARGET&>(*this); | 215 | 331 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_24LocalMergeSortLocalStateEEERT_v Line | Count | Source | 210 | 6 | TARGET& cast() { | 211 | 6 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 6 | return reinterpret_cast<TARGET&>(*this); | 215 | 6 | } |
Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_25MaterializationLocalStateEEERT_v _ZN5doris23PipelineXLocalStateBase4castINS_29PartitionSortSourceLocalStateEEERT_v Line | Count | Source | 210 | 402 | TARGET& cast() { | 211 | 402 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 402 | return reinterpret_cast<TARGET&>(*this); | 215 | 402 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_24PartitionedAggLocalStateEEERT_v Line | Count | Source | 210 | 15 | TARGET& cast() { | 211 | 15 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 15 | return reinterpret_cast<TARGET&>(*this); | 215 | 15 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_34PartitionedHashJoinProbeLocalStateEEERT_v Line | Count | Source | 210 | 46 | TARGET& cast() { | 211 | 46 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 46 | return reinterpret_cast<TARGET&>(*this); | 215 | 46 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_21CacheSourceLocalStateEEERT_v Line | Count | Source | 210 | 6 | TARGET& cast() { | 211 | 6 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 6 | return reinterpret_cast<TARGET&>(*this); | 215 | 6 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_16RepeatLocalStateEEERT_v Line | Count | Source | 210 | 21 | TARGET& cast() { | 211 | 21 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 21 | return reinterpret_cast<TARGET&>(*this); | 215 | 21 | } |
Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_18MockScanLocalStateEEERT_v _ZN5doris23PipelineXLocalStateBase4castINS_19SetSourceLocalStateILb1EEEEERT_v Line | Count | Source | 210 | 6 | TARGET& cast() { | 211 | 6 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 6 | return reinterpret_cast<TARGET&>(*this); | 215 | 6 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_19SetSourceLocalStateILb0EEEEERT_v Line | Count | Source | 210 | 5 | TARGET& cast() { | 211 | 5 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 5 | return reinterpret_cast<TARGET&>(*this); | 215 | 5 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_14SortLocalStateEEERT_v Line | Count | Source | 210 | 33 | TARGET& cast() { | 211 | 33 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 33 | return reinterpret_cast<TARGET&>(*this); | 215 | 33 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_19SpillSortLocalStateEEERT_v Line | Count | Source | 210 | 15 | TARGET& cast() { | 211 | 15 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 15 | return reinterpret_cast<TARGET&>(*this); | 215 | 15 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_22StreamingAggLocalStateEEERT_v Line | Count | Source | 210 | 21 | TARGET& cast() { | 211 | 21 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 21 | return reinterpret_cast<TARGET&>(*this); | 215 | 21 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_23TableFunctionLocalStateEEERT_v Line | Count | Source | 210 | 16 | TARGET& cast() { | 211 | 16 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 16 | return reinterpret_cast<TARGET&>(*this); | 215 | 16 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_21UnionSourceLocalStateEEERT_v Line | Count | Source | 210 | 41 | TARGET& cast() { | 211 | 41 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 41 | return reinterpret_cast<TARGET&>(*this); | 215 | 41 | } |
Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_29LocalExchangeSourceLocalStateEEERT_v Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_18OlapScanLocalStateEEERT_v _ZN5doris23PipelineXLocalStateBase4castINS_18FileScanLocalStateEEERT_v Line | Count | Source | 210 | 1 | TARGET& cast() { | 211 | 1 | DCHECK(dynamic_cast<TARGET*>(this)) | 212 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 213 | 0 | << " and expect type is" << typeid(TARGET).name(); | 214 | 1 | return reinterpret_cast<TARGET&>(*this); | 215 | 1 | } |
Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_29NestedLoopJoinProbeLocalStateEEERT_v Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_35MultiCastDataStreamSourceLocalStateEEERT_v Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_21GroupCommitLocalStateEEERT_v Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_18JDBCScanLocalStateEEERT_v Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_16EsScanLocalStateEEERT_v Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_20SchemaScanLocalStateEEERT_v Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_18MetaScanLocalStateEEERT_v Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_22RecCTESourceLocalStateEEERT_v Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_20RecCTEScanLocalStateEEERT_v Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_16SelectLocalStateEEERT_v |
216 | | template <class TARGET> |
217 | | const TARGET& cast() const { |
218 | | DCHECK(dynamic_cast<TARGET*>(this)) |
219 | | << " Mismatch type! Current type is " << typeid(*this).name() |
220 | | << " and expect type is" << typeid(TARGET).name(); |
221 | | return reinterpret_cast<const TARGET&>(*this); |
222 | | } |
223 | | |
224 | | // Do initialization. This step should be executed only once and in bthread, so we can do some |
225 | | // lightweight or non-idempotent operations (e.g. init profile, clone expr ctx from operatorX) |
226 | | virtual Status init(RuntimeState* state, LocalStateInfo& info) = 0; |
227 | | // Make sure all resources are ready before execution. For example, remote tablets should be |
228 | | // loaded to local storage. |
229 | | // This is called by execution pthread and different from `Operator::prepare` which is called |
230 | | // by bthread. |
231 | | virtual Status prepare(RuntimeState* state) = 0; |
232 | | // Do initialization. This step can be executed multiple times, so we should make sure it is |
233 | | // idempotent (e.g. wait for runtime filters). |
234 | | virtual Status open(RuntimeState* state) = 0; |
235 | | virtual Status close(RuntimeState* state) = 0; |
236 | | virtual Status terminate(RuntimeState* state) = 0; |
237 | | |
238 | | // If use projection, we should clear `_origin_block`. |
239 | | void clear_origin_block(); |
240 | | |
241 | | void reached_limit(Block* block, bool* eos); |
242 | 95 | RuntimeProfile* operator_profile() { return _operator_profile.get(); } |
243 | 57 | RuntimeProfile* common_profile() { return _common_profile.get(); } |
244 | 291k | RuntimeProfile* custom_profile() { return _custom_profile.get(); } |
245 | | |
246 | 97.0k | RuntimeProfile::Counter* exec_time_counter() { return _exec_timer; } |
247 | 0 | RuntimeProfile::Counter* memory_used_counter() { return _memory_used_counter; } |
248 | 0 | OperatorXBase* parent() { return _parent; } |
249 | 99 | RuntimeState* state() { return _state; } |
250 | 16 | VExprContextSPtrs& conjuncts() { return _conjuncts; } |
251 | 0 | VExprContextSPtrs& projections() { return _projections; } |
252 | 11 | [[nodiscard]] int64_t num_rows_returned() const { return _num_rows_returned; } |
253 | 19 | void add_num_rows_returned(int64_t delta) { _num_rows_returned += delta; } |
254 | 2 | void set_num_rows_returned(int64_t value) { _num_rows_returned = value; } |
255 | | |
256 | | [[nodiscard]] virtual std::string debug_string(int indentation_level = 0) const = 0; |
257 | | [[nodiscard]] virtual bool is_blockable() const; |
258 | | |
259 | 0 | virtual std::vector<Dependency*> dependencies() const { return {nullptr}; } |
260 | | |
261 | | // override in Scan |
262 | 7 | virtual Dependency* finishdependency() { return nullptr; } |
263 | | // override in Scan MultiCastSink |
264 | 5 | virtual std::vector<Dependency*> execution_dependencies() { return {}; } |
265 | | |
266 | | Status filter_block(const VExprContextSPtrs& expr_contexts, Block* block); |
267 | | |
268 | 897k | int64_t& estimate_memory_usage() { return _estimate_memory_usage; } |
269 | | |
270 | 897k | void reset_estimate_memory_usage() { _estimate_memory_usage = 0; } |
271 | | |
272 | 26 | bool low_memory_mode() { |
273 | 26 | #ifdef BE_TEST |
274 | 26 | return false; |
275 | | #else |
276 | | return _state->low_memory_mode(); |
277 | | #endif |
278 | 26 | } |
279 | | |
280 | | protected: |
281 | | friend class OperatorXBase; |
282 | | template <typename LocalStateType> |
283 | | friend class ScanOperatorX; |
284 | | |
285 | | ObjectPool* _pool = nullptr; |
286 | | int64_t _num_rows_returned {0}; |
287 | | int64_t _estimate_memory_usage {0}; |
288 | | |
289 | | /* |
290 | | Each operator has its profile like this: |
291 | | XXXX_OPERATOR: |
292 | | CommonCounters: |
293 | | ... |
294 | | CustomCounters: |
295 | | ... |
296 | | */ |
297 | | // Profile of this operator. |
298 | | // Should not modify this profile usually. |
299 | | std::unique_ptr<RuntimeProfile> _operator_profile; |
300 | | // CommonCounters of this operator. |
301 | | // CommonCounters are counters that will be used by all operators. |
302 | | std::unique_ptr<RuntimeProfile> _common_profile; |
303 | | // CustomCounters of this operator. |
304 | | // CustomCounters are counters that will be used by this operator only. |
305 | | std::unique_ptr<RuntimeProfile> _custom_profile; |
306 | | |
307 | | RuntimeProfile::Counter* _rows_returned_counter = nullptr; |
308 | | RuntimeProfile::Counter* _blocks_returned_counter = nullptr; |
309 | | RuntimeProfile::Counter* _wait_for_dependency_timer = nullptr; |
310 | | // Account for current memory and peak memory used by this node |
311 | | RuntimeProfile::HighWaterMarkCounter* _memory_used_counter = nullptr; |
312 | | RuntimeProfile::Counter* _projection_timer = nullptr; |
313 | | RuntimeProfile::Counter* _exec_timer = nullptr; |
314 | | RuntimeProfile::Counter* _init_timer = nullptr; |
315 | | RuntimeProfile::Counter* _open_timer = nullptr; |
316 | | RuntimeProfile::Counter* _close_timer = nullptr; |
317 | | |
318 | | OperatorXBase* _parent = nullptr; |
319 | | RuntimeState* _state = nullptr; |
320 | | VExprContextSPtrs _conjuncts; |
321 | | VExprContextSPtrs _projections; |
322 | | std::shared_ptr<ScoreRuntime> _score_runtime; |
323 | | std::shared_ptr<segment_v2::AnnTopNRuntime> _ann_topn_runtime; |
324 | | // Used in common subexpression elimination to compute intermediate results. |
325 | | std::vector<VExprContextSPtrs> _intermediate_projections; |
326 | | |
327 | | bool _closed = false; |
328 | | std::atomic<bool> _terminated = false; |
329 | | Block _origin_block; |
330 | | }; |
331 | | |
332 | | template <typename SharedStateArg = FakeSharedState> |
333 | | class PipelineXLocalState : public PipelineXLocalStateBase { |
334 | | public: |
335 | | using SharedStateType = SharedStateArg; |
336 | | PipelineXLocalState(RuntimeState* state, OperatorXBase* parent) |
337 | 24.4k | : PipelineXLocalStateBase(state, parent) {}_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 337 | 102 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 337 | 3 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 337 | 162 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 337 | 10 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 337 | 2 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 337 | 24 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 337 | 32 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 337 | 9 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 337 | 24.0k | : PipelineXLocalStateBase(state, parent) {} |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 337 | 24 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 337 | 17 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 337 | 5 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 337 | 5 | : PipelineXLocalStateBase(state, parent) {} |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE |
338 | 24.4k | ~PipelineXLocalState() override = default; _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEED2Ev Line | Count | Source | 338 | 9 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEED2Ev Line | Count | Source | 338 | 162 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEED2Ev Line | Count | Source | 338 | 17 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEED2Ev Line | Count | Source | 338 | 102 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEED2Ev Line | Count | Source | 338 | 5 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEED2Ev Line | Count | Source | 338 | 24.0k | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEED2Ev Line | Count | Source | 338 | 24 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEED2Ev Line | Count | Source | 338 | 3 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEED2Ev Line | Count | Source | 338 | 10 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEED2Ev Line | Count | Source | 338 | 2 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEED2Ev Line | Count | Source | 338 | 24 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEED2Ev Line | Count | Source | 338 | 32 | ~PipelineXLocalState() override = default; |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEED2Ev _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEED2Ev Line | Count | Source | 338 | 5 | ~PipelineXLocalState() override = default; |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEED2Ev Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEED2Ev Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEED2Ev |
339 | | |
340 | | Status init(RuntimeState* state, LocalStateInfo& info) override; |
341 | 78 | Status prepare(RuntimeState* state) override { return Status::OK(); }_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 341 | 66 | Status prepare(RuntimeState* state) override { return Status::OK(); } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE7prepareEPNS_12RuntimeStateE _ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 341 | 12 | Status prepare(RuntimeState* state) override { return Status::OK(); } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE7prepareEPNS_12RuntimeStateE |
342 | | Status open(RuntimeState* state) override; |
343 | | |
344 | | virtual std::string name_suffix() const; |
345 | | |
346 | | Status close(RuntimeState* state) override; |
347 | | Status terminate(RuntimeState* state) override; |
348 | | |
349 | | [[nodiscard]] std::string debug_string(int indentation_level = 0) const override; |
350 | | |
351 | 26.5M | std::vector<Dependency*> dependencies() const override { |
352 | 26.5M | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; |
353 | 26.5M | } Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12dependenciesEv _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12dependenciesEv Line | Count | Source | 351 | 6 | std::vector<Dependency*> dependencies() const override { | 352 | 6 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 353 | 6 | } |
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12dependenciesEv Line | Count | Source | 351 | 26.5M | std::vector<Dependency*> dependencies() const override { | 352 | 26.5M | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 353 | 26.5M | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12dependenciesEv _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12dependenciesEv Line | Count | Source | 351 | 2 | std::vector<Dependency*> dependencies() const override { | 352 | 2 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 353 | 2 | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12dependenciesEv _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12dependenciesEv Line | Count | Source | 351 | 11 | std::vector<Dependency*> dependencies() const override { | 352 | 11 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 353 | 11 | } |
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12dependenciesEv Line | Count | Source | 351 | 7 | std::vector<Dependency*> dependencies() const override { | 352 | 7 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 353 | 7 | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12dependenciesEv |
354 | | |
355 | 24.2k | virtual bool must_set_shared_state() const { |
356 | 24.2k | return !std::is_same_v<SharedStateArg, FakeSharedState>; |
357 | 24.2k | } _ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE21must_set_shared_stateEv Line | Count | Source | 355 | 44 | virtual bool must_set_shared_state() const { | 356 | 44 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 357 | 44 | } |
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE21must_set_shared_stateEv Line | Count | Source | 355 | 32 | virtual bool must_set_shared_state() const { | 356 | 32 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 357 | 32 | } |
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE21must_set_shared_stateEv Line | Count | Source | 355 | 9 | virtual bool must_set_shared_state() const { | 356 | 9 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 357 | 9 | } |
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE21must_set_shared_stateEv Line | Count | Source | 355 | 17 | virtual bool must_set_shared_state() const { | 356 | 17 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 357 | 17 | } |
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE21must_set_shared_stateEv Line | Count | Source | 355 | 102 | virtual bool must_set_shared_state() const { | 356 | 102 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 357 | 102 | } |
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE21must_set_shared_stateEv Line | Count | Source | 355 | 5 | virtual bool must_set_shared_state() const { | 356 | 5 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 357 | 5 | } |
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE21must_set_shared_stateEv Line | Count | Source | 355 | 24.0k | virtual bool must_set_shared_state() const { | 356 | 24.0k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 357 | 24.0k | } |
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE21must_set_shared_stateEv Line | Count | Source | 355 | 1 | virtual bool must_set_shared_state() const { | 356 | 1 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 357 | 1 | } |
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE21must_set_shared_stateEv Line | Count | Source | 355 | 3 | virtual bool must_set_shared_state() const { | 356 | 3 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 357 | 3 | } |
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE21must_set_shared_stateEv Line | Count | Source | 355 | 10 | virtual bool must_set_shared_state() const { | 356 | 10 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 357 | 10 | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE21must_set_shared_stateEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE21must_set_shared_stateEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE21must_set_shared_stateEv _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE21must_set_shared_stateEv Line | Count | Source | 355 | 5 | virtual bool must_set_shared_state() const { | 356 | 5 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 357 | 5 | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE21must_set_shared_stateEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE21must_set_shared_stateEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE21must_set_shared_stateEv |
358 | | |
359 | | protected: |
360 | | Dependency* _dependency = nullptr; |
361 | | SharedStateArg* _shared_state = nullptr; |
362 | | }; |
363 | | |
364 | | template <typename SharedStateArg> |
365 | | class PipelineXSpillLocalState : public PipelineXLocalState<SharedStateArg> { |
366 | | public: |
367 | | using Base = PipelineXLocalState<SharedStateArg>; |
368 | | PipelineXSpillLocalState(RuntimeState* state, OperatorXBase* parent) |
369 | 34 | : PipelineXLocalState<SharedStateArg>(state, parent) {}Unexecuted instantiation: _ZN5doris24PipelineXSpillLocalStateINS_20MultiCastSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE _ZN5doris24PipelineXSpillLocalStateINS_25PartitionedAggSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 369 | 5 | : PipelineXLocalState<SharedStateArg>(state, parent) {} |
_ZN5doris24PipelineXSpillLocalStateINS_30PartitionedHashJoinSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 369 | 24 | : PipelineXLocalState<SharedStateArg>(state, parent) {} |
_ZN5doris24PipelineXSpillLocalStateINS_20SpillSortSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 369 | 5 | : PipelineXLocalState<SharedStateArg>(state, parent) {} |
|
370 | 34 | ~PipelineXSpillLocalState() override = default; _ZN5doris24PipelineXSpillLocalStateINS_25PartitionedAggSharedStateEED2Ev Line | Count | Source | 370 | 5 | ~PipelineXSpillLocalState() override = default; |
_ZN5doris24PipelineXSpillLocalStateINS_30PartitionedHashJoinSharedStateEED2Ev Line | Count | Source | 370 | 24 | ~PipelineXSpillLocalState() override = default; |
_ZN5doris24PipelineXSpillLocalStateINS_20SpillSortSharedStateEED2Ev Line | Count | Source | 370 | 5 | ~PipelineXSpillLocalState() override = default; |
Unexecuted instantiation: _ZN5doris24PipelineXSpillLocalStateINS_20MultiCastSharedStateEED2Ev |
371 | | |
372 | 11 | Status init(RuntimeState* state, LocalStateInfo& info) override { |
373 | 11 | RETURN_IF_ERROR(PipelineXLocalState<SharedStateArg>::init(state, info)); |
374 | | |
375 | 11 | init_spill_read_counters(); |
376 | | |
377 | 11 | return Status::OK(); |
378 | 11 | } _ZN5doris24PipelineXSpillLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 372 | 5 | Status init(RuntimeState* state, LocalStateInfo& info) override { | 373 | 5 | RETURN_IF_ERROR(PipelineXLocalState<SharedStateArg>::init(state, info)); | 374 | | | 375 | 5 | init_spill_read_counters(); | 376 | | | 377 | 5 | return Status::OK(); | 378 | 5 | } |
_ZN5doris24PipelineXSpillLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 372 | 1 | Status init(RuntimeState* state, LocalStateInfo& info) override { | 373 | 1 | RETURN_IF_ERROR(PipelineXLocalState<SharedStateArg>::init(state, info)); | 374 | | | 375 | 1 | init_spill_read_counters(); | 376 | | | 377 | 1 | return Status::OK(); | 378 | 1 | } |
_ZN5doris24PipelineXSpillLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 372 | 5 | Status init(RuntimeState* state, LocalStateInfo& info) override { | 373 | 5 | RETURN_IF_ERROR(PipelineXLocalState<SharedStateArg>::init(state, info)); | 374 | | | 375 | 5 | init_spill_read_counters(); | 376 | | | 377 | 5 | return Status::OK(); | 378 | 5 | } |
Unexecuted instantiation: _ZN5doris24PipelineXSpillLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE |
379 | | |
380 | 29 | void init_spill_write_counters() { |
381 | 29 | _spill_write_timer = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteTime", 1); |
382 | | |
383 | 29 | _spill_write_wait_in_queue_task_count = ADD_COUNTER_WITH_LEVEL( |
384 | 29 | Base::custom_profile(), "SpillWriteTaskWaitInQueueCount", TUnit::UNIT, 1); |
385 | 29 | _spill_writing_task_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), |
386 | 29 | "SpillWriteTaskCount", TUnit::UNIT, 1); |
387 | 29 | _spill_write_wait_in_queue_timer = |
388 | 29 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteTaskWaitInQueueTime", 1); |
389 | | |
390 | 29 | _spill_write_file_timer = |
391 | 29 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteFileTime", 1); |
392 | | |
393 | 29 | _spill_write_serialize_block_timer = |
394 | 29 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteSerializeBlockTime", 1); |
395 | 29 | _spill_write_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), |
396 | 29 | "SpillWriteBlockCount", TUnit::UNIT, 1); |
397 | 29 | _spill_write_block_data_size = ADD_COUNTER_WITH_LEVEL( |
398 | 29 | Base::custom_profile(), "SpillWriteBlockBytes", TUnit::BYTES, 1); |
399 | 29 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( |
400 | 29 | Base::custom_profile(), "SpillWriteFileBytes", TUnit::BYTES, 1); |
401 | 29 | _spill_write_rows_count = |
402 | 29 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillWriteRows", TUnit::UNIT, 1); |
403 | 29 | _spill_file_total_count = ADD_COUNTER_WITH_LEVEL( |
404 | 29 | Base::custom_profile(), "SpillWriteFileTotalCount", TUnit::UNIT, 1); |
405 | 29 | } Unexecuted instantiation: _ZN5doris24PipelineXSpillLocalStateINS_25PartitionedAggSharedStateEE25init_spill_write_countersEv _ZN5doris24PipelineXSpillLocalStateINS_30PartitionedHashJoinSharedStateEE25init_spill_write_countersEv Line | Count | Source | 380 | 24 | void init_spill_write_counters() { | 381 | 24 | _spill_write_timer = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteTime", 1); | 382 | | | 383 | 24 | _spill_write_wait_in_queue_task_count = ADD_COUNTER_WITH_LEVEL( | 384 | 24 | Base::custom_profile(), "SpillWriteTaskWaitInQueueCount", TUnit::UNIT, 1); | 385 | 24 | _spill_writing_task_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 386 | 24 | "SpillWriteTaskCount", TUnit::UNIT, 1); | 387 | 24 | _spill_write_wait_in_queue_timer = | 388 | 24 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteTaskWaitInQueueTime", 1); | 389 | | | 390 | 24 | _spill_write_file_timer = | 391 | 24 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteFileTime", 1); | 392 | | | 393 | 24 | _spill_write_serialize_block_timer = | 394 | 24 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteSerializeBlockTime", 1); | 395 | 24 | _spill_write_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 396 | 24 | "SpillWriteBlockCount", TUnit::UNIT, 1); | 397 | 24 | _spill_write_block_data_size = ADD_COUNTER_WITH_LEVEL( | 398 | 24 | Base::custom_profile(), "SpillWriteBlockBytes", TUnit::BYTES, 1); | 399 | 24 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( | 400 | 24 | Base::custom_profile(), "SpillWriteFileBytes", TUnit::BYTES, 1); | 401 | 24 | _spill_write_rows_count = | 402 | 24 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillWriteRows", TUnit::UNIT, 1); | 403 | 24 | _spill_file_total_count = ADD_COUNTER_WITH_LEVEL( | 404 | 24 | Base::custom_profile(), "SpillWriteFileTotalCount", TUnit::UNIT, 1); | 405 | 24 | } |
_ZN5doris24PipelineXSpillLocalStateINS_20SpillSortSharedStateEE25init_spill_write_countersEv Line | Count | Source | 380 | 5 | void init_spill_write_counters() { | 381 | 5 | _spill_write_timer = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteTime", 1); | 382 | | | 383 | 5 | _spill_write_wait_in_queue_task_count = ADD_COUNTER_WITH_LEVEL( | 384 | 5 | Base::custom_profile(), "SpillWriteTaskWaitInQueueCount", TUnit::UNIT, 1); | 385 | 5 | _spill_writing_task_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 386 | 5 | "SpillWriteTaskCount", TUnit::UNIT, 1); | 387 | 5 | _spill_write_wait_in_queue_timer = | 388 | 5 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteTaskWaitInQueueTime", 1); | 389 | | | 390 | 5 | _spill_write_file_timer = | 391 | 5 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteFileTime", 1); | 392 | | | 393 | 5 | _spill_write_serialize_block_timer = | 394 | 5 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteSerializeBlockTime", 1); | 395 | 5 | _spill_write_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 396 | 5 | "SpillWriteBlockCount", TUnit::UNIT, 1); | 397 | 5 | _spill_write_block_data_size = ADD_COUNTER_WITH_LEVEL( | 398 | 5 | Base::custom_profile(), "SpillWriteBlockBytes", TUnit::BYTES, 1); | 399 | 5 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( | 400 | 5 | Base::custom_profile(), "SpillWriteFileBytes", TUnit::BYTES, 1); | 401 | 5 | _spill_write_rows_count = | 402 | 5 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillWriteRows", TUnit::UNIT, 1); | 403 | 5 | _spill_file_total_count = ADD_COUNTER_WITH_LEVEL( | 404 | 5 | Base::custom_profile(), "SpillWriteFileTotalCount", TUnit::UNIT, 1); | 405 | 5 | } |
|
406 | | |
407 | 34 | void init_spill_read_counters() { |
408 | 34 | _spill_total_timer = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillTotalTime", 1); |
409 | | |
410 | | // Spill read counters |
411 | 34 | _spill_recover_time = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillRecoverTime", 1); |
412 | | |
413 | 34 | _spill_read_wait_in_queue_task_count = ADD_COUNTER_WITH_LEVEL( |
414 | 34 | Base::custom_profile(), "SpillReadTaskWaitInQueueCount", TUnit::UNIT, 1); |
415 | 34 | _spill_reading_task_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), |
416 | 34 | "SpillReadTaskCount", TUnit::UNIT, 1); |
417 | 34 | _spill_read_wait_in_queue_timer = |
418 | 34 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadTaskWaitInQueueTime", 1); |
419 | | |
420 | 34 | _spill_read_file_time = |
421 | 34 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadFileTime", 1); |
422 | 34 | _spill_read_deserialize_block_timer = |
423 | 34 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadDeserializeBlockTime", 1); |
424 | | |
425 | 34 | _spill_read_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), |
426 | 34 | "SpillReadBlockCount", TUnit::UNIT, 1); |
427 | 34 | _spill_read_block_data_size = ADD_COUNTER_WITH_LEVEL( |
428 | 34 | Base::custom_profile(), "SpillReadBlockBytes", TUnit::BYTES, 1); |
429 | 34 | _spill_read_file_size = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillReadFileBytes", |
430 | 34 | TUnit::BYTES, 1); |
431 | 34 | _spill_read_rows_count = |
432 | 34 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillReadRows", TUnit::UNIT, 1); |
433 | 34 | _spill_read_file_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), |
434 | 34 | "SpillReadFileCount", TUnit::UNIT, 1); |
435 | | |
436 | 34 | _spill_file_current_size = ADD_COUNTER_WITH_LEVEL( |
437 | 34 | Base::custom_profile(), "SpillWriteFileCurrentBytes", TUnit::BYTES, 1); |
438 | 34 | _spill_file_current_count = ADD_COUNTER_WITH_LEVEL( |
439 | 34 | Base::custom_profile(), "SpillWriteFileCurrentCount", TUnit::UNIT, 1); |
440 | 34 | } _ZN5doris24PipelineXSpillLocalStateINS_25PartitionedAggSharedStateEE24init_spill_read_countersEv Line | Count | Source | 407 | 5 | void init_spill_read_counters() { | 408 | 5 | _spill_total_timer = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillTotalTime", 1); | 409 | | | 410 | | // Spill read counters | 411 | 5 | _spill_recover_time = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillRecoverTime", 1); | 412 | | | 413 | 5 | _spill_read_wait_in_queue_task_count = ADD_COUNTER_WITH_LEVEL( | 414 | 5 | Base::custom_profile(), "SpillReadTaskWaitInQueueCount", TUnit::UNIT, 1); | 415 | 5 | _spill_reading_task_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 416 | 5 | "SpillReadTaskCount", TUnit::UNIT, 1); | 417 | 5 | _spill_read_wait_in_queue_timer = | 418 | 5 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadTaskWaitInQueueTime", 1); | 419 | | | 420 | 5 | _spill_read_file_time = | 421 | 5 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadFileTime", 1); | 422 | 5 | _spill_read_deserialize_block_timer = | 423 | 5 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadDeserializeBlockTime", 1); | 424 | | | 425 | 5 | _spill_read_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 426 | 5 | "SpillReadBlockCount", TUnit::UNIT, 1); | 427 | 5 | _spill_read_block_data_size = ADD_COUNTER_WITH_LEVEL( | 428 | 5 | Base::custom_profile(), "SpillReadBlockBytes", TUnit::BYTES, 1); | 429 | 5 | _spill_read_file_size = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillReadFileBytes", | 430 | 5 | TUnit::BYTES, 1); | 431 | 5 | _spill_read_rows_count = | 432 | 5 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillReadRows", TUnit::UNIT, 1); | 433 | 5 | _spill_read_file_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 434 | 5 | "SpillReadFileCount", TUnit::UNIT, 1); | 435 | | | 436 | 5 | _spill_file_current_size = ADD_COUNTER_WITH_LEVEL( | 437 | 5 | Base::custom_profile(), "SpillWriteFileCurrentBytes", TUnit::BYTES, 1); | 438 | 5 | _spill_file_current_count = ADD_COUNTER_WITH_LEVEL( | 439 | 5 | Base::custom_profile(), "SpillWriteFileCurrentCount", TUnit::UNIT, 1); | 440 | 5 | } |
_ZN5doris24PipelineXSpillLocalStateINS_30PartitionedHashJoinSharedStateEE24init_spill_read_countersEv Line | Count | Source | 407 | 24 | void init_spill_read_counters() { | 408 | 24 | _spill_total_timer = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillTotalTime", 1); | 409 | | | 410 | | // Spill read counters | 411 | 24 | _spill_recover_time = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillRecoverTime", 1); | 412 | | | 413 | 24 | _spill_read_wait_in_queue_task_count = ADD_COUNTER_WITH_LEVEL( | 414 | 24 | Base::custom_profile(), "SpillReadTaskWaitInQueueCount", TUnit::UNIT, 1); | 415 | 24 | _spill_reading_task_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 416 | 24 | "SpillReadTaskCount", TUnit::UNIT, 1); | 417 | 24 | _spill_read_wait_in_queue_timer = | 418 | 24 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadTaskWaitInQueueTime", 1); | 419 | | | 420 | 24 | _spill_read_file_time = | 421 | 24 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadFileTime", 1); | 422 | 24 | _spill_read_deserialize_block_timer = | 423 | 24 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadDeserializeBlockTime", 1); | 424 | | | 425 | 24 | _spill_read_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 426 | 24 | "SpillReadBlockCount", TUnit::UNIT, 1); | 427 | 24 | _spill_read_block_data_size = ADD_COUNTER_WITH_LEVEL( | 428 | 24 | Base::custom_profile(), "SpillReadBlockBytes", TUnit::BYTES, 1); | 429 | 24 | _spill_read_file_size = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillReadFileBytes", | 430 | 24 | TUnit::BYTES, 1); | 431 | 24 | _spill_read_rows_count = | 432 | 24 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillReadRows", TUnit::UNIT, 1); | 433 | 24 | _spill_read_file_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 434 | 24 | "SpillReadFileCount", TUnit::UNIT, 1); | 435 | | | 436 | 24 | _spill_file_current_size = ADD_COUNTER_WITH_LEVEL( | 437 | 24 | Base::custom_profile(), "SpillWriteFileCurrentBytes", TUnit::BYTES, 1); | 438 | 24 | _spill_file_current_count = ADD_COUNTER_WITH_LEVEL( | 439 | 24 | Base::custom_profile(), "SpillWriteFileCurrentCount", TUnit::UNIT, 1); | 440 | 24 | } |
_ZN5doris24PipelineXSpillLocalStateINS_20SpillSortSharedStateEE24init_spill_read_countersEv Line | Count | Source | 407 | 5 | void init_spill_read_counters() { | 408 | 5 | _spill_total_timer = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillTotalTime", 1); | 409 | | | 410 | | // Spill read counters | 411 | 5 | _spill_recover_time = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillRecoverTime", 1); | 412 | | | 413 | 5 | _spill_read_wait_in_queue_task_count = ADD_COUNTER_WITH_LEVEL( | 414 | 5 | Base::custom_profile(), "SpillReadTaskWaitInQueueCount", TUnit::UNIT, 1); | 415 | 5 | _spill_reading_task_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 416 | 5 | "SpillReadTaskCount", TUnit::UNIT, 1); | 417 | 5 | _spill_read_wait_in_queue_timer = | 418 | 5 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadTaskWaitInQueueTime", 1); | 419 | | | 420 | 5 | _spill_read_file_time = | 421 | 5 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadFileTime", 1); | 422 | 5 | _spill_read_deserialize_block_timer = | 423 | 5 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadDeserializeBlockTime", 1); | 424 | | | 425 | 5 | _spill_read_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 426 | 5 | "SpillReadBlockCount", TUnit::UNIT, 1); | 427 | 5 | _spill_read_block_data_size = ADD_COUNTER_WITH_LEVEL( | 428 | 5 | Base::custom_profile(), "SpillReadBlockBytes", TUnit::BYTES, 1); | 429 | 5 | _spill_read_file_size = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillReadFileBytes", | 430 | 5 | TUnit::BYTES, 1); | 431 | 5 | _spill_read_rows_count = | 432 | 5 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillReadRows", TUnit::UNIT, 1); | 433 | 5 | _spill_read_file_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 434 | 5 | "SpillReadFileCount", TUnit::UNIT, 1); | 435 | | | 436 | 5 | _spill_file_current_size = ADD_COUNTER_WITH_LEVEL( | 437 | 5 | Base::custom_profile(), "SpillWriteFileCurrentBytes", TUnit::BYTES, 1); | 438 | 5 | _spill_file_current_count = ADD_COUNTER_WITH_LEVEL( | 439 | 5 | Base::custom_profile(), "SpillWriteFileCurrentCount", TUnit::UNIT, 1); | 440 | 5 | } |
Unexecuted instantiation: _ZN5doris24PipelineXSpillLocalStateINS_20MultiCastSharedStateEE24init_spill_read_countersEv |
441 | | |
442 | | // These two counters are shared to spill source operators as the initial value |
443 | | // Initialize values of counters 'SpillWriteFileCurrentBytes' and 'SpillWriteFileCurrentCount' |
444 | | // from spill sink operators' "SpillWriteFileTotalCount" and "SpillWriteFileBytes" |
445 | 33 | void copy_shared_spill_profile() { |
446 | 33 | if (_copy_shared_spill_profile) { |
447 | 4 | _copy_shared_spill_profile = false; |
448 | 4 | const auto* spill_shared_state = (const BasicSpillSharedState*)Base::_shared_state; |
449 | 4 | COUNTER_UPDATE(_spill_file_current_size, |
450 | 4 | spill_shared_state->_spill_write_file_total_size->value()); |
451 | 4 | COUNTER_UPDATE(_spill_file_current_count, |
452 | 4 | spill_shared_state->_spill_file_total_count->value()); |
453 | 4 | Base::_shared_state->update_spill_stream_profiles(Base::custom_profile()); |
454 | 4 | } |
455 | 33 | } _ZN5doris24PipelineXSpillLocalStateINS_25PartitionedAggSharedStateEE25copy_shared_spill_profileEv Line | Count | Source | 445 | 15 | void copy_shared_spill_profile() { | 446 | 15 | if (_copy_shared_spill_profile) { | 447 | 0 | _copy_shared_spill_profile = false; | 448 | 0 | const auto* spill_shared_state = (const BasicSpillSharedState*)Base::_shared_state; | 449 | 0 | COUNTER_UPDATE(_spill_file_current_size, | 450 | 0 | spill_shared_state->_spill_write_file_total_size->value()); | 451 | 0 | COUNTER_UPDATE(_spill_file_current_count, | 452 | 0 | spill_shared_state->_spill_file_total_count->value()); | 453 | 0 | Base::_shared_state->update_spill_stream_profiles(Base::custom_profile()); | 454 | 0 | } | 455 | 15 | } |
_ZN5doris24PipelineXSpillLocalStateINS_30PartitionedHashJoinSharedStateEE25copy_shared_spill_profileEv Line | Count | Source | 445 | 3 | void copy_shared_spill_profile() { | 446 | 3 | if (_copy_shared_spill_profile) { | 447 | 0 | _copy_shared_spill_profile = false; | 448 | 0 | const auto* spill_shared_state = (const BasicSpillSharedState*)Base::_shared_state; | 449 | 0 | COUNTER_UPDATE(_spill_file_current_size, | 450 | 0 | spill_shared_state->_spill_write_file_total_size->value()); | 451 | 0 | COUNTER_UPDATE(_spill_file_current_count, | 452 | 0 | spill_shared_state->_spill_file_total_count->value()); | 453 | 0 | Base::_shared_state->update_spill_stream_profiles(Base::custom_profile()); | 454 | 0 | } | 455 | 3 | } |
_ZN5doris24PipelineXSpillLocalStateINS_20SpillSortSharedStateEE25copy_shared_spill_profileEv Line | Count | Source | 445 | 15 | void copy_shared_spill_profile() { | 446 | 15 | if (_copy_shared_spill_profile) { | 447 | 4 | _copy_shared_spill_profile = false; | 448 | 4 | const auto* spill_shared_state = (const BasicSpillSharedState*)Base::_shared_state; | 449 | 4 | COUNTER_UPDATE(_spill_file_current_size, | 450 | 4 | spill_shared_state->_spill_write_file_total_size->value()); | 451 | 4 | COUNTER_UPDATE(_spill_file_current_count, | 452 | 4 | spill_shared_state->_spill_file_total_count->value()); | 453 | 4 | Base::_shared_state->update_spill_stream_profiles(Base::custom_profile()); | 454 | 4 | } | 455 | 15 | } |
|
456 | | |
457 | | // Total time of spill, including spill task scheduling time, |
458 | | // serialize block time, write disk file time, |
459 | | // and read disk file time, deserialize block time etc. |
460 | | RuntimeProfile::Counter* _spill_total_timer = nullptr; |
461 | | |
462 | | // Spill write counters |
463 | | // Total time of spill write, including serialize block time, write disk file, |
464 | | // and wait in queue time, etc. |
465 | | RuntimeProfile::Counter* _spill_write_timer = nullptr; |
466 | | |
467 | | RuntimeProfile::Counter* _spill_write_wait_in_queue_task_count = nullptr; |
468 | | RuntimeProfile::Counter* _spill_writing_task_count = nullptr; |
469 | | RuntimeProfile::Counter* _spill_write_wait_in_queue_timer = nullptr; |
470 | | |
471 | | // Total time of writing file |
472 | | RuntimeProfile::Counter* _spill_write_file_timer = nullptr; |
473 | | RuntimeProfile::Counter* _spill_write_serialize_block_timer = nullptr; |
474 | | // Original count of spilled Blocks |
475 | | // One Big Block maybe split into multiple small Blocks when actually written to disk file. |
476 | | RuntimeProfile::Counter* _spill_write_block_count = nullptr; |
477 | | // Total bytes of spill data in Block format(in memory format) |
478 | | RuntimeProfile::Counter* _spill_write_block_data_size = nullptr; |
479 | | // Total bytes of spill data written to disk file(after serialized) |
480 | | RuntimeProfile::Counter* _spill_write_file_total_size = nullptr; |
481 | | RuntimeProfile::Counter* _spill_write_rows_count = nullptr; |
482 | | RuntimeProfile::Counter* _spill_file_total_count = nullptr; |
483 | | RuntimeProfile::Counter* _spill_file_current_count = nullptr; |
484 | | // Spilled file total size |
485 | | RuntimeProfile::Counter* _spill_file_total_size = nullptr; |
486 | | // Current spilled file size |
487 | | RuntimeProfile::Counter* _spill_file_current_size = nullptr; |
488 | | |
489 | | // Spill read counters |
490 | | // Total time of recovring spilled data, including read file time, deserialize time, etc. |
491 | | RuntimeProfile::Counter* _spill_recover_time = nullptr; |
492 | | |
493 | | RuntimeProfile::Counter* _spill_read_wait_in_queue_task_count = nullptr; |
494 | | RuntimeProfile::Counter* _spill_reading_task_count = nullptr; |
495 | | RuntimeProfile::Counter* _spill_read_wait_in_queue_timer = nullptr; |
496 | | |
497 | | RuntimeProfile::Counter* _spill_read_file_time = nullptr; |
498 | | RuntimeProfile::Counter* _spill_read_deserialize_block_timer = nullptr; |
499 | | RuntimeProfile::Counter* _spill_read_block_count = nullptr; |
500 | | // Total bytes of read data in Block format(in memory format) |
501 | | RuntimeProfile::Counter* _spill_read_block_data_size = nullptr; |
502 | | // Total bytes of spill data read from disk file |
503 | | RuntimeProfile::Counter* _spill_read_file_size = nullptr; |
504 | | RuntimeProfile::Counter* _spill_read_rows_count = nullptr; |
505 | | RuntimeProfile::Counter* _spill_read_file_count = nullptr; |
506 | | |
507 | | bool _copy_shared_spill_profile = true; |
508 | | }; |
509 | | |
510 | | class DataSinkOperatorXBase; |
511 | | |
512 | | class PipelineXSinkLocalStateBase { |
513 | | public: |
514 | | PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent_, RuntimeState* state_); |
515 | 72.3k | virtual ~PipelineXSinkLocalStateBase() = default; |
516 | | |
517 | | // Do initialization. This step should be executed only once and in bthread, so we can do some |
518 | | // lightweight or non-idempotent operations (e.g. init profile, clone expr ctx from operatorX) |
519 | | virtual Status init(RuntimeState* state, LocalSinkStateInfo& info) = 0; |
520 | | |
521 | | virtual Status prepare(RuntimeState* state) = 0; |
522 | | // Do initialization. This step can be executed multiple times, so we should make sure it is |
523 | | // idempotent (e.g. wait for runtime filters). |
524 | | virtual Status open(RuntimeState* state) = 0; |
525 | | virtual Status terminate(RuntimeState* state) = 0; |
526 | | virtual Status close(RuntimeState* state, Status exec_status) = 0; |
527 | 4 | [[nodiscard]] virtual bool is_finished() const { return false; } |
528 | 0 | [[nodiscard]] virtual bool is_blockable() const { return false; } |
529 | | |
530 | | [[nodiscard]] virtual std::string debug_string(int indentation_level) const = 0; |
531 | | |
532 | | template <class TARGET> |
533 | 312k | TARGET& cast() { |
534 | 312k | DCHECK(dynamic_cast<TARGET*>(this)) |
535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() |
536 | 0 | << " and expect type is" << typeid(TARGET).name(); |
537 | 312k | return reinterpret_cast<TARGET&>(*this); |
538 | 312k | } _ZN5doris27PipelineXSinkLocalStateBase4castINS_22ExchangeSinkLocalStateEEERT_v Line | Count | Source | 533 | 11 | TARGET& cast() { | 534 | 11 | DCHECK(dynamic_cast<TARGET*>(this)) | 535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 536 | 0 | << " and expect type is" << typeid(TARGET).name(); | 537 | 11 | return reinterpret_cast<TARGET&>(*this); | 538 | 11 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_17AggSinkLocalStateEEERT_v Line | Count | Source | 533 | 123 | TARGET& cast() { | 534 | 123 | DCHECK(dynamic_cast<TARGET*>(this)) | 535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 536 | 0 | << " and expect type is" << typeid(TARGET).name(); | 537 | 123 | return reinterpret_cast<TARGET&>(*this); | 538 | 123 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_27HashJoinBuildSinkLocalStateEEERT_v Line | Count | Source | 533 | 312k | TARGET& cast() { | 534 | 312k | DCHECK(dynamic_cast<TARGET*>(this)) | 535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 536 | 0 | << " and expect type is" << typeid(TARGET).name(); | 537 | 312k | return reinterpret_cast<TARGET&>(*this); | 538 | 312k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_19UnionSinkLocalStateEEERT_v Line | Count | Source | 533 | 16 | TARGET& cast() { | 534 | 16 | DCHECK(dynamic_cast<TARGET*>(this)) | 535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 536 | 0 | << " and expect type is" << typeid(TARGET).name(); | 537 | 16 | return reinterpret_cast<TARGET&>(*this); | 538 | 16 | } |
Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_27LocalExchangeSinkLocalStateEEERT_v _ZN5doris27PipelineXSinkLocalStateBase4castINS_19DummySinkLocalStateEEERT_v Line | Count | Source | 533 | 1 | TARGET& cast() { | 534 | 1 | DCHECK(dynamic_cast<TARGET*>(this)) | 535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 536 | 0 | << " and expect type is" << typeid(TARGET).name(); | 537 | 1 | return reinterpret_cast<TARGET&>(*this); | 538 | 1 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_22AnalyticSinkLocalStateEEERT_v Line | Count | Source | 533 | 74 | TARGET& cast() { | 534 | 74 | DCHECK(dynamic_cast<TARGET*>(this)) | 535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 536 | 0 | << " and expect type is" << typeid(TARGET).name(); | 537 | 74 | return reinterpret_cast<TARGET&>(*this); | 538 | 74 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_19CacheSinkLocalStateEEERT_v Line | Count | Source | 533 | 3 | TARGET& cast() { | 534 | 3 | DCHECK(dynamic_cast<TARGET*>(this)) | 535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 536 | 0 | << " and expect type is" << typeid(TARGET).name(); | 537 | 3 | return reinterpret_cast<TARGET&>(*this); | 538 | 3 | } |
Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_33NestedLoopJoinBuildSinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_20ResultSinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_23JdbcTableSinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_27MemoryScratchSinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_24ResultFileSinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_23OlapTableSinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_25OlapTableSinkV2LocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_23HiveTableSinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_22TVFTableSinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_26IcebergTableSinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_31SpillIcebergTableSinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_21MCTableSinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_23BlackholeSinkLocalStateEEERT_v _ZN5doris27PipelineXSinkLocalStateBase4castINS_18SortSinkLocalStateEEERT_v Line | Count | Source | 533 | 37 | TARGET& cast() { | 534 | 37 | DCHECK(dynamic_cast<TARGET*>(this)) | 535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 536 | 0 | << " and expect type is" << typeid(TARGET).name(); | 537 | 37 | return reinterpret_cast<TARGET&>(*this); | 538 | 37 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_23SpillSortSinkLocalStateEEERT_v Line | Count | Source | 533 | 18 | TARGET& cast() { | 534 | 18 | DCHECK(dynamic_cast<TARGET*>(this)) | 535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 536 | 0 | << " and expect type is" << typeid(TARGET).name(); | 537 | 18 | return reinterpret_cast<TARGET&>(*this); | 538 | 18 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_28PartitionedAggSinkLocalStateEEERT_v Line | Count | Source | 533 | 82 | TARGET& cast() { | 534 | 82 | DCHECK(dynamic_cast<TARGET*>(this)) | 535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 536 | 0 | << " and expect type is" << typeid(TARGET).name(); | 537 | 82 | return reinterpret_cast<TARGET&>(*this); | 538 | 82 | } |
Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_33MultiCastDataStreamSinkLocalStateEEERT_v _ZN5doris27PipelineXSinkLocalStateBase4castINS_27PartitionSortSinkLocalStateEEERT_v Line | Count | Source | 533 | 104 | TARGET& cast() { | 534 | 104 | DCHECK(dynamic_cast<TARGET*>(this)) | 535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 536 | 0 | << " and expect type is" << typeid(TARGET).name(); | 537 | 104 | return reinterpret_cast<TARGET&>(*this); | 538 | 104 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_22SetProbeSinkLocalStateILb1EEEEERT_v Line | Count | Source | 533 | 8 | TARGET& cast() { | 534 | 8 | DCHECK(dynamic_cast<TARGET*>(this)) | 535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 536 | 0 | << " and expect type is" << typeid(TARGET).name(); | 537 | 8 | return reinterpret_cast<TARGET&>(*this); | 538 | 8 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_22SetProbeSinkLocalStateILb0EEEEERT_v Line | Count | Source | 533 | 5 | TARGET& cast() { | 534 | 5 | DCHECK(dynamic_cast<TARGET*>(this)) | 535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 536 | 0 | << " and expect type is" << typeid(TARGET).name(); | 537 | 5 | return reinterpret_cast<TARGET&>(*this); | 538 | 5 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_17SetSinkLocalStateILb1EEEEERT_v Line | Count | Source | 533 | 6 | TARGET& cast() { | 534 | 6 | DCHECK(dynamic_cast<TARGET*>(this)) | 535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 536 | 0 | << " and expect type is" << typeid(TARGET).name(); | 537 | 6 | return reinterpret_cast<TARGET&>(*this); | 538 | 6 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_17SetSinkLocalStateILb0EEEEERT_v Line | Count | Source | 533 | 4 | TARGET& cast() { | 534 | 4 | DCHECK(dynamic_cast<TARGET*>(this)) | 535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 536 | 0 | << " and expect type is" << typeid(TARGET).name(); | 537 | 4 | return reinterpret_cast<TARGET&>(*this); | 538 | 4 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_33PartitionedHashJoinSinkLocalStateEEERT_v Line | Count | Source | 533 | 9 | TARGET& cast() { | 534 | 9 | DCHECK(dynamic_cast<TARGET*>(this)) | 535 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 536 | 0 | << " and expect type is" << typeid(TARGET).name(); | 537 | 9 | return reinterpret_cast<TARGET&>(*this); | 538 | 9 | } |
Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_30GroupCommitBlockSinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_18DictSinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_20RecCTESinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_26RecCTEAnchorSinkLocalStateEEERT_v |
539 | | template <class TARGET> |
540 | | const TARGET& cast() const { |
541 | | DCHECK(dynamic_cast<const TARGET*>(this)) |
542 | | << " Mismatch type! Current type is " << typeid(*this).name() |
543 | | << " and expect type is" << typeid(TARGET).name(); |
544 | | return reinterpret_cast<const TARGET&>(*this); |
545 | | } |
546 | | |
547 | 46.3k | DataSinkOperatorXBase* parent() { return _parent; } |
548 | 83 | RuntimeState* state() { return _state; } |
549 | 128 | RuntimeProfile* operator_profile() { return _operator_profile; } |
550 | 41 | RuntimeProfile* common_profile() { return _common_profile; } |
551 | 795k | RuntimeProfile* custom_profile() { return _custom_profile; } |
552 | | |
553 | 1 | [[nodiscard]] RuntimeProfile* faker_runtime_profile() const { |
554 | 1 | return _faker_runtime_profile.get(); |
555 | 1 | } |
556 | | |
557 | 96.3k | RuntimeProfile::Counter* rows_input_counter() { return _rows_input_counter; } |
558 | 264k | RuntimeProfile::Counter* exec_time_counter() { return _exec_timer; } |
559 | 59 | RuntimeProfile::Counter* memory_used_counter() { return _memory_used_counter; } |
560 | | |
561 | 0 | virtual std::vector<Dependency*> dependencies() const { return {nullptr}; } |
562 | | |
563 | | // override in exchange sink , AsyncWriterSink |
564 | 0 | virtual Dependency* finishdependency() { return nullptr; } |
565 | | |
566 | 20 | bool low_memory_mode() { return _state->low_memory_mode(); } |
567 | | |
568 | | protected: |
569 | | DataSinkOperatorXBase* _parent = nullptr; |
570 | | RuntimeState* _state = nullptr; |
571 | | RuntimeProfile* _operator_profile = nullptr; |
572 | | RuntimeProfile* _common_profile = nullptr; |
573 | | RuntimeProfile* _custom_profile = nullptr; |
574 | | // Set to true after close() has been called. subclasses should check and set this in |
575 | | // close(). |
576 | | bool _closed = false; |
577 | | bool _terminated = false; |
578 | | //NOTICE: now add a faker profile, because sometimes the profile record is useless |
579 | | //so we want remove some counters and timers, eg: in join node, if it's broadcast_join |
580 | | //and shared hash table, some counter/timer about build hash table is useless, |
581 | | //so we could add those counter/timer in faker profile, and those will not display in web profile. |
582 | | std::unique_ptr<RuntimeProfile> _faker_runtime_profile = |
583 | | std::make_unique<RuntimeProfile>("faker profile"); |
584 | | |
585 | | RuntimeProfile::Counter* _rows_input_counter = nullptr; |
586 | | RuntimeProfile::Counter* _init_timer = nullptr; |
587 | | RuntimeProfile::Counter* _open_timer = nullptr; |
588 | | RuntimeProfile::Counter* _close_timer = nullptr; |
589 | | RuntimeProfile::Counter* _wait_for_dependency_timer = nullptr; |
590 | | RuntimeProfile::Counter* _wait_for_finish_dependency_timer = nullptr; |
591 | | RuntimeProfile::Counter* _exec_timer = nullptr; |
592 | | RuntimeProfile::HighWaterMarkCounter* _memory_used_counter = nullptr; |
593 | | }; |
594 | | |
595 | | template <typename SharedStateArg = FakeSharedState> |
596 | | class PipelineXSinkLocalState : public PipelineXSinkLocalStateBase { |
597 | | public: |
598 | | using SharedStateType = SharedStateArg; |
599 | | PipelineXSinkLocalState(DataSinkOperatorXBase* parent, RuntimeState* state) |
600 | 72.3k | : PipelineXSinkLocalStateBase(parent, state) {}_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 600 | 26 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 600 | 9 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 600 | 102 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 600 | 5 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 600 | 3 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 600 | 23 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 600 | 17 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 600 | 3 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 600 | 21 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 600 | 38 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 600 | 72.0k | : PipelineXSinkLocalStateBase(parent, state) {} |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 600 | 8 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 600 | 11 | : PipelineXSinkLocalStateBase(parent, state) {} |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 600 | 11 | : PipelineXSinkLocalStateBase(parent, state) {} |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE |
601 | 72.3k | ~PipelineXSinkLocalState() override = default; _ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEED2Ev Line | Count | Source | 601 | 26 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEED2Ev Line | Count | Source | 601 | 9 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEED2Ev Line | Count | Source | 601 | 102 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEED2Ev Line | Count | Source | 601 | 11 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEED2Ev Line | Count | Source | 601 | 72.0k | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEED2Ev Line | Count | Source | 601 | 5 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEED2Ev Line | Count | Source | 601 | 3 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEED2Ev Line | Count | Source | 601 | 23 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEED2Ev Line | Count | Source | 601 | 17 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEED2Ev Line | Count | Source | 601 | 3 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEED2Ev Line | Count | Source | 601 | 21 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEED2Ev Line | Count | Source | 601 | 38 | ~PipelineXSinkLocalState() override = default; |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEED2Ev _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEED2Ev Line | Count | Source | 601 | 11 | ~PipelineXSinkLocalState() override = default; |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEED2Ev Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEED2Ev _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEED2Ev Line | Count | Source | 601 | 8 | ~PipelineXSinkLocalState() override = default; |
|
602 | | |
603 | | Status init(RuntimeState* state, LocalSinkStateInfo& info) override; |
604 | | |
605 | 66 | Status prepare(RuntimeState* state) override { return Status::OK(); }_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 605 | 22 | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 605 | 32 | Status prepare(RuntimeState* state) override { return Status::OK(); } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE7prepareEPNS_12RuntimeStateE _ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 605 | 12 | Status prepare(RuntimeState* state) override { return Status::OK(); } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE7prepareEPNS_12RuntimeStateE |
606 | 72.2k | Status open(RuntimeState* state) override { return Status::OK(); }_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 606 | 7 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 606 | 8 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 606 | 38 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 606 | 9 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 606 | 102 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 606 | 11 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 606 | 2 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 606 | 72.0k | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 606 | 3 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 606 | 23 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 606 | 17 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 606 | 3 | Status open(RuntimeState* state) override { return Status::OK(); } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 606 | 8 | Status open(RuntimeState* state) override { return Status::OK(); } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE |
607 | | |
608 | | Status terminate(RuntimeState* state) override; |
609 | | Status close(RuntimeState* state, Status exec_status) override; |
610 | | |
611 | | [[nodiscard]] std::string debug_string(int indentation_level) const override; |
612 | | |
613 | | virtual std::string name_suffix(); |
614 | | |
615 | 44 | std::vector<Dependency*> dependencies() const override { |
616 | 44 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; |
617 | 44 | } Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12dependenciesEv _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12dependenciesEv Line | Count | Source | 615 | 2 | std::vector<Dependency*> dependencies() const override { | 616 | 2 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 617 | 2 | } |
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12dependenciesEv _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12dependenciesEv Line | Count | Source | 615 | 35 | std::vector<Dependency*> dependencies() const override { | 616 | 35 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 617 | 35 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12dependenciesEv Line | Count | Source | 615 | 1 | std::vector<Dependency*> dependencies() const override { | 616 | 1 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 617 | 1 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12dependenciesEv Line | Count | Source | 615 | 6 | std::vector<Dependency*> dependencies() const override { | 616 | 6 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 617 | 6 | } |
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12dependenciesEv |
618 | | |
619 | 72.2k | virtual bool must_set_shared_state() const { |
620 | 72.2k | return !std::is_same_v<SharedStateArg, FakeSharedState>; |
621 | 72.2k | } _ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE21must_set_shared_stateEv Line | Count | Source | 619 | 7 | virtual bool must_set_shared_state() const { | 620 | 7 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 621 | 7 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE21must_set_shared_stateEv Line | Count | Source | 619 | 11 | virtual bool must_set_shared_state() const { | 620 | 11 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 621 | 11 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE21must_set_shared_stateEv Line | Count | Source | 619 | 38 | virtual bool must_set_shared_state() const { | 620 | 38 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 621 | 38 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE21must_set_shared_stateEv Line | Count | Source | 619 | 9 | virtual bool must_set_shared_state() const { | 620 | 9 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 621 | 9 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE21must_set_shared_stateEv Line | Count | Source | 619 | 102 | virtual bool must_set_shared_state() const { | 620 | 102 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 621 | 102 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE21must_set_shared_stateEv Line | Count | Source | 619 | 11 | virtual bool must_set_shared_state() const { | 620 | 11 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 621 | 11 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE21must_set_shared_stateEv Line | Count | Source | 619 | 2 | virtual bool must_set_shared_state() const { | 620 | 2 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 621 | 2 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE21must_set_shared_stateEv Line | Count | Source | 619 | 72.0k | virtual bool must_set_shared_state() const { | 620 | 72.0k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 621 | 72.0k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE21must_set_shared_stateEv Line | Count | Source | 619 | 3 | virtual bool must_set_shared_state() const { | 620 | 3 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 621 | 3 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE21must_set_shared_stateEv Line | Count | Source | 619 | 23 | virtual bool must_set_shared_state() const { | 620 | 23 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 621 | 23 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE21must_set_shared_stateEv Line | Count | Source | 619 | 17 | virtual bool must_set_shared_state() const { | 620 | 17 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 621 | 17 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE21must_set_shared_stateEv Line | Count | Source | 619 | 3 | virtual bool must_set_shared_state() const { | 620 | 3 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 621 | 3 | } |
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE21must_set_shared_stateEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE21must_set_shared_stateEv _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE21must_set_shared_stateEv Line | Count | Source | 619 | 8 | virtual bool must_set_shared_state() const { | 620 | 8 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 621 | 8 | } |
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE21must_set_shared_stateEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE21must_set_shared_stateEv |
622 | | |
623 | | protected: |
624 | | Dependency* _dependency = nullptr; |
625 | | SharedStateType* _shared_state = nullptr; |
626 | | }; |
627 | | |
628 | | class DataSinkOperatorXBase : public OperatorBase { |
629 | | public: |
630 | | DataSinkOperatorXBase(const int operator_id, const int node_id, const int dest_id) |
631 | 72 | : _operator_id(operator_id), _node_id(node_id), _dests_id({dest_id}) {} |
632 | | DataSinkOperatorXBase(const int operator_id, const TPlanNode& tnode, const int dest_id) |
633 | 72.1k | : OperatorBase(tnode.__isset.is_serial_operator && tnode.is_serial_operator), |
634 | 72.1k | _operator_id(operator_id), |
635 | 72.1k | _node_id(tnode.node_id), |
636 | 72.1k | _dests_id({dest_id}) {} |
637 | | |
638 | | DataSinkOperatorXBase(const int operator_id, const int node_id, std::vector<int>& dests) |
639 | 0 | : _operator_id(operator_id), _node_id(node_id), _dests_id(dests) {} |
640 | | |
641 | | #ifdef BE_TEST |
642 | 72.2k | DataSinkOperatorXBase() : _operator_id(-1), _node_id(0), _dests_id({-1}) {}; |
643 | | #endif |
644 | | |
645 | 144k | ~DataSinkOperatorXBase() override = default; |
646 | | |
647 | | // For agg/sort/join sink. |
648 | | virtual Status init(const TPlanNode& tnode, RuntimeState* state); |
649 | | |
650 | 10 | virtual bool reset_to_rerun(RuntimeState* state, OperatorXBase* root) const { return false; } |
651 | | |
652 | | Status init(const TDataSink& tsink) override; |
653 | | [[nodiscard]] virtual Status init(RuntimeState* state, ExchangeType type, const int num_buckets, |
654 | | const bool use_global_hash_shuffle, |
655 | 0 | const std::map<int, int>& shuffle_idx_to_instance_idx) { |
656 | 0 | return Status::InternalError("init() is only implemented in local exchange!"); |
657 | 0 | } |
658 | | |
659 | 72.0k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
660 | | Status terminate(RuntimeState* state) override; |
661 | 1.35M | [[nodiscard]] bool is_finished(RuntimeState* state) const { |
662 | 1.35M | auto result = state->get_sink_local_state_result(); |
663 | 1.35M | if (!result) { |
664 | 0 | return result.error(); |
665 | 0 | } |
666 | 1.35M | return result.value()->is_finished(); |
667 | 1.35M | } |
668 | | |
669 | | [[nodiscard]] virtual Status sink(RuntimeState* state, Block* block, bool eos) = 0; |
670 | | |
671 | | [[nodiscard]] virtual Status setup_local_state(RuntimeState* state, |
672 | | LocalSinkStateInfo& info) = 0; |
673 | | |
674 | 904 | [[nodiscard]] virtual size_t get_reserve_mem_size(RuntimeState* state, bool eos) { |
675 | 904 | return state->minimum_operator_memory_required_bytes(); |
676 | 904 | } |
677 | 0 | bool is_blockable(RuntimeState* state) const override { |
678 | 0 | return state->get_sink_local_state()->is_blockable(); |
679 | 0 | } |
680 | | |
681 | 0 | [[nodiscard]] bool is_spillable() const { return _spillable; } |
682 | | |
683 | | template <class TARGET> |
684 | 814k | TARGET& cast() { |
685 | 814k | DCHECK(dynamic_cast<TARGET*>(this)) |
686 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() |
687 | 0 | << " and expect type is" << typeid(TARGET).name(); |
688 | 814k | return reinterpret_cast<TARGET&>(*this); |
689 | 814k | } _ZN5doris21DataSinkOperatorXBase4castINS_18DummySinkOperatorXEEERT_v Line | Count | Source | 684 | 18 | TARGET& cast() { | 685 | 18 | DCHECK(dynamic_cast<TARGET*>(this)) | 686 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 687 | 0 | << " and expect type is" << typeid(TARGET).name(); | 688 | 18 | return reinterpret_cast<TARGET&>(*this); | 689 | 18 | } |
Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_26LocalExchangeSinkOperatorXEEERT_v _ZN5doris21DataSinkOperatorXBase4castINS_16AggSinkOperatorXEEERT_v Line | Count | Source | 684 | 144 | TARGET& cast() { | 685 | 144 | DCHECK(dynamic_cast<TARGET*>(this)) | 686 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 687 | 0 | << " and expect type is" << typeid(TARGET).name(); | 688 | 144 | return reinterpret_cast<TARGET&>(*this); | 689 | 144 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_21AnalyticSinkOperatorXEEERT_v Line | Count | Source | 684 | 101 | TARGET& cast() { | 685 | 101 | DCHECK(dynamic_cast<TARGET*>(this)) | 686 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 687 | 0 | << " and expect type is" << typeid(TARGET).name(); | 688 | 101 | return reinterpret_cast<TARGET&>(*this); | 689 | 101 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_21ExchangeSinkOperatorXEEERT_v Line | Count | Source | 684 | 24 | TARGET& cast() { | 685 | 24 | DCHECK(dynamic_cast<TARGET*>(this)) | 686 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 687 | 0 | << " and expect type is" << typeid(TARGET).name(); | 688 | 24 | return reinterpret_cast<TARGET&>(*this); | 689 | 24 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_26HashJoinBuildSinkOperatorXEEERT_v Line | Count | Source | 684 | 814k | TARGET& cast() { | 685 | 814k | DCHECK(dynamic_cast<TARGET*>(this)) | 686 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 687 | 0 | << " and expect type is" << typeid(TARGET).name(); | 688 | 814k | return reinterpret_cast<TARGET&>(*this); | 689 | 814k | } |
Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_32NestedLoopJoinBuildSinkOperatorXEEERT_v _ZN5doris21DataSinkOperatorXBase4castINS_32PartitionedHashJoinSinkOperatorXEEERT_v Line | Count | Source | 684 | 14 | TARGET& cast() { | 685 | 14 | DCHECK(dynamic_cast<TARGET*>(this)) | 686 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 687 | 0 | << " and expect type is" << typeid(TARGET).name(); | 688 | 14 | return reinterpret_cast<TARGET&>(*this); | 689 | 14 | } |
Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_23ResultFileSinkOperatorXEEERT_v Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_22JdbcTableSinkOperatorXEEERT_v Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_22OlapTableSinkOperatorXEEERT_v Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_24OlapTableSinkV2OperatorXEEERT_v Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_22HiveTableSinkOperatorXEEERT_v Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_25IcebergTableSinkOperatorXEEERT_v Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_30SpillIcebergTableSinkOperatorXEEERT_v Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_20MCTableSinkOperatorXEEERT_v Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_21TVFTableSinkOperatorXEEERT_v Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_26MemoryScratchSinkOperatorXEEERT_v Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_29GroupCommitBlockSinkOperatorXEEERT_v Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_17DictSinkOperatorXEEERT_v _ZN5doris21DataSinkOperatorXBase4castINS_26PartitionSortSinkOperatorXEEERT_v Line | Count | Source | 684 | 102 | TARGET& cast() { | 685 | 102 | DCHECK(dynamic_cast<TARGET*>(this)) | 686 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 687 | 0 | << " and expect type is" << typeid(TARGET).name(); | 688 | 102 | return reinterpret_cast<TARGET&>(*this); | 689 | 102 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_27PartitionedAggSinkOperatorXEEERT_v Line | Count | Source | 684 | 32 | TARGET& cast() { | 685 | 32 | DCHECK(dynamic_cast<TARGET*>(this)) | 686 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 687 | 0 | << " and expect type is" << typeid(TARGET).name(); | 688 | 32 | return reinterpret_cast<TARGET&>(*this); | 689 | 32 | } |
Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_25RecCTEAnchorSinkOperatorXEEERT_v Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_19RecCTESinkOperatorXEEERT_v Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_19ResultSinkOperatorXEEERT_v _ZN5doris21DataSinkOperatorXBase4castINS_21SetProbeSinkOperatorXILb1EEEEERT_v Line | Count | Source | 684 | 8 | TARGET& cast() { | 685 | 8 | DCHECK(dynamic_cast<TARGET*>(this)) | 686 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 687 | 0 | << " and expect type is" << typeid(TARGET).name(); | 688 | 8 | return reinterpret_cast<TARGET&>(*this); | 689 | 8 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_21SetProbeSinkOperatorXILb0EEEEERT_v Line | Count | Source | 684 | 5 | TARGET& cast() { | 685 | 5 | DCHECK(dynamic_cast<TARGET*>(this)) | 686 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 687 | 0 | << " and expect type is" << typeid(TARGET).name(); | 688 | 5 | return reinterpret_cast<TARGET&>(*this); | 689 | 5 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_16SetSinkOperatorXILb1EEEEERT_v Line | Count | Source | 684 | 12 | TARGET& cast() { | 685 | 12 | DCHECK(dynamic_cast<TARGET*>(this)) | 686 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 687 | 0 | << " and expect type is" << typeid(TARGET).name(); | 688 | 12 | return reinterpret_cast<TARGET&>(*this); | 689 | 12 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_16SetSinkOperatorXILb0EEEEERT_v Line | Count | Source | 684 | 8 | TARGET& cast() { | 685 | 8 | DCHECK(dynamic_cast<TARGET*>(this)) | 686 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 687 | 0 | << " and expect type is" << typeid(TARGET).name(); | 688 | 8 | return reinterpret_cast<TARGET&>(*this); | 689 | 8 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_17SortSinkOperatorXEEERT_v Line | Count | Source | 684 | 17 | TARGET& cast() { | 685 | 17 | DCHECK(dynamic_cast<TARGET*>(this)) | 686 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 687 | 0 | << " and expect type is" << typeid(TARGET).name(); | 688 | 17 | return reinterpret_cast<TARGET&>(*this); | 689 | 17 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_22SpillSortSinkOperatorXEEERT_v Line | Count | Source | 684 | 18 | TARGET& cast() { | 685 | 18 | DCHECK(dynamic_cast<TARGET*>(this)) | 686 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 687 | 0 | << " and expect type is" << typeid(TARGET).name(); | 688 | 18 | return reinterpret_cast<TARGET&>(*this); | 689 | 18 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_18UnionSinkOperatorXEEERT_v Line | Count | Source | 684 | 6 | TARGET& cast() { | 685 | 6 | DCHECK(dynamic_cast<TARGET*>(this)) | 686 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 687 | 0 | << " and expect type is" << typeid(TARGET).name(); | 688 | 6 | return reinterpret_cast<TARGET&>(*this); | 689 | 6 | } |
|
690 | | template <class TARGET> |
691 | | const TARGET& cast() const { |
692 | | DCHECK(dynamic_cast<const TARGET*>(this)) |
693 | | << " Mismatch type! Current type is " << typeid(*this).name() |
694 | | << " and expect type is" << typeid(TARGET).name(); |
695 | | return reinterpret_cast<const TARGET&>(*this); |
696 | | } |
697 | | |
698 | | [[nodiscard]] virtual std::shared_ptr<BasicSharedState> create_shared_state() const = 0; |
699 | | |
700 | 0 | Status close(RuntimeState* state) override { |
701 | 0 | return Status::InternalError("Should not reach here!"); |
702 | 0 | } |
703 | | |
704 | | [[nodiscard]] virtual std::string debug_string(int indentation_level) const; |
705 | | |
706 | | [[nodiscard]] virtual std::string debug_string(RuntimeState* state, |
707 | | int indentation_level) const; |
708 | | |
709 | 144k | [[nodiscard]] bool is_sink() const override { return true; } |
710 | | |
711 | 72.0k | static Status close(RuntimeState* state, Status exec_status) { |
712 | 72.0k | auto result = state->get_sink_local_state_result(); |
713 | 72.0k | if (!result) { |
714 | 0 | return result.error(); |
715 | 0 | } |
716 | 72.0k | return result.value()->close(state, exec_status); |
717 | 72.0k | } |
718 | | |
719 | 264k | [[nodiscard]] int operator_id() const { return _operator_id; } |
720 | | |
721 | 288k | [[nodiscard]] const std::vector<int>& dests_id() const { return _dests_id; } |
722 | | |
723 | 144k | [[nodiscard]] int nereids_id() const { return _nereids_id; } |
724 | | |
725 | 345k | [[nodiscard]] int node_id() const override { return _node_id; } |
726 | | |
727 | 219k | [[nodiscard]] std::string get_name() const override { return _name; } |
728 | | |
729 | 11 | virtual bool should_dry_run(RuntimeState* state) { return false; } |
730 | | |
731 | 0 | [[nodiscard]] virtual bool count_down_destination() { return true; } |
732 | | |
733 | | protected: |
734 | | template <typename Writer, typename Parent> |
735 | | requires(std::is_base_of_v<AsyncResultWriter, Writer>) |
736 | | friend class AsyncWriterSink; |
737 | | // _operator_id : the current Operator's ID, which is not visible to the user. |
738 | | // _node_id : the plan node ID corresponding to the Operator, which is visible on the profile. |
739 | | // _dests_id : the target _operator_id of the sink, for example, in the case of a multi-sink, there are multiple targets. |
740 | | const int _operator_id; |
741 | | const int _node_id; |
742 | | int _nereids_id = -1; |
743 | | bool _spillable = false; |
744 | | std::vector<int> _dests_id; |
745 | | std::string _name; |
746 | | }; |
747 | | |
748 | | template <typename LocalStateType> |
749 | | class DataSinkOperatorX : public DataSinkOperatorXBase { |
750 | | public: |
751 | | DataSinkOperatorX(const int id, const int node_id, const int dest_id) |
752 | 72 | : DataSinkOperatorXBase(id, node_id, dest_id) {}_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEEC2Eiii Line | Count | Source | 752 | 27 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_19DummySinkLocalStateEEC2Eiii Line | Count | Source | 752 | 13 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEEC2Eiii _ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEEC2Eiii Line | Count | Source | 752 | 10 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEEC2Eiii _ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEEC2Eiii Line | Count | Source | 752 | 10 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEEC2Eiii _ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEEC2Eiii Line | Count | Source | 752 | 12 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEEC2Eiii |
753 | | DataSinkOperatorX(const int id, const TPlanNode& tnode, const int dest_id) |
754 | 72.1k | : DataSinkOperatorXBase(id, tnode, dest_id) {}Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19DummySinkLocalStateEEC2EiRKNS_9TPlanNodeEi _ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Line | Count | Source | 754 | 12 | : DataSinkOperatorXBase(id, tnode, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEEC2EiRKNS_9TPlanNodeEi _ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Line | Count | Source | 754 | 72.0k | : DataSinkOperatorXBase(id, tnode, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEEC2EiRKNS_9TPlanNodeEi _ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Line | Count | Source | 754 | 32 | : DataSinkOperatorXBase(id, tnode, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEEC2EiRKNS_9TPlanNodeEi _ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Line | Count | Source | 754 | 10 | : DataSinkOperatorXBase(id, tnode, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEEC2EiRKNS_9TPlanNodeEi |
755 | | |
756 | | DataSinkOperatorX(const int id, const int node_id, std::vector<int> dest_ids) |
757 | 0 | : DataSinkOperatorXBase(id, node_id, dest_ids) {}Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19DummySinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEEC2EiiSt6vectorIiSaIiEE |
758 | | #ifdef BE_TEST |
759 | 150 | DataSinkOperatorX() = default; _ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEEC2Ev Line | Count | Source | 759 | 9 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEEC2Ev Line | Count | Source | 759 | 102 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEEC2Ev Line | Count | Source | 759 | 3 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEEC2Ev Line | Count | Source | 759 | 6 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEEC2Ev Line | Count | Source | 759 | 8 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEEC2Ev Line | Count | Source | 759 | 4 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEEC2Ev Line | Count | Source | 759 | 5 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEEC2Ev Line | Count | Source | 759 | 9 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEEC2Ev Line | Count | Source | 759 | 3 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEEC2Ev Line | Count | Source | 759 | 1 | DataSinkOperatorX() = default; |
|
760 | | #endif |
761 | 72.3k | ~DataSinkOperatorX() override = default; _ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEED2Ev Line | Count | Source | 761 | 39 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEED2Ev Line | Count | Source | 761 | 9 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEED2Ev Line | Count | Source | 761 | 10 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEED2Ev Line | Count | Source | 761 | 102 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEED2Ev Line | Count | Source | 761 | 72.0k | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEED2Ev Line | Count | Source | 761 | 32 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEED2Ev Line | Count | Source | 761 | 3 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEED2Ev Line | Count | Source | 761 | 6 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEED2Ev Line | Count | Source | 761 | 8 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEED2Ev Line | Count | Source | 761 | 4 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEED2Ev Line | Count | Source | 761 | 5 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEED2Ev Line | Count | Source | 761 | 19 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEED2Ev Line | Count | Source | 761 | 10 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEED2Ev Line | Count | Source | 761 | 3 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEED2Ev Line | Count | Source | 761 | 1 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_19DummySinkLocalStateEED2Ev Line | Count | Source | 761 | 13 | ~DataSinkOperatorX() override = default; |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEED2Ev Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEED2Ev _ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEED2Ev Line | Count | Source | 761 | 12 | ~DataSinkOperatorX() override = default; |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEED2Ev |
762 | | |
763 | | Status setup_local_state(RuntimeState* state, LocalSinkStateInfo& info) override; |
764 | | std::shared_ptr<BasicSharedState> create_shared_state() const override; |
765 | | |
766 | | using LocalState = LocalStateType; |
767 | 312k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { |
768 | 312k | return state->get_sink_local_state()->template cast<LocalState>(); |
769 | 312k | } _ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 767 | 10 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 768 | 10 | return state->get_sink_local_state()->template cast<LocalState>(); | 769 | 10 | } |
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 767 | 123 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 768 | 123 | return state->get_sink_local_state()->template cast<LocalState>(); | 769 | 123 | } |
_ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 767 | 16 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 768 | 16 | return state->get_sink_local_state()->template cast<LocalState>(); | 769 | 16 | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19DummySinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE _ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 767 | 74 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 768 | 74 | return state->get_sink_local_state()->template cast<LocalState>(); | 769 | 74 | } |
_ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 767 | 3 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 768 | 3 | return state->get_sink_local_state()->template cast<LocalState>(); | 769 | 3 | } |
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 767 | 312k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 768 | 312k | return state->get_sink_local_state()->template cast<LocalState>(); | 769 | 312k | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE _ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 767 | 37 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 768 | 37 | return state->get_sink_local_state()->template cast<LocalState>(); | 769 | 37 | } |
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 767 | 18 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 768 | 18 | return state->get_sink_local_state()->template cast<LocalState>(); | 769 | 18 | } |
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 767 | 82 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 768 | 82 | return state->get_sink_local_state()->template cast<LocalState>(); | 769 | 82 | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE _ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 767 | 104 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 768 | 104 | return state->get_sink_local_state()->template cast<LocalState>(); | 769 | 104 | } |
_ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 767 | 8 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 768 | 8 | return state->get_sink_local_state()->template cast<LocalState>(); | 769 | 8 | } |
_ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 767 | 5 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 768 | 5 | return state->get_sink_local_state()->template cast<LocalState>(); | 769 | 5 | } |
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 767 | 6 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 768 | 6 | return state->get_sink_local_state()->template cast<LocalState>(); | 769 | 6 | } |
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 767 | 4 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 768 | 4 | return state->get_sink_local_state()->template cast<LocalState>(); | 769 | 4 | } |
_ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 767 | 9 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 768 | 9 | return state->get_sink_local_state()->template cast<LocalState>(); | 769 | 9 | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE |
770 | | }; |
771 | | |
772 | | template <typename SharedStateArg> |
773 | | class PipelineXSpillSinkLocalState : public PipelineXSinkLocalState<SharedStateArg> { |
774 | | public: |
775 | | using Base = PipelineXSinkLocalState<SharedStateArg>; |
776 | | PipelineXSpillSinkLocalState(DataSinkOperatorXBase* parent, RuntimeState* state) |
777 | 24 | : Base(parent, state) {}_ZN5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 777 | 5 | : Base(parent, state) {} |
Unexecuted instantiation: _ZN5doris28PipelineXSpillSinkLocalStateINS_20MultiCastSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE _ZN5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 777 | 11 | : Base(parent, state) {} |
_ZN5doris28PipelineXSpillSinkLocalStateINS_20SpillSortSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 777 | 8 | : Base(parent, state) {} |
|
778 | 24 | ~PipelineXSpillSinkLocalState() override = default; _ZN5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEED2Ev Line | Count | Source | 778 | 11 | ~PipelineXSpillSinkLocalState() override = default; |
_ZN5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEED2Ev Line | Count | Source | 778 | 5 | ~PipelineXSpillSinkLocalState() override = default; |
Unexecuted instantiation: _ZN5doris28PipelineXSpillSinkLocalStateINS_20MultiCastSharedStateEED2Ev _ZN5doris28PipelineXSpillSinkLocalStateINS_20SpillSortSharedStateEED2Ev Line | Count | Source | 778 | 8 | ~PipelineXSpillSinkLocalState() override = default; |
|
779 | | |
780 | 21 | Status init(RuntimeState* state, LocalSinkStateInfo& info) override { |
781 | 21 | RETURN_IF_ERROR(Base::init(state, info)); |
782 | 21 | init_spill_counters(); |
783 | 21 | return Status::OK(); |
784 | 21 | } _ZN5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 780 | 11 | Status init(RuntimeState* state, LocalSinkStateInfo& info) override { | 781 | 11 | RETURN_IF_ERROR(Base::init(state, info)); | 782 | 11 | init_spill_counters(); | 783 | 11 | return Status::OK(); | 784 | 11 | } |
_ZN5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 780 | 2 | Status init(RuntimeState* state, LocalSinkStateInfo& info) override { | 781 | 2 | RETURN_IF_ERROR(Base::init(state, info)); | 782 | 2 | init_spill_counters(); | 783 | 2 | return Status::OK(); | 784 | 2 | } |
Unexecuted instantiation: _ZN5doris28PipelineXSpillSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE _ZN5doris28PipelineXSpillSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 780 | 8 | Status init(RuntimeState* state, LocalSinkStateInfo& info) override { | 781 | 8 | RETURN_IF_ERROR(Base::init(state, info)); | 782 | 8 | init_spill_counters(); | 783 | 8 | return Status::OK(); | 784 | 8 | } |
|
785 | | |
786 | 24 | void init_spill_counters() { |
787 | 24 | _spill_total_timer = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillTotalTime", 1); |
788 | | |
789 | 24 | _spill_write_timer = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteTime", 1); |
790 | | |
791 | 24 | _spill_write_wait_in_queue_task_count = ADD_COUNTER_WITH_LEVEL( |
792 | 24 | Base::custom_profile(), "SpillWriteTaskWaitInQueueCount", TUnit::UNIT, 1); |
793 | 24 | _spill_writing_task_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), |
794 | 24 | "SpillWriteTaskCount", TUnit::UNIT, 1); |
795 | 24 | _spill_write_wait_in_queue_timer = |
796 | 24 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteTaskWaitInQueueTime", 1); |
797 | | |
798 | 24 | _spill_write_file_timer = |
799 | 24 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteFileTime", 1); |
800 | | |
801 | 24 | _spill_write_serialize_block_timer = |
802 | 24 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteSerializeBlockTime", 1); |
803 | 24 | _spill_write_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), |
804 | 24 | "SpillWriteBlockCount", TUnit::UNIT, 1); |
805 | 24 | _spill_write_block_data_size = ADD_COUNTER_WITH_LEVEL( |
806 | 24 | Base::custom_profile(), "SpillWriteBlockBytes", TUnit::BYTES, 1); |
807 | 24 | _spill_write_rows_count = |
808 | 24 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillWriteRows", TUnit::UNIT, 1); |
809 | | |
810 | 24 | _spill_max_rows_of_partition = ADD_COUNTER_WITH_LEVEL( |
811 | 24 | Base::custom_profile(), "SpillMaxRowsOfPartition", TUnit::UNIT, 1); |
812 | 24 | _spill_min_rows_of_partition = ADD_COUNTER_WITH_LEVEL( |
813 | 24 | Base::custom_profile(), "SpillMinRowsOfPartition", TUnit::UNIT, 1); |
814 | 24 | } _ZN5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEE19init_spill_countersEv Line | Count | Source | 786 | 11 | void init_spill_counters() { | 787 | 11 | _spill_total_timer = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillTotalTime", 1); | 788 | | | 789 | 11 | _spill_write_timer = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteTime", 1); | 790 | | | 791 | 11 | _spill_write_wait_in_queue_task_count = ADD_COUNTER_WITH_LEVEL( | 792 | 11 | Base::custom_profile(), "SpillWriteTaskWaitInQueueCount", TUnit::UNIT, 1); | 793 | 11 | _spill_writing_task_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 794 | 11 | "SpillWriteTaskCount", TUnit::UNIT, 1); | 795 | 11 | _spill_write_wait_in_queue_timer = | 796 | 11 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteTaskWaitInQueueTime", 1); | 797 | | | 798 | 11 | _spill_write_file_timer = | 799 | 11 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteFileTime", 1); | 800 | | | 801 | 11 | _spill_write_serialize_block_timer = | 802 | 11 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteSerializeBlockTime", 1); | 803 | 11 | _spill_write_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 804 | 11 | "SpillWriteBlockCount", TUnit::UNIT, 1); | 805 | 11 | _spill_write_block_data_size = ADD_COUNTER_WITH_LEVEL( | 806 | 11 | Base::custom_profile(), "SpillWriteBlockBytes", TUnit::BYTES, 1); | 807 | 11 | _spill_write_rows_count = | 808 | 11 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillWriteRows", TUnit::UNIT, 1); | 809 | | | 810 | 11 | _spill_max_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 811 | 11 | Base::custom_profile(), "SpillMaxRowsOfPartition", TUnit::UNIT, 1); | 812 | 11 | _spill_min_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 813 | 11 | Base::custom_profile(), "SpillMinRowsOfPartition", TUnit::UNIT, 1); | 814 | 11 | } |
_ZN5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEE19init_spill_countersEv Line | Count | Source | 786 | 5 | void init_spill_counters() { | 787 | 5 | _spill_total_timer = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillTotalTime", 1); | 788 | | | 789 | 5 | _spill_write_timer = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteTime", 1); | 790 | | | 791 | 5 | _spill_write_wait_in_queue_task_count = ADD_COUNTER_WITH_LEVEL( | 792 | 5 | Base::custom_profile(), "SpillWriteTaskWaitInQueueCount", TUnit::UNIT, 1); | 793 | 5 | _spill_writing_task_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 794 | 5 | "SpillWriteTaskCount", TUnit::UNIT, 1); | 795 | 5 | _spill_write_wait_in_queue_timer = | 796 | 5 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteTaskWaitInQueueTime", 1); | 797 | | | 798 | 5 | _spill_write_file_timer = | 799 | 5 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteFileTime", 1); | 800 | | | 801 | 5 | _spill_write_serialize_block_timer = | 802 | 5 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteSerializeBlockTime", 1); | 803 | 5 | _spill_write_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 804 | 5 | "SpillWriteBlockCount", TUnit::UNIT, 1); | 805 | 5 | _spill_write_block_data_size = ADD_COUNTER_WITH_LEVEL( | 806 | 5 | Base::custom_profile(), "SpillWriteBlockBytes", TUnit::BYTES, 1); | 807 | 5 | _spill_write_rows_count = | 808 | 5 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillWriteRows", TUnit::UNIT, 1); | 809 | | | 810 | 5 | _spill_max_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 811 | 5 | Base::custom_profile(), "SpillMaxRowsOfPartition", TUnit::UNIT, 1); | 812 | 5 | _spill_min_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 813 | 5 | Base::custom_profile(), "SpillMinRowsOfPartition", TUnit::UNIT, 1); | 814 | 5 | } |
Unexecuted instantiation: _ZN5doris28PipelineXSpillSinkLocalStateINS_20MultiCastSharedStateEE19init_spill_countersEv _ZN5doris28PipelineXSpillSinkLocalStateINS_20SpillSortSharedStateEE19init_spill_countersEv Line | Count | Source | 786 | 8 | void init_spill_counters() { | 787 | 8 | _spill_total_timer = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillTotalTime", 1); | 788 | | | 789 | 8 | _spill_write_timer = ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteTime", 1); | 790 | | | 791 | 8 | _spill_write_wait_in_queue_task_count = ADD_COUNTER_WITH_LEVEL( | 792 | 8 | Base::custom_profile(), "SpillWriteTaskWaitInQueueCount", TUnit::UNIT, 1); | 793 | 8 | _spill_writing_task_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 794 | 8 | "SpillWriteTaskCount", TUnit::UNIT, 1); | 795 | 8 | _spill_write_wait_in_queue_timer = | 796 | 8 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteTaskWaitInQueueTime", 1); | 797 | | | 798 | 8 | _spill_write_file_timer = | 799 | 8 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteFileTime", 1); | 800 | | | 801 | 8 | _spill_write_serialize_block_timer = | 802 | 8 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteSerializeBlockTime", 1); | 803 | 8 | _spill_write_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 804 | 8 | "SpillWriteBlockCount", TUnit::UNIT, 1); | 805 | 8 | _spill_write_block_data_size = ADD_COUNTER_WITH_LEVEL( | 806 | 8 | Base::custom_profile(), "SpillWriteBlockBytes", TUnit::BYTES, 1); | 807 | 8 | _spill_write_rows_count = | 808 | 8 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillWriteRows", TUnit::UNIT, 1); | 809 | | | 810 | 8 | _spill_max_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 811 | 8 | Base::custom_profile(), "SpillMaxRowsOfPartition", TUnit::UNIT, 1); | 812 | 8 | _spill_min_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 813 | 8 | Base::custom_profile(), "SpillMinRowsOfPartition", TUnit::UNIT, 1); | 814 | 8 | } |
|
815 | | |
816 | 0 | std::vector<Dependency*> dependencies() const override { |
817 | 0 | auto dependencies = Base::dependencies(); |
818 | 0 | return dependencies; |
819 | 0 | } Unexecuted instantiation: _ZNK5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris28PipelineXSpillSinkLocalStateINS_20MultiCastSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris28PipelineXSpillSinkLocalStateINS_20SpillSortSharedStateEE12dependenciesEv |
820 | | |
821 | 24 | void update_max_min_rows_counter() { |
822 | 24 | int64_t max_rows = 0; |
823 | 24 | int64_t min_rows = std::numeric_limits<int64_t>::max(); |
824 | | |
825 | 720 | for (auto rows : _rows_in_partitions) { |
826 | 720 | if (rows > max_rows) { |
827 | 6 | max_rows = rows; |
828 | 6 | } |
829 | 720 | if (rows < min_rows) { |
830 | 26 | min_rows = rows; |
831 | 26 | } |
832 | 720 | } |
833 | | |
834 | 24 | COUNTER_SET(_spill_max_rows_of_partition, max_rows); |
835 | 24 | COUNTER_SET(_spill_min_rows_of_partition, min_rows); |
836 | 24 | } _ZN5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEE27update_max_min_rows_counterEv Line | Count | Source | 821 | 22 | void update_max_min_rows_counter() { | 822 | 22 | int64_t max_rows = 0; | 823 | 22 | int64_t min_rows = std::numeric_limits<int64_t>::max(); | 824 | | | 825 | 704 | for (auto rows : _rows_in_partitions) { | 826 | 704 | if (rows > max_rows) { | 827 | 4 | max_rows = rows; | 828 | 4 | } | 829 | 704 | if (rows < min_rows) { | 830 | 22 | min_rows = rows; | 831 | 22 | } | 832 | 704 | } | 833 | | | 834 | 22 | COUNTER_SET(_spill_max_rows_of_partition, max_rows); | 835 | 22 | COUNTER_SET(_spill_min_rows_of_partition, min_rows); | 836 | 22 | } |
_ZN5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEE27update_max_min_rows_counterEv Line | Count | Source | 821 | 2 | void update_max_min_rows_counter() { | 822 | 2 | int64_t max_rows = 0; | 823 | 2 | int64_t min_rows = std::numeric_limits<int64_t>::max(); | 824 | | | 825 | 16 | for (auto rows : _rows_in_partitions) { | 826 | 16 | if (rows > max_rows) { | 827 | 2 | max_rows = rows; | 828 | 2 | } | 829 | 16 | if (rows < min_rows) { | 830 | 4 | min_rows = rows; | 831 | 4 | } | 832 | 16 | } | 833 | | | 834 | 2 | COUNTER_SET(_spill_max_rows_of_partition, max_rows); | 835 | 2 | COUNTER_SET(_spill_min_rows_of_partition, min_rows); | 836 | 2 | } |
|
837 | | |
838 | | std::vector<int64_t> _rows_in_partitions; |
839 | | |
840 | | // Total time of spill, including spill task scheduling time, |
841 | | // serialize block time, write disk file time, |
842 | | // and read disk file time, deserialize block time etc. |
843 | | RuntimeProfile::Counter* _spill_total_timer = nullptr; |
844 | | |
845 | | // Spill write counters |
846 | | // Total time of spill write, including serialize block time, write disk file, |
847 | | // and wait in queue time, etc. |
848 | | RuntimeProfile::Counter* _spill_write_timer = nullptr; |
849 | | |
850 | | RuntimeProfile::Counter* _spill_write_wait_in_queue_task_count = nullptr; |
851 | | RuntimeProfile::Counter* _spill_writing_task_count = nullptr; |
852 | | RuntimeProfile::Counter* _spill_write_wait_in_queue_timer = nullptr; |
853 | | |
854 | | // Total time of writing file |
855 | | RuntimeProfile::Counter* _spill_write_file_timer = nullptr; |
856 | | RuntimeProfile::Counter* _spill_write_serialize_block_timer = nullptr; |
857 | | // Original count of spilled Blocks |
858 | | // One Big Block maybe split into multiple small Blocks when actually written to disk file. |
859 | | RuntimeProfile::Counter* _spill_write_block_count = nullptr; |
860 | | // Total bytes of spill data in Block format(in memory format) |
861 | | RuntimeProfile::Counter* _spill_write_block_data_size = nullptr; |
862 | | RuntimeProfile::Counter* _spill_write_rows_count = nullptr; |
863 | | // Spilled file total size |
864 | | RuntimeProfile::Counter* _spill_file_total_size = nullptr; |
865 | | |
866 | | RuntimeProfile::Counter* _spill_max_rows_of_partition = nullptr; |
867 | | RuntimeProfile::Counter* _spill_min_rows_of_partition = nullptr; |
868 | | }; |
869 | | |
870 | | class OperatorXBase : public OperatorBase { |
871 | | public: |
872 | | OperatorXBase(ObjectPool* pool, const TPlanNode& tnode, const int operator_id, |
873 | | const DescriptorTbl& descs) |
874 | 72.1k | : OperatorBase(tnode.__isset.is_serial_operator && tnode.is_serial_operator), |
875 | 72.1k | _operator_id(operator_id), |
876 | 72.1k | _node_id(tnode.node_id), |
877 | 72.1k | _type(tnode.node_type), |
878 | 72.1k | _pool(pool), |
879 | 72.1k | _tuple_ids(tnode.row_tuples), |
880 | 72.1k | _row_descriptor(descs, tnode.row_tuples), |
881 | 72.1k | _resource_profile(tnode.resource_profile), |
882 | 72.1k | _limit(tnode.limit) { |
883 | 72.1k | if (tnode.__isset.output_tuple_id) { |
884 | 72.0k | _output_row_descriptor.reset(new RowDescriptor(descs, {tnode.output_tuple_id})); |
885 | 72.0k | _output_row_descriptor = |
886 | 72.0k | std::make_unique<RowDescriptor>(descs, std::vector {tnode.output_tuple_id}); |
887 | 72.0k | } |
888 | 72.1k | if (!tnode.intermediate_output_tuple_id_list.empty()) { |
889 | | // common subexpression elimination |
890 | 0 | _intermediate_output_row_descriptor.reserve( |
891 | 0 | tnode.intermediate_output_tuple_id_list.size()); |
892 | 0 | for (auto output_tuple_id : tnode.intermediate_output_tuple_id_list) { |
893 | 0 | _intermediate_output_row_descriptor.push_back( |
894 | 0 | RowDescriptor(descs, std::vector {output_tuple_id})); |
895 | 0 | } |
896 | 0 | } |
897 | 72.1k | } |
898 | | |
899 | | OperatorXBase(ObjectPool* pool, int node_id, int operator_id) |
900 | 13 | : OperatorBase(), |
901 | 13 | _operator_id(operator_id), |
902 | 13 | _node_id(node_id), |
903 | 13 | _pool(pool), |
904 | 13 | _limit(-1) {} |
905 | | |
906 | | #ifdef BE_TEST |
907 | 144k | OperatorXBase() : _operator_id(-1), _node_id(0), _limit(-1) {}; |
908 | | #endif |
909 | | virtual Status init(const TPlanNode& tnode, RuntimeState* state); |
910 | 0 | Status init(const TDataSink& tsink) override { |
911 | 0 | throw Exception(Status::FatalError("should not reach here!")); |
912 | 0 | } |
913 | 0 | virtual Status init(ExchangeType type) { |
914 | 0 | throw Exception(Status::FatalError("should not reach here!")); |
915 | 0 | } |
916 | 0 | [[noreturn]] virtual const std::vector<TRuntimeFilterDesc>& runtime_filter_descs() { |
917 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, _op_name); |
918 | 0 | } |
919 | 49.3k | [[nodiscard]] std::string get_name() const override { return _op_name; } |
920 | 898k | [[nodiscard]] virtual bool need_more_input_data(RuntimeState* state) const { return true; } |
921 | 0 | bool is_blockable(RuntimeState* state) const override { |
922 | 0 | return state->get_sink_local_state()->is_blockable() || _blockable; |
923 | 0 | } |
924 | | |
925 | | Status prepare(RuntimeState* state) override; |
926 | | |
927 | | Status terminate(RuntimeState* state) override; |
928 | | [[nodiscard]] virtual Status get_block(RuntimeState* state, Block* block, bool* eos) = 0; |
929 | | |
930 | | Status close(RuntimeState* state) override; |
931 | | |
932 | 24.2k | [[nodiscard]] virtual const RowDescriptor& intermediate_row_desc() const { |
933 | 24.2k | return _row_descriptor; |
934 | 24.2k | } |
935 | | |
936 | 0 | [[nodiscard]] const RowDescriptor& intermediate_row_desc(int idx) { |
937 | 0 | if (idx == 0) { |
938 | 0 | return intermediate_row_desc(); |
939 | 0 | } |
940 | 0 | DCHECK((idx - 1) < _intermediate_output_row_descriptor.size()); |
941 | 0 | return _intermediate_output_row_descriptor[idx - 1]; |
942 | 0 | } |
943 | | |
944 | 48.1k | [[nodiscard]] const RowDescriptor& projections_row_desc() const { |
945 | 48.1k | if (_intermediate_output_row_descriptor.empty()) { |
946 | 48.1k | return intermediate_row_desc(); |
947 | 48.1k | } else { |
948 | 0 | return _intermediate_output_row_descriptor.back(); |
949 | 0 | } |
950 | 48.1k | } |
951 | | |
952 | 3 | size_t revocable_mem_size(RuntimeState* state) const override { |
953 | 3 | return (_child and !is_source()) ? _child->revocable_mem_size(state) : 0; |
954 | 3 | } |
955 | | |
956 | | // If this method is not overwrite by child, its default value is 1MB |
957 | 3 | [[nodiscard]] virtual size_t get_reserve_mem_size(RuntimeState* state) { |
958 | 3 | return state->minimum_operator_memory_required_bytes(); |
959 | 3 | } |
960 | | |
961 | | virtual std::string debug_string(int indentation_level = 0) const; |
962 | | |
963 | | virtual std::string debug_string(RuntimeState* state, int indentation_level = 0) const; |
964 | | |
965 | | virtual Status setup_local_state(RuntimeState* state, LocalStateInfo& info) = 0; |
966 | | |
967 | | template <class TARGET> |
968 | 96.7k | TARGET& cast() { |
969 | 96.7k | DCHECK(dynamic_cast<TARGET*>(this)) |
970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() |
971 | 0 | << " and expect type is" << typeid(TARGET).name(); |
972 | 96.7k | return reinterpret_cast<TARGET&>(*this); |
973 | 96.7k | } _ZN5doris13OperatorXBase4castINS_22TableFunctionOperatorXEEERT_v Line | Count | Source | 968 | 115 | TARGET& cast() { | 969 | 115 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 115 | return reinterpret_cast<TARGET&>(*this); | 973 | 115 | } |
_ZN5doris13OperatorXBase4castINS_13DummyOperatorEEERT_v Line | Count | Source | 968 | 21 | TARGET& cast() { | 969 | 21 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 21 | return reinterpret_cast<TARGET&>(*this); | 973 | 21 | } |
_ZN5doris13OperatorXBase4castINS_23ExchangeSourceOperatorXEEERT_v Line | Count | Source | 968 | 23 | TARGET& cast() { | 969 | 23 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 23 | return reinterpret_cast<TARGET&>(*this); | 973 | 23 | } |
_ZN5doris13OperatorXBase4castINS_18AggSourceOperatorXEEERT_v Line | Count | Source | 968 | 48 | TARGET& cast() { | 969 | 48 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 48 | return reinterpret_cast<TARGET&>(*this); | 973 | 48 | } |
_ZN5doris13OperatorXBase4castINS_20CacheSourceOperatorXEEERT_v Line | Count | Source | 968 | 6 | TARGET& cast() { | 969 | 6 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 6 | return reinterpret_cast<TARGET&>(*this); | 973 | 6 | } |
_ZN5doris13OperatorXBase4castINS_22DataGenSourceOperatorXEEERT_v Line | Count | Source | 968 | 3 | TARGET& cast() { | 969 | 3 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 3 | return reinterpret_cast<TARGET&>(*this); | 973 | 3 | } |
_ZN5doris13OperatorXBase4castINS_29DistinctStreamingAggOperatorXEEERT_v Line | Count | Source | 968 | 30 | TARGET& cast() { | 969 | 30 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 30 | return reinterpret_cast<TARGET&>(*this); | 973 | 30 | } |
_ZN5doris13OperatorXBase4castINS_17FileScanOperatorXEEERT_v Line | Count | Source | 968 | 11 | TARGET& cast() { | 969 | 11 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 11 | return reinterpret_cast<TARGET&>(*this); | 973 | 11 | } |
_ZN5doris13OperatorXBase4castINS_22HashJoinProbeOperatorXEEERT_v Line | Count | Source | 968 | 96.1k | TARGET& cast() { | 969 | 96.1k | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 96.1k | return reinterpret_cast<TARGET&>(*this); | 973 | 96.1k | } |
Unexecuted instantiation: _ZN5doris13OperatorXBase4castINS_28NestedLoopJoinProbeOperatorXEEERT_v _ZN5doris13OperatorXBase4castINS_33PartitionedHashJoinProbeOperatorXEEERT_v Line | Count | Source | 968 | 9 | TARGET& cast() { | 969 | 9 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 9 | return reinterpret_cast<TARGET&>(*this); | 973 | 9 | } |
_ZN5doris13OperatorXBase4castINS_29LocalMergeSortSourceOperatorXEEERT_v Line | Count | Source | 968 | 4 | TARGET& cast() { | 969 | 4 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 4 | return reinterpret_cast<TARGET&>(*this); | 973 | 4 | } |
_ZN5doris13OperatorXBase4castINS_17OlapScanOperatorXEEERT_v Line | Count | Source | 968 | 25 | TARGET& cast() { | 969 | 25 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 25 | return reinterpret_cast<TARGET&>(*this); | 973 | 25 | } |
Unexecuted instantiation: _ZN5doris13OperatorXBase4castINS_20GroupCommitOperatorXEEERT_v Unexecuted instantiation: _ZN5doris13OperatorXBase4castINS_17JDBCScanOperatorXEEERT_v Unexecuted instantiation: _ZN5doris13OperatorXBase4castINS_15EsScanOperatorXEEERT_v Unexecuted instantiation: _ZN5doris13OperatorXBase4castINS_36MultiCastDataStreamerSourceOperatorXEEERT_v Unexecuted instantiation: _ZN5doris13OperatorXBase4castINS_17MetaScanOperatorXEEERT_v _ZN5doris13OperatorXBase4castINS_29PartitionedAggSourceOperatorXEEERT_v Line | Count | Source | 968 | 5 | TARGET& cast() { | 969 | 5 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 5 | return reinterpret_cast<TARGET&>(*this); | 973 | 5 | } |
Unexecuted instantiation: _ZN5doris13OperatorXBase4castINS_21RecCTESourceOperatorXEEERT_v _ZN5doris13OperatorXBase4castINS_15RepeatOperatorXEEERT_v Line | Count | Source | 968 | 13 | TARGET& cast() { | 969 | 13 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 13 | return reinterpret_cast<TARGET&>(*this); | 973 | 13 | } |
_ZN5doris13OperatorXBase4castINS_17MockScanOperatorXEEERT_v Line | Count | Source | 968 | 101 | TARGET& cast() { | 969 | 101 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 101 | return reinterpret_cast<TARGET&>(*this); | 973 | 101 | } |
Unexecuted instantiation: _ZN5doris13OperatorXBase4castINS_19SchemaScanOperatorXEEERT_v _ZN5doris13OperatorXBase4castINS_18SetSourceOperatorXILb1EEEEERT_v Line | Count | Source | 968 | 12 | TARGET& cast() { | 969 | 12 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 12 | return reinterpret_cast<TARGET&>(*this); | 973 | 12 | } |
_ZN5doris13OperatorXBase4castINS_18SetSourceOperatorXILb0EEEEERT_v Line | Count | Source | 968 | 8 | TARGET& cast() { | 969 | 8 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 8 | return reinterpret_cast<TARGET&>(*this); | 973 | 8 | } |
_ZN5doris13OperatorXBase4castINS_24SpillSortSourceOperatorXEEERT_v Line | Count | Source | 968 | 8 | TARGET& cast() { | 969 | 8 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 8 | return reinterpret_cast<TARGET&>(*this); | 973 | 8 | } |
_ZN5doris13OperatorXBase4castINS_21StreamingAggOperatorXEEERT_v Line | Count | Source | 968 | 64 | TARGET& cast() { | 969 | 64 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 64 | return reinterpret_cast<TARGET&>(*this); | 973 | 64 | } |
_ZN5doris13OperatorXBase4castINS_20UnionSourceOperatorXEEERT_v Line | Count | Source | 968 | 6 | TARGET& cast() { | 969 | 6 | DCHECK(dynamic_cast<TARGET*>(this)) | 970 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 971 | 0 | << " and expect type is" << typeid(TARGET).name(); | 972 | 6 | return reinterpret_cast<TARGET&>(*this); | 973 | 6 | } |
|
974 | | template <class TARGET> |
975 | | const TARGET& cast() const { |
976 | | DCHECK(dynamic_cast<const TARGET*>(this)) |
977 | | << " Mismatch type! Current type is " << typeid(*this).name() |
978 | | << " and expect type is" << typeid(TARGET).name(); |
979 | | return reinterpret_cast<const TARGET&>(*this); |
980 | | } |
981 | | |
982 | 54 | [[nodiscard]] OperatorPtr get_child() { return _child; } |
983 | | |
984 | 0 | [[nodiscard]] VExprContextSPtrs& conjuncts() { return _conjuncts; } |
985 | 0 | [[nodiscard]] VExprContextSPtrs& projections() { return _projections; } |
986 | 6 | [[nodiscard]] virtual RowDescriptor& row_descriptor() { return _row_descriptor; } |
987 | | |
988 | 2.86M | [[nodiscard]] int operator_id() const { return _operator_id; } |
989 | 127k | [[nodiscard]] int node_id() const override { return _node_id; } |
990 | 48.3k | [[nodiscard]] int nereids_id() const { return _nereids_id; } |
991 | | |
992 | 0 | [[nodiscard]] int64_t limit() const { return _limit; } |
993 | | |
994 | 1.28M | [[nodiscard]] const RowDescriptor& row_desc() const override { |
995 | 1.28M | return _output_row_descriptor ? *_output_row_descriptor : _row_descriptor; |
996 | 1.28M | } |
997 | | |
998 | 12 | [[nodiscard]] const RowDescriptor* output_row_descriptor() { |
999 | 12 | return _output_row_descriptor.get(); |
1000 | 12 | } |
1001 | | |
1002 | 48.1k | bool has_output_row_desc() const { return _output_row_descriptor != nullptr; } |
1003 | | |
1004 | | [[nodiscard]] virtual Status get_block_after_projects(RuntimeState* state, Block* block, |
1005 | | bool* eos); |
1006 | | |
1007 | | /// Only use in vectorized exec engine try to do projections to trans _row_desc -> _output_row_desc |
1008 | | Status do_projections(RuntimeState* state, Block* origin_block, Block* output_block) const; |
1009 | 144k | void set_parallel_tasks(int parallel_tasks) { _parallel_tasks = parallel_tasks; } |
1010 | 0 | int parallel_tasks() const { return _parallel_tasks; } |
1011 | | |
1012 | | // To keep compatibility with older FE |
1013 | 1 | void set_serial_operator() { _is_serial_operator = true; } |
1014 | | |
1015 | 0 | virtual void reset_reserve_mem_size(RuntimeState* state) {} |
1016 | | |
1017 | | protected: |
1018 | | template <typename Dependency> |
1019 | | friend class PipelineXLocalState; |
1020 | | friend class PipelineXLocalStateBase; |
1021 | | friend class Scanner; |
1022 | | const int _operator_id; |
1023 | | const int _node_id; // unique w/in single plan tree |
1024 | | int _nereids_id = -1; |
1025 | | TPlanNodeType::type _type; |
1026 | | ObjectPool* _pool = nullptr; |
1027 | | std::vector<TupleId> _tuple_ids; |
1028 | | |
1029 | | private: |
1030 | | // The expr of operator set to private permissions, as cannot be executed concurrently, |
1031 | | // should use local state's expr. |
1032 | | VExprContextSPtrs _conjuncts; |
1033 | | VExprContextSPtrs _projections; |
1034 | | // Used in common subexpression elimination to compute intermediate results. |
1035 | | std::vector<VExprContextSPtrs> _intermediate_projections; |
1036 | | |
1037 | | protected: |
1038 | | RowDescriptor _row_descriptor; |
1039 | | std::unique_ptr<RowDescriptor> _output_row_descriptor = nullptr; |
1040 | | std::vector<RowDescriptor> _intermediate_output_row_descriptor; |
1041 | | |
1042 | | /// Resource information sent from the frontend. |
1043 | | const TBackendResourceProfile _resource_profile; |
1044 | | |
1045 | | int64_t _limit; // -1: no limit |
1046 | | |
1047 | | uint32_t _debug_point_count = 0; |
1048 | | std::atomic_uint32_t _bytes_per_row = 0; |
1049 | | |
1050 | | std::string _op_name; |
1051 | | int _parallel_tasks = 0; |
1052 | | |
1053 | | //_keep_origin is used to avoid copying during projection, |
1054 | | // currently set to false only in the nestloop join. |
1055 | | bool _keep_origin = true; |
1056 | | |
1057 | | // _blockable is true if the operator contains expressions that may block execution |
1058 | | bool _blockable = false; |
1059 | | }; |
1060 | | |
1061 | | template <typename LocalStateType> |
1062 | | class OperatorX : public OperatorXBase { |
1063 | | public: |
1064 | | OperatorX(ObjectPool* pool, const TPlanNode& tnode, const int operator_id, |
1065 | | const DescriptorTbl& descs) |
1066 | 72.1k | : OperatorXBase(pool, tnode, operator_id, descs) {}Unexecuted instantiation: _ZN5doris9OperatorXINS_23DummyOperatorLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris9OperatorXINS_14MockLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1066 | 3 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_13AggLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1066 | 12 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
Unexecuted instantiation: _ZN5doris9OperatorXINS_18AnalyticLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_17DataGenLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris9OperatorXINS_18ExchangeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1066 | 4 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1066 | 72.0k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
Unexecuted instantiation: _ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1066 | 30 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
Unexecuted instantiation: _ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris9OperatorXINS_18OlapScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1066 | 13 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
Unexecuted instantiation: _ZN5doris9OperatorXINS_21GroupCommitLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris9OperatorXINS_18FileScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1066 | 2 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
Unexecuted instantiation: _ZN5doris9OperatorXINS_16EsScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris9OperatorXINS_14SortLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1066 | 11 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_19SpillSortLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1066 | 10 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1066 | 12 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1066 | 2 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
Unexecuted instantiation: _ZN5doris9OperatorXINS_16RepeatLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_18EmptySetLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_21UnionSourceLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_20SchemaScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_18MetaScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_21CacheSourceLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_22RecCTESourceLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_20RecCTEScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_18MockScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_16SelectLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_25MaterializationLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris9OperatorXINS_22StreamingAggLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE |
1067 | | OperatorX(ObjectPool* pool, int node_id, int operator_id) |
1068 | 13 | : OperatorXBase(pool, node_id, operator_id) {};_ZN5doris9OperatorXINS_23DummyOperatorLocalStateEEC2EPNS_10ObjectPoolEii Line | Count | Source | 1068 | 13 | : OperatorXBase(pool, node_id, operator_id) {}; |
Unexecuted instantiation: _ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_18OlapScanLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_21GroupCommitLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_18FileScanLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_16EsScanLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_18AnalyticLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_14SortLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_19SpillSortLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_13AggLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_24PartitionedAggLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_23TableFunctionLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_18ExchangeLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_16RepeatLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_18EmptySetLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_21UnionSourceLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_17DataGenLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_20SchemaScanLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_18MetaScanLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_21CacheSourceLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_22RecCTESourceLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_20RecCTEScanLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_14MockLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_18MockScanLocalStateEEC2EPNS_10ObjectPoolEii |
1069 | | |
1070 | | #ifdef BE_TEST |
1071 | 223 | OperatorX() = default; _ZN5doris9OperatorXINS_13AggLocalStateEEC2Ev Line | Count | Source | 1071 | 27 | OperatorX() = default; |
_ZN5doris9OperatorXINS_18AnalyticLocalStateEEC2Ev Line | Count | Source | 1071 | 9 | OperatorX() = default; |
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEEC2Ev Line | Count | Source | 1071 | 3 | OperatorX() = default; |
_ZN5doris9OperatorXINS_14MockLocalStateEEC2Ev Line | Count | Source | 1071 | 16 | OperatorX() = default; |
_ZN5doris9OperatorXINS_17DataGenLocalStateEEC2Ev Line | Count | Source | 1071 | 3 | OperatorX() = default; |
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEEC2Ev Line | Count | Source | 1071 | 3 | OperatorX() = default; |
_ZN5doris9OperatorXINS_18EmptySetLocalStateEEC2Ev Line | Count | Source | 1071 | 1 | OperatorX() = default; |
_ZN5doris9OperatorXINS_18ExchangeLocalStateEEC2Ev Line | Count | Source | 1071 | 2 | OperatorX() = default; |
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEEC2Ev Line | Count | Source | 1071 | 1 | OperatorX() = default; |
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEEC2Ev Line | Count | Source | 1071 | 102 | OperatorX() = default; |
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEEC2Ev Line | Count | Source | 1071 | 3 | OperatorX() = default; |
_ZN5doris9OperatorXINS_16RepeatLocalStateEEC2Ev Line | Count | Source | 1071 | 3 | OperatorX() = default; |
_ZN5doris9OperatorXINS_18MockScanLocalStateEEC2Ev Line | Count | Source | 1071 | 21 | OperatorX() = default; |
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEEC2Ev Line | Count | Source | 1071 | 6 | OperatorX() = default; |
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEEC2Ev Line | Count | Source | 1071 | 4 | OperatorX() = default; |
_ZN5doris9OperatorXINS_14SortLocalStateEEC2Ev Line | Count | Source | 1071 | 9 | OperatorX() = default; |
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEEC2Ev Line | Count | Source | 1071 | 4 | OperatorX() = default; |
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEEC2Ev Line | Count | Source | 1071 | 4 | OperatorX() = default; |
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEEC2Ev Line | Count | Source | 1071 | 2 | OperatorX() = default; |
|
1072 | | #endif |
1073 | | |
1074 | 72.3k | ~OperatorX() override = default; _ZN5doris9OperatorXINS_13AggLocalStateEED2Ev Line | Count | Source | 1074 | 39 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_18AnalyticLocalStateEED2Ev Line | Count | Source | 1074 | 9 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEED2Ev Line | Count | Source | 1074 | 3 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_14MockLocalStateEED2Ev Line | Count | Source | 1074 | 19 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_17DataGenLocalStateEED2Ev Line | Count | Source | 1074 | 3 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEED2Ev Line | Count | Source | 1074 | 3 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_18EmptySetLocalStateEED2Ev Line | Count | Source | 1074 | 1 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_18ExchangeLocalStateEED2Ev Line | Count | Source | 1074 | 6 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEED2Ev Line | Count | Source | 1074 | 1 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEED2Ev Line | Count | Source | 1074 | 102 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEED2Ev Line | Count | Source | 1074 | 72.0k | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEED2Ev Line | Count | Source | 1074 | 30 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEED2Ev Line | Count | Source | 1074 | 3 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_16RepeatLocalStateEED2Ev Line | Count | Source | 1074 | 3 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_18MockScanLocalStateEED2Ev Line | Count | Source | 1074 | 21 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEED2Ev Line | Count | Source | 1074 | 6 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEED2Ev Line | Count | Source | 1074 | 4 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_14SortLocalStateEED2Ev Line | Count | Source | 1074 | 20 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEED2Ev Line | Count | Source | 1074 | 4 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEED2Ev Line | Count | Source | 1074 | 6 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEED2Ev Line | Count | Source | 1074 | 2 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_23DummyOperatorLocalStateEED2Ev Line | Count | Source | 1074 | 13 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_18OlapScanLocalStateEED2Ev Line | Count | Source | 1074 | 13 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_18FileScanLocalStateEED2Ev Line | Count | Source | 1074 | 2 | ~OperatorX() override = default; |
Unexecuted instantiation: _ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEED2Ev Unexecuted instantiation: _ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEED2Ev Unexecuted instantiation: _ZN5doris9OperatorXINS_25MaterializationLocalStateEED2Ev Unexecuted instantiation: _ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEED2Ev Unexecuted instantiation: _ZN5doris9OperatorXINS_20RecCTEScanLocalStateEED2Ev Unexecuted instantiation: _ZN5doris9OperatorXINS_22RecCTESourceLocalStateEED2Ev Unexecuted instantiation: _ZN5doris9OperatorXINS_16SelectLocalStateEED2Ev Unexecuted instantiation: _ZN5doris9OperatorXINS_21GroupCommitLocalStateEED2Ev Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEED2Ev Unexecuted instantiation: _ZN5doris9OperatorXINS_16EsScanLocalStateEED2Ev _ZN5doris9OperatorXINS_19SpillSortLocalStateEED2Ev Line | Count | Source | 1074 | 10 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEED2Ev Line | Count | Source | 1074 | 12 | ~OperatorX() override = default; |
Unexecuted instantiation: _ZN5doris9OperatorXINS_20SchemaScanLocalStateEED2Ev Unexecuted instantiation: _ZN5doris9OperatorXINS_18MetaScanLocalStateEED2Ev |
1075 | | |
1076 | | Status setup_local_state(RuntimeState* state, LocalStateInfo& info) override; |
1077 | | using LocalState = LocalStateType; |
1078 | 1.79M | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { |
1079 | 1.79M | return state->get_local_state(operator_id())->template cast<LocalState>(); |
1080 | 1.79M | } _ZNK5doris9OperatorXINS_23DummyOperatorLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 1.79M | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 1.79M | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 1.79M | } |
_ZNK5doris9OperatorXINS_13AggLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 50 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 50 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 50 | } |
_ZNK5doris9OperatorXINS_18AnalyticLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 46 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 46 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 46 | } |
_ZNK5doris9OperatorXINS_23AssertNumRowsLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 4 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 4 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 4 | } |
Unexecuted instantiation: _ZNK5doris9OperatorXINS_14MockLocalStateEE15get_local_stateEPNS_12RuntimeStateE _ZNK5doris9OperatorXINS_17DataGenLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 3 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 3 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 3 | } |
_ZNK5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 24 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 24 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 24 | } |
Unexecuted instantiation: _ZNK5doris9OperatorXINS_18EmptySetLocalStateEE15get_local_stateEPNS_12RuntimeStateE _ZNK5doris9OperatorXINS_18ExchangeLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 39 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 39 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 39 | } |
_ZNK5doris9OperatorXINS_23HashJoinProbeLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 178 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 178 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 178 | } |
_ZNK5doris9OperatorXINS_24LocalMergeSortLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 6 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 6 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 6 | } |
Unexecuted instantiation: _ZNK5doris9OperatorXINS_25MaterializationLocalStateEE15get_local_stateEPNS_12RuntimeStateE _ZNK5doris9OperatorXINS_29PartitionSortSourceLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 402 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 402 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 402 | } |
_ZNK5doris9OperatorXINS_24PartitionedAggLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 15 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 15 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 15 | } |
_ZNK5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 46 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 46 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 46 | } |
_ZNK5doris9OperatorXINS_21CacheSourceLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 6 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 6 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 6 | } |
_ZNK5doris9OperatorXINS_16RepeatLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 9 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 9 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 9 | } |
Unexecuted instantiation: _ZNK5doris9OperatorXINS_18MockScanLocalStateEE15get_local_stateEPNS_12RuntimeStateE _ZNK5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 6 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 6 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 6 | } |
_ZNK5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 5 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 5 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 5 | } |
_ZNK5doris9OperatorXINS_14SortLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 33 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 33 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 33 | } |
_ZNK5doris9OperatorXINS_19SpillSortLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 15 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 15 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 15 | } |
_ZNK5doris9OperatorXINS_22StreamingAggLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 21 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 21 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 21 | } |
_ZNK5doris9OperatorXINS_23TableFunctionLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 16 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 16 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 16 | } |
_ZNK5doris9OperatorXINS_21UnionSourceLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1078 | 37 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1079 | 37 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1080 | 37 | } |
Unexecuted instantiation: _ZNK5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris9OperatorXINS_18OlapScanLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris9OperatorXINS_18FileScanLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris9OperatorXINS_21GroupCommitLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris9OperatorXINS_18JDBCScanLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris9OperatorXINS_16EsScanLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris9OperatorXINS_20SchemaScanLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris9OperatorXINS_18MetaScanLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris9OperatorXINS_22RecCTESourceLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris9OperatorXINS_20RecCTEScanLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris9OperatorXINS_16SelectLocalStateEE15get_local_stateEPNS_12RuntimeStateE |
1081 | | |
1082 | 897k | size_t get_reserve_mem_size(RuntimeState* state) override { |
1083 | 897k | auto& local_state = get_local_state(state); |
1084 | 897k | auto estimated_size = local_state.estimate_memory_usage(); |
1085 | 897k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { |
1086 | 897k | estimated_size = state->minimum_operator_memory_required_bytes(); |
1087 | 897k | } |
1088 | 897k | if (!is_source() && _child) { |
1089 | 6 | auto child_reserve_size = _child->get_reserve_mem_size(state); |
1090 | 6 | estimated_size += |
1091 | 6 | std::max(state->minimum_operator_memory_required_bytes(), child_reserve_size); |
1092 | 6 | } |
1093 | 897k | return estimated_size; |
1094 | 897k | } _ZN5doris9OperatorXINS_23DummyOperatorLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1082 | 897k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1083 | 897k | auto& local_state = get_local_state(state); | 1084 | 897k | auto estimated_size = local_state.estimate_memory_usage(); | 1085 | 897k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1086 | 897k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1087 | 897k | } | 1088 | 897k | if (!is_source() && _child) { | 1089 | 0 | auto child_reserve_size = _child->get_reserve_mem_size(state); | 1090 | 0 | estimated_size += | 1091 | 0 | std::max(state->minimum_operator_memory_required_bytes(), child_reserve_size); | 1092 | 0 | } | 1093 | 897k | return estimated_size; | 1094 | 897k | } |
Unexecuted instantiation: _ZN5doris9OperatorXINS_13AggLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_18AnalyticLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_14MockLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_17DataGenLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_18EmptySetLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE _ZN5doris9OperatorXINS_18ExchangeLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1082 | 11 | size_t get_reserve_mem_size(RuntimeState* state) override { | 1083 | 11 | auto& local_state = get_local_state(state); | 1084 | 11 | auto estimated_size = local_state.estimate_memory_usage(); | 1085 | 11 | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1086 | 11 | estimated_size = state->minimum_operator_memory_required_bytes(); | 1087 | 11 | } | 1088 | 11 | if (!is_source() && _child) { | 1089 | 0 | auto child_reserve_size = _child->get_reserve_mem_size(state); | 1090 | 0 | estimated_size += | 1091 | 0 | std::max(state->minimum_operator_memory_required_bytes(), child_reserve_size); | 1092 | 0 | } | 1093 | 11 | return estimated_size; | 1094 | 11 | } |
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1082 | 4 | size_t get_reserve_mem_size(RuntimeState* state) override { | 1083 | 4 | auto& local_state = get_local_state(state); | 1084 | 4 | auto estimated_size = local_state.estimate_memory_usage(); | 1085 | 4 | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1086 | 4 | estimated_size = state->minimum_operator_memory_required_bytes(); | 1087 | 4 | } | 1088 | 4 | if (!is_source() && _child) { | 1089 | 4 | auto child_reserve_size = _child->get_reserve_mem_size(state); | 1090 | 4 | estimated_size += | 1091 | 4 | std::max(state->minimum_operator_memory_required_bytes(), child_reserve_size); | 1092 | 4 | } | 1093 | 4 | return estimated_size; | 1094 | 4 | } |
Unexecuted instantiation: _ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_25MaterializationLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1082 | 2 | size_t get_reserve_mem_size(RuntimeState* state) override { | 1083 | 2 | auto& local_state = get_local_state(state); | 1084 | 2 | auto estimated_size = local_state.estimate_memory_usage(); | 1085 | 2 | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1086 | 2 | estimated_size = state->minimum_operator_memory_required_bytes(); | 1087 | 2 | } | 1088 | 2 | if (!is_source() && _child) { | 1089 | 2 | auto child_reserve_size = _child->get_reserve_mem_size(state); | 1090 | 2 | estimated_size += | 1091 | 2 | std::max(state->minimum_operator_memory_required_bytes(), child_reserve_size); | 1092 | 2 | } | 1093 | 2 | return estimated_size; | 1094 | 2 | } |
Unexecuted instantiation: _ZN5doris9OperatorXINS_21CacheSourceLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_16RepeatLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_18MockScanLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_14SortLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_19SpillSortLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_22StreamingAggLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_23TableFunctionLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_21UnionSourceLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_18OlapScanLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_18FileScanLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_21GroupCommitLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_16EsScanLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_20SchemaScanLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_18MetaScanLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_16SelectLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE |
1095 | | |
1096 | 897k | void reset_reserve_mem_size(RuntimeState* state) override { |
1097 | 897k | auto& local_state = get_local_state(state); |
1098 | 897k | local_state.reset_estimate_memory_usage(); |
1099 | | |
1100 | 897k | if (!is_source() && _child) { |
1101 | 4 | _child->reset_reserve_mem_size(state); |
1102 | 4 | } |
1103 | 897k | } _ZN5doris9OperatorXINS_23DummyOperatorLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1096 | 897k | void reset_reserve_mem_size(RuntimeState* state) override { | 1097 | 897k | auto& local_state = get_local_state(state); | 1098 | 897k | local_state.reset_estimate_memory_usage(); | 1099 | | | 1100 | 897k | if (!is_source() && _child) { | 1101 | 0 | _child->reset_reserve_mem_size(state); | 1102 | 0 | } | 1103 | 897k | } |
Unexecuted instantiation: _ZN5doris9OperatorXINS_13AggLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_18AnalyticLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_14MockLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_17DataGenLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_18EmptySetLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE _ZN5doris9OperatorXINS_18ExchangeLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1096 | 11 | void reset_reserve_mem_size(RuntimeState* state) override { | 1097 | 11 | auto& local_state = get_local_state(state); | 1098 | 11 | local_state.reset_estimate_memory_usage(); | 1099 | | | 1100 | 11 | if (!is_source() && _child) { | 1101 | 0 | _child->reset_reserve_mem_size(state); | 1102 | 0 | } | 1103 | 11 | } |
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1096 | 4 | void reset_reserve_mem_size(RuntimeState* state) override { | 1097 | 4 | auto& local_state = get_local_state(state); | 1098 | 4 | local_state.reset_estimate_memory_usage(); | 1099 | | | 1100 | 4 | if (!is_source() && _child) { | 1101 | 4 | _child->reset_reserve_mem_size(state); | 1102 | 4 | } | 1103 | 4 | } |
Unexecuted instantiation: _ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_25MaterializationLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_21CacheSourceLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_16RepeatLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_18MockScanLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_14SortLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_19SpillSortLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_22StreamingAggLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_23TableFunctionLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_21UnionSourceLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_18OlapScanLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_18FileScanLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_21GroupCommitLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_16EsScanLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_20SchemaScanLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_18MetaScanLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_16SelectLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE |
1104 | | }; |
1105 | | |
1106 | | /** |
1107 | | * StreamingOperatorX indicates operators which always processes block in streaming way (one-in-one-out). |
1108 | | */ |
1109 | | template <typename LocalStateType> |
1110 | | class StreamingOperatorX : public OperatorX<LocalStateType> { |
1111 | | public: |
1112 | | StreamingOperatorX(ObjectPool* pool, const TPlanNode& tnode, int operator_id, |
1113 | | const DescriptorTbl& descs) |
1114 | 0 | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {}Unexecuted instantiation: _ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris18StreamingOperatorXINS_16SelectLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE |
1115 | | |
1116 | | #ifdef BE_TEST |
1117 | 3 | StreamingOperatorX() = default; |
1118 | | #endif |
1119 | | |
1120 | 3 | virtual ~StreamingOperatorX() = default; _ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEED2Ev Line | Count | Source | 1120 | 3 | virtual ~StreamingOperatorX() = default; |
Unexecuted instantiation: _ZN5doris18StreamingOperatorXINS_16SelectLocalStateEED2Ev |
1121 | | |
1122 | | Status get_block(RuntimeState* state, Block* block, bool* eos) override; |
1123 | | |
1124 | | virtual Status pull(RuntimeState* state, Block* block, bool* eos) = 0; |
1125 | | }; |
1126 | | |
1127 | | /** |
1128 | | * StatefulOperatorX indicates the operators with some states inside. |
1129 | | * |
1130 | | * Specifically, we called an operator stateful if an operator can determine its output by itself. |
1131 | | * For example, hash join probe operator is a typical StatefulOperator. When it gets a block from probe side, it will hold this block inside (e.g. _child_block). |
1132 | | * If there are still remain rows in probe block, we can get output block by calling `get_block` without any data from its child. |
1133 | | * In a nutshell, it is a one-to-many relation between input blocks and output blocks for StatefulOperator. |
1134 | | */ |
1135 | | template <typename LocalStateType> |
1136 | | class StatefulOperatorX : public OperatorX<LocalStateType> { |
1137 | | public: |
1138 | | StatefulOperatorX(ObjectPool* pool, const TPlanNode& tnode, const int operator_id, |
1139 | | const DescriptorTbl& descs) |
1140 | 72.0k | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {}Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1140 | 72.0k | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {} |
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1140 | 30 | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {} |
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1140 | 2 | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {} |
|
1141 | | #ifdef BE_TEST |
1142 | 14 | StatefulOperatorX() = default; _ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEEC2Ev Line | Count | Source | 1142 | 3 | StatefulOperatorX() = default; |
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEEC2Ev Line | Count | Source | 1142 | 3 | StatefulOperatorX() = default; |
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEEC2Ev Line | Count | Source | 1142 | 4 | StatefulOperatorX() = default; |
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEEC2Ev Line | Count | Source | 1142 | 4 | StatefulOperatorX() = default; |
|
1143 | | #endif |
1144 | 72.1k | virtual ~StatefulOperatorX() = default; _ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEED2Ev Line | Count | Source | 1144 | 3 | virtual ~StatefulOperatorX() = default; |
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEED2Ev Line | Count | Source | 1144 | 72.0k | virtual ~StatefulOperatorX() = default; |
_ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEED2Ev Line | Count | Source | 1144 | 30 | virtual ~StatefulOperatorX() = default; |
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEED2Ev Line | Count | Source | 1144 | 3 | virtual ~StatefulOperatorX() = default; |
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEED2Ev Line | Count | Source | 1144 | 4 | virtual ~StatefulOperatorX() = default; |
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEED2Ev Line | Count | Source | 1144 | 6 | virtual ~StatefulOperatorX() = default; |
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEED2Ev |
1145 | | |
1146 | | using OperatorX<LocalStateType>::get_local_state; |
1147 | | |
1148 | | [[nodiscard]] Status get_block(RuntimeState* state, Block* block, bool* eos) override; |
1149 | | |
1150 | | [[nodiscard]] virtual Status pull(RuntimeState* state, Block* block, bool* eos) const = 0; |
1151 | | [[nodiscard]] virtual Status push(RuntimeState* state, Block* input_block, bool eos) const = 0; |
1152 | 0 | bool need_more_input_data(RuntimeState* state) const override { return true; }Unexecuted instantiation: _ZNK5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE20need_more_input_dataEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE20need_more_input_dataEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17StatefulOperatorXINS_25MaterializationLocalStateEE20need_more_input_dataEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE20need_more_input_dataEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17StatefulOperatorXINS_16RepeatLocalStateEE20need_more_input_dataEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE20need_more_input_dataEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE20need_more_input_dataEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE20need_more_input_dataEPNS_12RuntimeStateE |
1153 | | }; |
1154 | | |
1155 | | template <typename Writer, typename Parent> |
1156 | | requires(std::is_base_of_v<AsyncResultWriter, Writer>) |
1157 | | class AsyncWriterSink : public PipelineXSinkLocalState<BasicSharedState> { |
1158 | | public: |
1159 | | using Base = PipelineXSinkLocalState<BasicSharedState>; |
1160 | | AsyncWriterSink(DataSinkOperatorXBase* parent, RuntimeState* state) |
1161 | 0 | : Base(parent, state), _async_writer_dependency(nullptr) { |
1162 | 0 | _finish_dependency = |
1163 | 0 | std::make_shared<Dependency>(parent->operator_id(), parent->node_id(), |
1164 | 0 | parent->get_name() + "_FINISH_DEPENDENCY", true); |
1165 | 0 | } Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE |
1166 | | |
1167 | | Status init(RuntimeState* state, LocalSinkStateInfo& info) override; |
1168 | | |
1169 | | Status open(RuntimeState* state) override; |
1170 | | |
1171 | | Status sink(RuntimeState* state, Block* block, bool eos); |
1172 | | |
1173 | 0 | std::vector<Dependency*> dependencies() const override { |
1174 | 0 | return {_async_writer_dependency.get()}; |
1175 | 0 | } Unexecuted instantiation: _ZNK5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE12dependenciesEv Unexecuted instantiation: _ZNK5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE12dependenciesEv Unexecuted instantiation: _ZNK5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE12dependenciesEv Unexecuted instantiation: _ZNK5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE12dependenciesEv Unexecuted instantiation: _ZNK5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE12dependenciesEv Unexecuted instantiation: _ZNK5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE12dependenciesEv Unexecuted instantiation: _ZNK5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE12dependenciesEv Unexecuted instantiation: _ZNK5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE12dependenciesEv Unexecuted instantiation: _ZNK5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE12dependenciesEv |
1176 | | Status close(RuntimeState* state, Status exec_status) override; |
1177 | | |
1178 | 0 | Dependency* finishdependency() override { return _finish_dependency.get(); }Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE16finishdependencyEv Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE16finishdependencyEv Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE16finishdependencyEv Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE16finishdependencyEv Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE16finishdependencyEv Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE16finishdependencyEv Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE16finishdependencyEv Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE16finishdependencyEv Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE16finishdependencyEv |
1179 | | |
1180 | | protected: |
1181 | | VExprContextSPtrs _output_vexpr_ctxs; |
1182 | | std::unique_ptr<Writer> _writer; |
1183 | | |
1184 | | std::shared_ptr<Dependency> _async_writer_dependency; |
1185 | | std::shared_ptr<Dependency> _finish_dependency; |
1186 | | }; |
1187 | | |
1188 | | #ifdef BE_TEST |
1189 | | class DummyOperatorLocalState final : public PipelineXLocalState<FakeSharedState> { |
1190 | | public: |
1191 | | ENABLE_FACTORY_CREATOR(DummyOperatorLocalState); |
1192 | | |
1193 | | DummyOperatorLocalState(RuntimeState* state, OperatorXBase* parent) |
1194 | 11 | : PipelineXLocalState<FakeSharedState>(state, parent) { |
1195 | 11 | _tmp_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), |
1196 | 11 | "DummyOperatorDependency", true); |
1197 | 11 | _finish_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), |
1198 | 11 | "DummyOperatorDependency", true); |
1199 | 11 | _filter_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), |
1200 | 11 | "DummyOperatorDependency", true); |
1201 | 11 | } |
1202 | 12 | Dependency* finishdependency() override { return _finish_dependency.get(); } |
1203 | 11 | ~DummyOperatorLocalState() = default; |
1204 | | |
1205 | 12 | std::vector<Dependency*> dependencies() const override { return {_tmp_dependency.get()}; } |
1206 | 11 | std::vector<Dependency*> execution_dependencies() override { |
1207 | 11 | return {_filter_dependency.get()}; |
1208 | 11 | } |
1209 | | |
1210 | | private: |
1211 | | std::shared_ptr<Dependency> _tmp_dependency; |
1212 | | std::shared_ptr<Dependency> _finish_dependency; |
1213 | | std::shared_ptr<Dependency> _filter_dependency; |
1214 | | }; |
1215 | | |
1216 | | class DummyOperator final : public OperatorX<DummyOperatorLocalState> { |
1217 | | public: |
1218 | 13 | DummyOperator() : OperatorX<DummyOperatorLocalState>(nullptr, 0, 0) {} |
1219 | | |
1220 | 1.79M | [[nodiscard]] bool is_source() const override { return true; } |
1221 | | |
1222 | 896k | Status get_block(RuntimeState* state, Block* block, bool* eos) override { |
1223 | 896k | *eos = _eos; |
1224 | 896k | return Status::OK(); |
1225 | 896k | } |
1226 | 0 | void set_low_memory_mode(RuntimeState* state) override { _low_memory_mode = true; } |
1227 | 3 | Status terminate(RuntimeState* state) override { |
1228 | 3 | _terminated = true; |
1229 | 3 | return Status::OK(); |
1230 | 3 | } |
1231 | 884 | size_t revocable_mem_size(RuntimeState* state) const override { return _revocable_mem_size; } |
1232 | 897k | size_t get_reserve_mem_size(RuntimeState* state) override { |
1233 | 897k | return _disable_reserve_mem |
1234 | 897k | ? 0 |
1235 | 897k | : OperatorX<DummyOperatorLocalState>::get_reserve_mem_size(state); |
1236 | 897k | } |
1237 | | |
1238 | | private: |
1239 | | friend class AssertNumRowsLocalState; |
1240 | | bool _eos = false; |
1241 | | bool _low_memory_mode = false; |
1242 | | bool _terminated = false; |
1243 | | size_t _revocable_mem_size = 0; |
1244 | | bool _disable_reserve_mem = false; |
1245 | | }; |
1246 | | |
1247 | | class DummySinkLocalState final : public PipelineXSinkLocalState<BasicSharedState> { |
1248 | | public: |
1249 | | using Base = PipelineXSinkLocalState<BasicSharedState>; |
1250 | | ENABLE_FACTORY_CREATOR(DummySinkLocalState); |
1251 | 11 | DummySinkLocalState(DataSinkOperatorXBase* parent, RuntimeState* state) : Base(parent, state) { |
1252 | 11 | _tmp_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), |
1253 | 11 | "DummyOperatorDependency", true); |
1254 | 11 | _finish_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), |
1255 | 11 | "DummyOperatorDependency", true); |
1256 | 11 | } |
1257 | | |
1258 | 12 | std::vector<Dependency*> dependencies() const override { return {_tmp_dependency.get()}; } |
1259 | 8 | Dependency* finishdependency() override { return _finish_dependency.get(); } |
1260 | 1.35M | bool is_finished() const override { return _is_finished; } |
1261 | | |
1262 | | private: |
1263 | | std::shared_ptr<Dependency> _tmp_dependency; |
1264 | | std::shared_ptr<Dependency> _finish_dependency; |
1265 | | std::atomic_bool _is_finished = false; |
1266 | | }; |
1267 | | |
1268 | | class DummySinkOperatorX final : public DataSinkOperatorX<DummySinkLocalState> { |
1269 | | public: |
1270 | | DummySinkOperatorX(int op_id, int node_id, int dest_id) |
1271 | 13 | : DataSinkOperatorX<DummySinkLocalState>(op_id, node_id, dest_id) {} |
1272 | 5 | Status sink(RuntimeState* state, Block* in_block, bool eos) override { |
1273 | 5 | return _return_eof ? Status::Error<ErrorCode::END_OF_FILE>("source have closed") |
1274 | 5 | : Status::OK(); |
1275 | 5 | } |
1276 | 0 | void set_low_memory_mode(RuntimeState* state) override { _low_memory_mode = true; } |
1277 | 3 | Status terminate(RuntimeState* state) override { |
1278 | 3 | _terminated = true; |
1279 | 3 | return Status::OK(); |
1280 | 3 | } |
1281 | 2.69k | size_t revocable_mem_size(RuntimeState* state) const override { return _revocable_mem_size; } |
1282 | 905 | size_t get_reserve_mem_size(RuntimeState* state, bool eos) override { |
1283 | 905 | return _disable_reserve_mem |
1284 | 905 | ? 0 |
1285 | 905 | : DataSinkOperatorX<DummySinkLocalState>::get_reserve_mem_size(state, eos); |
1286 | 905 | } |
1287 | | |
1288 | | private: |
1289 | | bool _low_memory_mode = false; |
1290 | | bool _terminated = false; |
1291 | | std::atomic_bool _return_eof = false; |
1292 | | size_t _revocable_mem_size = 0; |
1293 | | bool _disable_reserve_mem = false; |
1294 | | }; |
1295 | | #endif |
1296 | | |
1297 | | #include "common/compile_check_end.h" |
1298 | | } // namespace doris |