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 | 217k | 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 | 108 | 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 | 0 | virtual Status revoke_memory(RuntimeState* state) { return Status::OK(); } |
135 | | |
136 | 0 | virtual bool is_hash_join_probe() const { return false; } |
137 | | |
138 | | /** |
139 | | * Pipeline task is blockable means it will be blocked in the next run. So we should put the |
140 | | * pipeline task into the blocking task scheduler. |
141 | | */ |
142 | | virtual bool is_blockable(RuntimeState* state) const = 0; |
143 | 0 | virtual void set_low_memory_mode(RuntimeState* state) {} |
144 | | |
145 | 48.0k | OperatorPtr child() { return _child; } |
146 | 0 | virtual Status reset(RuntimeState* state) { |
147 | 0 | return Status::InternalError("Reset is not implemented in operator: {}", get_name()); |
148 | 0 | } |
149 | | |
150 | | /* -------------- Interfaces to determine the input data properties -------------- */ |
151 | | /** |
152 | | * Return True if this operator relies on the bucket distribution (e.g. COLOCATE join, 1-phase AGG). |
153 | | * Data input to this kind of operators must have the same distribution with the table buckets. |
154 | | * It is also means `required_data_distribution` should be `BUCKET_HASH_SHUFFLE`. |
155 | | * @return |
156 | | */ |
157 | 372 | [[nodiscard]] virtual bool is_colocated_operator() const { return false; } |
158 | | /** |
159 | | * Return True if this operator relies on the bucket distribution or specific hash data distribution (e.g. SHUFFLED HASH join). |
160 | | * Data input to this kind of operators must be HASH distributed according to some rules. |
161 | | * All colocated operators are also shuffled operators. |
162 | | * It is also means `required_data_distribution` should be `BUCKET_HASH_SHUFFLE` or `HASH_SHUFFLE`. |
163 | | * @return |
164 | | */ |
165 | 372 | [[nodiscard]] virtual bool is_shuffled_operator() const { return false; } |
166 | | /** |
167 | | * 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). |
168 | | * |
169 | | * For single child's operators, return true if this operator is followed by a shuffled operator. |
170 | | * For example, in the plan fragment: |
171 | | * `UNION` -> `SHUFFLED HASH JOIN` |
172 | | * The `SHUFFLED HASH JOIN` is a shuffled operator so the UNION operator is followed by a shuffled operator. |
173 | | */ |
174 | 504 | [[nodiscard]] virtual bool followed_by_shuffled_operator() const { |
175 | 504 | return _followed_by_shuffled_operator; |
176 | 504 | } |
177 | | /** |
178 | | * Update the operator properties according to the plan node. |
179 | | * This is called before `prepare`. |
180 | | */ |
181 | | virtual void update_operator(const TPlanNode& tnode, bool followed_by_shuffled_operator, |
182 | 0 | bool require_bucket_distribution) { |
183 | 0 | _followed_by_shuffled_operator = followed_by_shuffled_operator; |
184 | 0 | _require_bucket_distribution = require_bucket_distribution; |
185 | 0 | } |
186 | | /** |
187 | | * Return the required data distribution of this operator. |
188 | | */ |
189 | | [[nodiscard]] virtual DataDistribution required_data_distribution( |
190 | | RuntimeState* /*state*/) const; |
191 | | |
192 | | protected: |
193 | | OperatorPtr _child = nullptr; |
194 | | |
195 | | bool _is_closed; |
196 | | bool _followed_by_shuffled_operator = false; |
197 | | bool _require_bucket_distribution = false; |
198 | | bool _is_serial_operator = false; |
199 | | }; |
200 | | |
201 | | class PipelineXLocalStateBase { |
202 | | public: |
203 | | PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent); |
204 | 24.4k | virtual ~PipelineXLocalStateBase() = default; |
205 | | |
206 | | template <class TARGET> |
207 | 1.83M | TARGET& cast() { |
208 | 1.83M | DCHECK(dynamic_cast<TARGET*>(this)) |
209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() |
210 | 0 | << " and expect type is" << typeid(TARGET).name(); |
211 | 1.83M | return reinterpret_cast<TARGET&>(*this); |
212 | 1.83M | } _ZN5doris23PipelineXLocalStateBase4castINS_23DummyOperatorLocalStateEEERT_v Line | Count | Source | 207 | 1.83M | TARGET& cast() { | 208 | 1.83M | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 1.83M | return reinterpret_cast<TARGET&>(*this); | 212 | 1.83M | } |
_ZN5doris23PipelineXLocalStateBase4castINS_13AggLocalStateEEERT_v Line | Count | Source | 207 | 130 | TARGET& cast() { | 208 | 130 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 130 | return reinterpret_cast<TARGET&>(*this); | 212 | 130 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_18AnalyticLocalStateEEERT_v Line | Count | Source | 207 | 46 | TARGET& cast() { | 208 | 46 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 46 | return reinterpret_cast<TARGET&>(*this); | 212 | 46 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_23AssertNumRowsLocalStateEEERT_v Line | Count | Source | 207 | 4 | TARGET& cast() { | 208 | 4 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 4 | return reinterpret_cast<TARGET&>(*this); | 212 | 4 | } |
Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_14MockLocalStateEEERT_v _ZN5doris23PipelineXLocalStateBase4castINS_17DataGenLocalStateEEERT_v Line | Count | Source | 207 | 3 | TARGET& cast() { | 208 | 3 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 3 | return reinterpret_cast<TARGET&>(*this); | 212 | 3 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_30DistinctStreamingAggLocalStateEEERT_v Line | Count | Source | 207 | 24 | TARGET& cast() { | 208 | 24 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 24 | return reinterpret_cast<TARGET&>(*this); | 212 | 24 | } |
Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_18EmptySetLocalStateEEERT_v _ZN5doris23PipelineXLocalStateBase4castINS_18ExchangeLocalStateEEERT_v Line | Count | Source | 207 | 48 | TARGET& cast() { | 208 | 48 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 48 | return reinterpret_cast<TARGET&>(*this); | 212 | 48 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_23HashJoinProbeLocalStateEEERT_v Line | Count | Source | 207 | 331 | TARGET& cast() { | 208 | 331 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 331 | return reinterpret_cast<TARGET&>(*this); | 212 | 331 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_24LocalMergeSortLocalStateEEERT_v Line | Count | Source | 207 | 6 | TARGET& cast() { | 208 | 6 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 6 | return reinterpret_cast<TARGET&>(*this); | 212 | 6 | } |
Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_25MaterializationLocalStateEEERT_v _ZN5doris23PipelineXLocalStateBase4castINS_29PartitionSortSourceLocalStateEEERT_v Line | Count | Source | 207 | 402 | TARGET& cast() { | 208 | 402 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 402 | return reinterpret_cast<TARGET&>(*this); | 212 | 402 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_24PartitionedAggLocalStateEEERT_v Line | Count | Source | 207 | 82 | TARGET& cast() { | 208 | 82 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 82 | return reinterpret_cast<TARGET&>(*this); | 212 | 82 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_34PartitionedHashJoinProbeLocalStateEEERT_v Line | Count | Source | 207 | 57 | TARGET& cast() { | 208 | 57 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 57 | return reinterpret_cast<TARGET&>(*this); | 212 | 57 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_21CacheSourceLocalStateEEERT_v Line | Count | Source | 207 | 6 | TARGET& cast() { | 208 | 6 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 6 | return reinterpret_cast<TARGET&>(*this); | 212 | 6 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_16RepeatLocalStateEEERT_v Line | Count | Source | 207 | 21 | TARGET& cast() { | 208 | 21 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 21 | return reinterpret_cast<TARGET&>(*this); | 212 | 21 | } |
Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_18MockScanLocalStateEEERT_v _ZN5doris23PipelineXLocalStateBase4castINS_19SetSourceLocalStateILb1EEEEERT_v Line | Count | Source | 207 | 6 | TARGET& cast() { | 208 | 6 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 6 | return reinterpret_cast<TARGET&>(*this); | 212 | 6 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_19SetSourceLocalStateILb0EEEEERT_v Line | Count | Source | 207 | 5 | TARGET& cast() { | 208 | 5 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 5 | return reinterpret_cast<TARGET&>(*this); | 212 | 5 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_14SortLocalStateEEERT_v Line | Count | Source | 207 | 38 | TARGET& cast() { | 208 | 38 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 38 | return reinterpret_cast<TARGET&>(*this); | 212 | 38 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_19SpillSortLocalStateEEERT_v Line | Count | Source | 207 | 48 | TARGET& cast() { | 208 | 48 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 48 | return reinterpret_cast<TARGET&>(*this); | 212 | 48 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_22StreamingAggLocalStateEEERT_v Line | Count | Source | 207 | 21 | TARGET& cast() { | 208 | 21 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 21 | return reinterpret_cast<TARGET&>(*this); | 212 | 21 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_23TableFunctionLocalStateEEERT_v Line | Count | Source | 207 | 16 | TARGET& cast() { | 208 | 16 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 16 | return reinterpret_cast<TARGET&>(*this); | 212 | 16 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_21UnionSourceLocalStateEEERT_v Line | Count | Source | 207 | 41 | TARGET& cast() { | 208 | 41 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 41 | return reinterpret_cast<TARGET&>(*this); | 212 | 41 | } |
Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_29LocalExchangeSourceLocalStateEEERT_v Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_18OlapScanLocalStateEEERT_v _ZN5doris23PipelineXLocalStateBase4castINS_18FileScanLocalStateEEERT_v Line | Count | Source | 207 | 1 | TARGET& cast() { | 208 | 1 | DCHECK(dynamic_cast<TARGET*>(this)) | 209 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 210 | 0 | << " and expect type is" << typeid(TARGET).name(); | 211 | 1 | return reinterpret_cast<TARGET&>(*this); | 212 | 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 |
213 | | template <class TARGET> |
214 | | const TARGET& cast() const { |
215 | | DCHECK(dynamic_cast<TARGET*>(this)) |
216 | | << " Mismatch type! Current type is " << typeid(*this).name() |
217 | | << " and expect type is" << typeid(TARGET).name(); |
218 | | return reinterpret_cast<const TARGET&>(*this); |
219 | | } |
220 | | |
221 | | // Do initialization. This step should be executed only once and in bthread, so we can do some |
222 | | // lightweight or non-idempotent operations (e.g. init profile, clone expr ctx from operatorX) |
223 | | virtual Status init(RuntimeState* state, LocalStateInfo& info) = 0; |
224 | | // Make sure all resources are ready before execution. For example, remote tablets should be |
225 | | // loaded to local storage. |
226 | | // This is called by execution pthread and different from `Operator::prepare` which is called |
227 | | // by bthread. |
228 | | virtual Status prepare(RuntimeState* state) = 0; |
229 | | // Do initialization. This step can be executed multiple times, so we should make sure it is |
230 | | // idempotent (e.g. wait for runtime filters). |
231 | | virtual Status open(RuntimeState* state) = 0; |
232 | | virtual Status close(RuntimeState* state) = 0; |
233 | | virtual Status terminate(RuntimeState* state) = 0; |
234 | | |
235 | | // If use projection, we should clear `_origin_block`. |
236 | | void clear_origin_block(); |
237 | | |
238 | | void reached_limit(Block* block, bool* eos); |
239 | 226 | RuntimeProfile* operator_profile() { return _operator_profile.get(); } |
240 | 141 | RuntimeProfile* common_profile() { return _common_profile.get(); } |
241 | 292k | RuntimeProfile* custom_profile() { return _custom_profile.get(); } |
242 | | |
243 | 97.2k | RuntimeProfile::Counter* exec_time_counter() { return _exec_timer; } |
244 | 0 | RuntimeProfile::Counter* memory_used_counter() { return _memory_used_counter; } |
245 | 0 | OperatorXBase* parent() { return _parent; } |
246 | 99 | RuntimeState* state() { return _state; } |
247 | 16 | VExprContextSPtrs& conjuncts() { return _conjuncts; } |
248 | 0 | VExprContextSPtrs& projections() { return _projections; } |
249 | 11 | [[nodiscard]] int64_t num_rows_returned() const { return _num_rows_returned; } |
250 | 18 | void add_num_rows_returned(int64_t delta) { _num_rows_returned += delta; } |
251 | 2 | void set_num_rows_returned(int64_t value) { _num_rows_returned = value; } |
252 | | |
253 | | [[nodiscard]] virtual std::string debug_string(int indentation_level = 0) const = 0; |
254 | | [[nodiscard]] virtual bool is_blockable() const; |
255 | | |
256 | 0 | virtual std::vector<Dependency*> dependencies() const { return {nullptr}; } |
257 | | |
258 | | // override in Scan |
259 | 7 | virtual Dependency* finishdependency() { return nullptr; } |
260 | | // override in Scan MultiCastSink |
261 | 5 | virtual std::vector<Dependency*> execution_dependencies() { return {}; } |
262 | | |
263 | | Status filter_block(const VExprContextSPtrs& expr_contexts, Block* block); |
264 | | |
265 | 918k | int64_t& estimate_memory_usage() { return _estimate_memory_usage; } |
266 | | |
267 | 918k | void reset_estimate_memory_usage() { _estimate_memory_usage = 0; } |
268 | | |
269 | 25 | bool low_memory_mode() { |
270 | 25 | #ifdef BE_TEST |
271 | 25 | return false; |
272 | | #else |
273 | | return _state->low_memory_mode(); |
274 | | #endif |
275 | 25 | } |
276 | | |
277 | | protected: |
278 | | friend class OperatorXBase; |
279 | | template <typename LocalStateType> |
280 | | friend class ScanOperatorX; |
281 | | |
282 | | ObjectPool* _pool = nullptr; |
283 | | int64_t _num_rows_returned {0}; |
284 | | int64_t _estimate_memory_usage {0}; |
285 | | |
286 | | /* |
287 | | Each operator has its profile like this: |
288 | | XXXX_OPERATOR: |
289 | | CommonCounters: |
290 | | ... |
291 | | CustomCounters: |
292 | | ... |
293 | | */ |
294 | | // Profile of this operator. |
295 | | // Should not modify this profile usually. |
296 | | std::unique_ptr<RuntimeProfile> _operator_profile; |
297 | | // CommonCounters of this operator. |
298 | | // CommonCounters are counters that will be used by all operators. |
299 | | std::unique_ptr<RuntimeProfile> _common_profile; |
300 | | // CustomCounters of this operator. |
301 | | // CustomCounters are counters that will be used by this operator only. |
302 | | std::unique_ptr<RuntimeProfile> _custom_profile; |
303 | | |
304 | | RuntimeProfile::Counter* _rows_returned_counter = nullptr; |
305 | | RuntimeProfile::Counter* _blocks_returned_counter = nullptr; |
306 | | RuntimeProfile::Counter* _wait_for_dependency_timer = nullptr; |
307 | | // Account for current memory and peak memory used by this node |
308 | | RuntimeProfile::HighWaterMarkCounter* _memory_used_counter = nullptr; |
309 | | RuntimeProfile::Counter* _projection_timer = nullptr; |
310 | | RuntimeProfile::Counter* _exec_timer = nullptr; |
311 | | RuntimeProfile::Counter* _init_timer = nullptr; |
312 | | RuntimeProfile::Counter* _open_timer = nullptr; |
313 | | RuntimeProfile::Counter* _close_timer = nullptr; |
314 | | |
315 | | OperatorXBase* _parent = nullptr; |
316 | | RuntimeState* _state = nullptr; |
317 | | VExprContextSPtrs _conjuncts; |
318 | | VExprContextSPtrs _projections; |
319 | | std::shared_ptr<ScoreRuntime> _score_runtime; |
320 | | std::shared_ptr<segment_v2::AnnTopNRuntime> _ann_topn_runtime; |
321 | | // Used in common subexpression elimination to compute intermediate results. |
322 | | std::vector<VExprContextSPtrs> _intermediate_projections; |
323 | | |
324 | | bool _closed = false; |
325 | | std::atomic<bool> _terminated = false; |
326 | | Block _origin_block; |
327 | | }; |
328 | | |
329 | | template <typename SharedStateArg = FakeSharedState> |
330 | | class PipelineXLocalState : public PipelineXLocalStateBase { |
331 | | public: |
332 | | using SharedStateType = SharedStateArg; |
333 | | PipelineXLocalState(RuntimeState* state, OperatorXBase* parent) |
334 | 24.4k | : PipelineXLocalStateBase(state, parent) {}_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 334 | 102 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 334 | 3 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 334 | 166 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 334 | 10 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 334 | 2 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 334 | 24 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 334 | 37 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 334 | 9 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 334 | 24.0k | : PipelineXLocalStateBase(state, parent) {} |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 334 | 39 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 334 | 23 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 334 | 11 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 334 | 18 | : PipelineXLocalStateBase(state, parent) {} |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE |
335 | 24.4k | ~PipelineXLocalState() override = default; _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEED2Ev Line | Count | Source | 335 | 9 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEED2Ev Line | Count | Source | 335 | 166 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEED2Ev Line | Count | Source | 335 | 23 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEED2Ev Line | Count | Source | 335 | 102 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEED2Ev Line | Count | Source | 335 | 18 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEED2Ev Line | Count | Source | 335 | 24.0k | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEED2Ev Line | Count | Source | 335 | 39 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEED2Ev Line | Count | Source | 335 | 3 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEED2Ev Line | Count | Source | 335 | 10 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEED2Ev Line | Count | Source | 335 | 11 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEED2Ev Line | Count | Source | 335 | 2 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEED2Ev Line | Count | Source | 335 | 24 | ~PipelineXLocalState() override = default; |
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEED2Ev Line | Count | Source | 335 | 37 | ~PipelineXLocalState() override = default; |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEED2Ev Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEED2Ev Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEED2Ev Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEED2Ev |
336 | | |
337 | | Status init(RuntimeState* state, LocalStateInfo& info) override; |
338 | 78 | Status prepare(RuntimeState* state) override { return Status::OK(); }_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 338 | 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 | 338 | 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_20SpillSortSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE7prepareEPNS_12RuntimeStateE |
339 | | Status open(RuntimeState* state) override; |
340 | | |
341 | | virtual std::string name_suffix() const; |
342 | | |
343 | | Status close(RuntimeState* state) override; |
344 | | Status terminate(RuntimeState* state) override; |
345 | | |
346 | | [[nodiscard]] std::string debug_string(int indentation_level = 0) const override; |
347 | | |
348 | 26.6M | std::vector<Dependency*> dependencies() const override { |
349 | 26.6M | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; |
350 | 26.6M | } Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12dependenciesEv _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12dependenciesEv Line | Count | Source | 348 | 6 | std::vector<Dependency*> dependencies() const override { | 349 | 6 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 350 | 6 | } |
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12dependenciesEv Line | Count | Source | 348 | 26.6M | std::vector<Dependency*> dependencies() const override { | 349 | 26.6M | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 350 | 26.6M | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12dependenciesEv _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12dependenciesEv Line | Count | Source | 348 | 2 | std::vector<Dependency*> dependencies() const override { | 349 | 2 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 350 | 2 | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12dependenciesEv _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12dependenciesEv Line | Count | Source | 348 | 11 | std::vector<Dependency*> dependencies() const override { | 349 | 11 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 350 | 11 | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12dependenciesEv _ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12dependenciesEv Line | Count | Source | 348 | 7 | std::vector<Dependency*> dependencies() const override { | 349 | 7 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 350 | 7 | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12dependenciesEv |
351 | | |
352 | 24.2k | virtual bool must_set_shared_state() const { |
353 | 24.2k | return !std::is_same_v<SharedStateArg, FakeSharedState>; |
354 | 24.2k | } _ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE21must_set_shared_stateEv Line | Count | Source | 352 | 48 | virtual bool must_set_shared_state() const { | 353 | 48 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 354 | 48 | } |
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE21must_set_shared_stateEv Line | Count | Source | 352 | 37 | virtual bool must_set_shared_state() const { | 353 | 37 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 354 | 37 | } |
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE21must_set_shared_stateEv Line | Count | Source | 352 | 9 | virtual bool must_set_shared_state() const { | 353 | 9 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 354 | 9 | } |
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE21must_set_shared_stateEv Line | Count | Source | 352 | 23 | virtual bool must_set_shared_state() const { | 353 | 23 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 354 | 23 | } |
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE21must_set_shared_stateEv Line | Count | Source | 352 | 102 | virtual bool must_set_shared_state() const { | 353 | 102 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 354 | 102 | } |
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE21must_set_shared_stateEv Line | Count | Source | 352 | 10 | virtual bool must_set_shared_state() const { | 353 | 10 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 354 | 10 | } |
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE21must_set_shared_stateEv Line | Count | Source | 352 | 24.0k | virtual bool must_set_shared_state() const { | 353 | 24.0k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 354 | 24.0k | } |
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE21must_set_shared_stateEv Line | Count | Source | 352 | 1 | virtual bool must_set_shared_state() const { | 353 | 1 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 354 | 1 | } |
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE21must_set_shared_stateEv Line | Count | Source | 352 | 3 | virtual bool must_set_shared_state() const { | 353 | 3 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 354 | 3 | } |
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE21must_set_shared_stateEv Line | Count | Source | 352 | 10 | virtual bool must_set_shared_state() const { | 353 | 10 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 354 | 10 | } |
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE21must_set_shared_stateEv Line | Count | Source | 352 | 11 | virtual bool must_set_shared_state() const { | 353 | 11 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 354 | 11 | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE21must_set_shared_stateEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE21must_set_shared_stateEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE21must_set_shared_stateEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE21must_set_shared_stateEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE21must_set_shared_stateEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE21must_set_shared_stateEv |
355 | | |
356 | | protected: |
357 | | Dependency* _dependency = nullptr; |
358 | | SharedStateArg* _shared_state = nullptr; |
359 | | }; |
360 | | |
361 | | template <typename SharedStateArg> |
362 | | class PipelineXSpillLocalState : public PipelineXLocalState<SharedStateArg> { |
363 | | public: |
364 | | using Base = PipelineXLocalState<SharedStateArg>; |
365 | | PipelineXSpillLocalState(RuntimeState* state, OperatorXBase* parent) |
366 | 68 | : PipelineXLocalState<SharedStateArg>(state, parent) {}Unexecuted instantiation: _ZN5doris24PipelineXSpillLocalStateINS_20MultiCastSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE _ZN5doris24PipelineXSpillLocalStateINS_25PartitionedAggSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 366 | 18 | : PipelineXLocalState<SharedStateArg>(state, parent) {} |
_ZN5doris24PipelineXSpillLocalStateINS_30PartitionedHashJoinSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 366 | 39 | : PipelineXLocalState<SharedStateArg>(state, parent) {} |
_ZN5doris24PipelineXSpillLocalStateINS_20SpillSortSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 366 | 11 | : PipelineXLocalState<SharedStateArg>(state, parent) {} |
|
367 | 68 | ~PipelineXSpillLocalState() override = default; _ZN5doris24PipelineXSpillLocalStateINS_25PartitionedAggSharedStateEED2Ev Line | Count | Source | 367 | 18 | ~PipelineXSpillLocalState() override = default; |
_ZN5doris24PipelineXSpillLocalStateINS_30PartitionedHashJoinSharedStateEED2Ev Line | Count | Source | 367 | 39 | ~PipelineXSpillLocalState() override = default; |
_ZN5doris24PipelineXSpillLocalStateINS_20SpillSortSharedStateEED2Ev Line | Count | Source | 367 | 11 | ~PipelineXSpillLocalState() override = default; |
Unexecuted instantiation: _ZN5doris24PipelineXSpillLocalStateINS_20MultiCastSharedStateEED2Ev |
368 | | |
369 | 22 | Status init(RuntimeState* state, LocalStateInfo& info) override { |
370 | 22 | RETURN_IF_ERROR(PipelineXLocalState<SharedStateArg>::init(state, info)); |
371 | | |
372 | 22 | init_spill_read_counters(); |
373 | | |
374 | 22 | return Status::OK(); |
375 | 22 | } _ZN5doris24PipelineXSpillLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 369 | 10 | Status init(RuntimeState* state, LocalStateInfo& info) override { | 370 | 10 | RETURN_IF_ERROR(PipelineXLocalState<SharedStateArg>::init(state, info)); | 371 | | | 372 | 10 | init_spill_read_counters(); | 373 | | | 374 | 10 | return Status::OK(); | 375 | 10 | } |
_ZN5doris24PipelineXSpillLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 369 | 1 | Status init(RuntimeState* state, LocalStateInfo& info) override { | 370 | 1 | RETURN_IF_ERROR(PipelineXLocalState<SharedStateArg>::init(state, info)); | 371 | | | 372 | 1 | init_spill_read_counters(); | 373 | | | 374 | 1 | return Status::OK(); | 375 | 1 | } |
_ZN5doris24PipelineXSpillLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 369 | 11 | Status init(RuntimeState* state, LocalStateInfo& info) override { | 370 | 11 | RETURN_IF_ERROR(PipelineXLocalState<SharedStateArg>::init(state, info)); | 371 | | | 372 | 11 | init_spill_read_counters(); | 373 | | | 374 | 11 | return Status::OK(); | 375 | 11 | } |
Unexecuted instantiation: _ZN5doris24PipelineXSpillLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE |
376 | | |
377 | 68 | void init_spill_write_counters() { |
378 | 68 | _spill_write_file_timer = |
379 | 68 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteFileTime", 1); |
380 | | |
381 | 68 | _spill_write_serialize_block_timer = |
382 | 68 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteSerializeBlockTime", 1); |
383 | 68 | _spill_write_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), |
384 | 68 | "SpillWriteBlockCount", TUnit::UNIT, 1); |
385 | 68 | _spill_write_block_data_size = ADD_COUNTER_WITH_LEVEL( |
386 | 68 | Base::custom_profile(), "SpillWriteBlockBytes", TUnit::BYTES, 1); |
387 | 68 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( |
388 | 68 | Base::custom_profile(), "SpillWriteFileBytes", TUnit::BYTES, 1); |
389 | 68 | _spill_write_rows_count = |
390 | 68 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillWriteRows", TUnit::UNIT, 1); |
391 | 68 | _spill_write_file_total_count = ADD_COUNTER_WITH_LEVEL( |
392 | 68 | Base::custom_profile(), "SpillWriteFileTotalCount", TUnit::UNIT, 1); |
393 | 68 | } _ZN5doris24PipelineXSpillLocalStateINS_25PartitionedAggSharedStateEE25init_spill_write_countersEv Line | Count | Source | 377 | 18 | void init_spill_write_counters() { | 378 | 18 | _spill_write_file_timer = | 379 | 18 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteFileTime", 1); | 380 | | | 381 | 18 | _spill_write_serialize_block_timer = | 382 | 18 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteSerializeBlockTime", 1); | 383 | 18 | _spill_write_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 384 | 18 | "SpillWriteBlockCount", TUnit::UNIT, 1); | 385 | 18 | _spill_write_block_data_size = ADD_COUNTER_WITH_LEVEL( | 386 | 18 | Base::custom_profile(), "SpillWriteBlockBytes", TUnit::BYTES, 1); | 387 | 18 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( | 388 | 18 | Base::custom_profile(), "SpillWriteFileBytes", TUnit::BYTES, 1); | 389 | 18 | _spill_write_rows_count = | 390 | 18 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillWriteRows", TUnit::UNIT, 1); | 391 | 18 | _spill_write_file_total_count = ADD_COUNTER_WITH_LEVEL( | 392 | 18 | Base::custom_profile(), "SpillWriteFileTotalCount", TUnit::UNIT, 1); | 393 | 18 | } |
_ZN5doris24PipelineXSpillLocalStateINS_30PartitionedHashJoinSharedStateEE25init_spill_write_countersEv Line | Count | Source | 377 | 39 | void init_spill_write_counters() { | 378 | 39 | _spill_write_file_timer = | 379 | 39 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteFileTime", 1); | 380 | | | 381 | 39 | _spill_write_serialize_block_timer = | 382 | 39 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteSerializeBlockTime", 1); | 383 | 39 | _spill_write_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 384 | 39 | "SpillWriteBlockCount", TUnit::UNIT, 1); | 385 | 39 | _spill_write_block_data_size = ADD_COUNTER_WITH_LEVEL( | 386 | 39 | Base::custom_profile(), "SpillWriteBlockBytes", TUnit::BYTES, 1); | 387 | 39 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( | 388 | 39 | Base::custom_profile(), "SpillWriteFileBytes", TUnit::BYTES, 1); | 389 | 39 | _spill_write_rows_count = | 390 | 39 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillWriteRows", TUnit::UNIT, 1); | 391 | 39 | _spill_write_file_total_count = ADD_COUNTER_WITH_LEVEL( | 392 | 39 | Base::custom_profile(), "SpillWriteFileTotalCount", TUnit::UNIT, 1); | 393 | 39 | } |
_ZN5doris24PipelineXSpillLocalStateINS_20SpillSortSharedStateEE25init_spill_write_countersEv Line | Count | Source | 377 | 11 | void init_spill_write_counters() { | 378 | 11 | _spill_write_file_timer = | 379 | 11 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteFileTime", 1); | 380 | | | 381 | 11 | _spill_write_serialize_block_timer = | 382 | 11 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteSerializeBlockTime", 1); | 383 | 11 | _spill_write_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 384 | 11 | "SpillWriteBlockCount", TUnit::UNIT, 1); | 385 | 11 | _spill_write_block_data_size = ADD_COUNTER_WITH_LEVEL( | 386 | 11 | Base::custom_profile(), "SpillWriteBlockBytes", TUnit::BYTES, 1); | 387 | 11 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( | 388 | 11 | Base::custom_profile(), "SpillWriteFileBytes", TUnit::BYTES, 1); | 389 | 11 | _spill_write_rows_count = | 390 | 11 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillWriteRows", TUnit::UNIT, 1); | 391 | 11 | _spill_write_file_total_count = ADD_COUNTER_WITH_LEVEL( | 392 | 11 | Base::custom_profile(), "SpillWriteFileTotalCount", TUnit::UNIT, 1); | 393 | 11 | } |
|
394 | | |
395 | 68 | void init_spill_read_counters() { |
396 | | // Spill read counters |
397 | 68 | _spill_read_file_time = |
398 | 68 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadFileTime", 1); |
399 | 68 | _spill_read_deserialize_block_timer = |
400 | 68 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadDeserializeBlockTime", 1); |
401 | | |
402 | 68 | _spill_read_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), |
403 | 68 | "SpillReadBlockCount", TUnit::UNIT, 1); |
404 | 68 | _spill_read_block_data_size = ADD_COUNTER_WITH_LEVEL( |
405 | 68 | Base::custom_profile(), "SpillReadBlockBytes", TUnit::BYTES, 1); |
406 | 68 | _spill_read_file_size = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillReadFileBytes", |
407 | 68 | TUnit::BYTES, 1); |
408 | 68 | _spill_read_rows_count = |
409 | 68 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillReadRows", TUnit::UNIT, 1); |
410 | 68 | _spill_read_file_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), |
411 | 68 | "SpillReadFileCount", TUnit::UNIT, 1); |
412 | | |
413 | 68 | _spill_file_current_size = ADD_COUNTER_WITH_LEVEL( |
414 | 68 | Base::custom_profile(), "SpillWriteFileCurrentBytes", TUnit::BYTES, 1); |
415 | 68 | _spill_file_current_count = ADD_COUNTER_WITH_LEVEL( |
416 | 68 | Base::custom_profile(), "SpillWriteFileCurrentCount", TUnit::UNIT, 1); |
417 | 68 | } _ZN5doris24PipelineXSpillLocalStateINS_25PartitionedAggSharedStateEE24init_spill_read_countersEv Line | Count | Source | 395 | 18 | void init_spill_read_counters() { | 396 | | // Spill read counters | 397 | 18 | _spill_read_file_time = | 398 | 18 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadFileTime", 1); | 399 | 18 | _spill_read_deserialize_block_timer = | 400 | 18 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadDeserializeBlockTime", 1); | 401 | | | 402 | 18 | _spill_read_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 403 | 18 | "SpillReadBlockCount", TUnit::UNIT, 1); | 404 | 18 | _spill_read_block_data_size = ADD_COUNTER_WITH_LEVEL( | 405 | 18 | Base::custom_profile(), "SpillReadBlockBytes", TUnit::BYTES, 1); | 406 | 18 | _spill_read_file_size = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillReadFileBytes", | 407 | 18 | TUnit::BYTES, 1); | 408 | 18 | _spill_read_rows_count = | 409 | 18 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillReadRows", TUnit::UNIT, 1); | 410 | 18 | _spill_read_file_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 411 | 18 | "SpillReadFileCount", TUnit::UNIT, 1); | 412 | | | 413 | 18 | _spill_file_current_size = ADD_COUNTER_WITH_LEVEL( | 414 | 18 | Base::custom_profile(), "SpillWriteFileCurrentBytes", TUnit::BYTES, 1); | 415 | 18 | _spill_file_current_count = ADD_COUNTER_WITH_LEVEL( | 416 | 18 | Base::custom_profile(), "SpillWriteFileCurrentCount", TUnit::UNIT, 1); | 417 | 18 | } |
_ZN5doris24PipelineXSpillLocalStateINS_30PartitionedHashJoinSharedStateEE24init_spill_read_countersEv Line | Count | Source | 395 | 39 | void init_spill_read_counters() { | 396 | | // Spill read counters | 397 | 39 | _spill_read_file_time = | 398 | 39 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadFileTime", 1); | 399 | 39 | _spill_read_deserialize_block_timer = | 400 | 39 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadDeserializeBlockTime", 1); | 401 | | | 402 | 39 | _spill_read_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 403 | 39 | "SpillReadBlockCount", TUnit::UNIT, 1); | 404 | 39 | _spill_read_block_data_size = ADD_COUNTER_WITH_LEVEL( | 405 | 39 | Base::custom_profile(), "SpillReadBlockBytes", TUnit::BYTES, 1); | 406 | 39 | _spill_read_file_size = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillReadFileBytes", | 407 | 39 | TUnit::BYTES, 1); | 408 | 39 | _spill_read_rows_count = | 409 | 39 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillReadRows", TUnit::UNIT, 1); | 410 | 39 | _spill_read_file_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 411 | 39 | "SpillReadFileCount", TUnit::UNIT, 1); | 412 | | | 413 | 39 | _spill_file_current_size = ADD_COUNTER_WITH_LEVEL( | 414 | 39 | Base::custom_profile(), "SpillWriteFileCurrentBytes", TUnit::BYTES, 1); | 415 | 39 | _spill_file_current_count = ADD_COUNTER_WITH_LEVEL( | 416 | 39 | Base::custom_profile(), "SpillWriteFileCurrentCount", TUnit::UNIT, 1); | 417 | 39 | } |
_ZN5doris24PipelineXSpillLocalStateINS_20SpillSortSharedStateEE24init_spill_read_countersEv Line | Count | Source | 395 | 11 | void init_spill_read_counters() { | 396 | | // Spill read counters | 397 | 11 | _spill_read_file_time = | 398 | 11 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadFileTime", 1); | 399 | 11 | _spill_read_deserialize_block_timer = | 400 | 11 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillReadDeserializeBlockTime", 1); | 401 | | | 402 | 11 | _spill_read_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 403 | 11 | "SpillReadBlockCount", TUnit::UNIT, 1); | 404 | 11 | _spill_read_block_data_size = ADD_COUNTER_WITH_LEVEL( | 405 | 11 | Base::custom_profile(), "SpillReadBlockBytes", TUnit::BYTES, 1); | 406 | 11 | _spill_read_file_size = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillReadFileBytes", | 407 | 11 | TUnit::BYTES, 1); | 408 | 11 | _spill_read_rows_count = | 409 | 11 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillReadRows", TUnit::UNIT, 1); | 410 | 11 | _spill_read_file_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 411 | 11 | "SpillReadFileCount", TUnit::UNIT, 1); | 412 | | | 413 | 11 | _spill_file_current_size = ADD_COUNTER_WITH_LEVEL( | 414 | 11 | Base::custom_profile(), "SpillWriteFileCurrentBytes", TUnit::BYTES, 1); | 415 | 11 | _spill_file_current_count = ADD_COUNTER_WITH_LEVEL( | 416 | 11 | Base::custom_profile(), "SpillWriteFileCurrentCount", TUnit::UNIT, 1); | 417 | 11 | } |
Unexecuted instantiation: _ZN5doris24PipelineXSpillLocalStateINS_20MultiCastSharedStateEE24init_spill_read_countersEv |
418 | | |
419 | | // Spill write counters |
420 | | // Total time of writing file |
421 | | RuntimeProfile::Counter* _spill_write_file_timer = nullptr; |
422 | | RuntimeProfile::Counter* _spill_write_serialize_block_timer = nullptr; |
423 | | // Original count of spilled Blocks |
424 | | // One Big Block maybe split into multiple small Blocks when actually written to disk file. |
425 | | RuntimeProfile::Counter* _spill_write_block_count = nullptr; |
426 | | // Total bytes of spill data in Block format(in memory format) |
427 | | RuntimeProfile::Counter* _spill_write_block_data_size = nullptr; |
428 | | // Total bytes of spill data written to disk file(after serialized) |
429 | | RuntimeProfile::Counter* _spill_write_file_total_size = nullptr; |
430 | | RuntimeProfile::Counter* _spill_write_rows_count = nullptr; |
431 | | RuntimeProfile::Counter* _spill_write_file_total_count = nullptr; |
432 | | RuntimeProfile::Counter* _spill_file_current_count = nullptr; |
433 | | // Spilled file total size |
434 | | RuntimeProfile::Counter* _spill_file_total_size = nullptr; |
435 | | // Current spilled file size |
436 | | RuntimeProfile::Counter* _spill_file_current_size = nullptr; |
437 | | |
438 | | RuntimeProfile::Counter* _spill_read_file_time = nullptr; |
439 | | RuntimeProfile::Counter* _spill_read_deserialize_block_timer = nullptr; |
440 | | RuntimeProfile::Counter* _spill_read_block_count = nullptr; |
441 | | // Total bytes of read data in Block format(in memory format) |
442 | | RuntimeProfile::Counter* _spill_read_block_data_size = nullptr; |
443 | | // Total bytes of spill data read from disk file |
444 | | RuntimeProfile::Counter* _spill_read_file_size = nullptr; |
445 | | RuntimeProfile::Counter* _spill_read_rows_count = nullptr; |
446 | | RuntimeProfile::Counter* _spill_read_file_count = nullptr; |
447 | | }; |
448 | | |
449 | | class DataSinkOperatorXBase; |
450 | | |
451 | | class PipelineXSinkLocalStateBase { |
452 | | public: |
453 | | PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent_, RuntimeState* state_); |
454 | 72.3k | virtual ~PipelineXSinkLocalStateBase() = default; |
455 | | |
456 | | // Do initialization. This step should be executed only once and in bthread, so we can do some |
457 | | // lightweight or non-idempotent operations (e.g. init profile, clone expr ctx from operatorX) |
458 | | virtual Status init(RuntimeState* state, LocalSinkStateInfo& info) = 0; |
459 | | |
460 | | virtual Status prepare(RuntimeState* state) = 0; |
461 | | // Do initialization. This step can be executed multiple times, so we should make sure it is |
462 | | // idempotent (e.g. wait for runtime filters). |
463 | | virtual Status open(RuntimeState* state) = 0; |
464 | | virtual Status terminate(RuntimeState* state) = 0; |
465 | | virtual Status close(RuntimeState* state, Status exec_status) = 0; |
466 | 4 | [[nodiscard]] virtual bool is_finished() const { return false; } |
467 | 0 | [[nodiscard]] virtual bool is_blockable() const { return false; } |
468 | | |
469 | | [[nodiscard]] virtual std::string debug_string(int indentation_level) const = 0; |
470 | | |
471 | | template <class TARGET> |
472 | 312k | TARGET& cast() { |
473 | 312k | DCHECK(dynamic_cast<TARGET*>(this)) |
474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() |
475 | 0 | << " and expect type is" << typeid(TARGET).name(); |
476 | 312k | return reinterpret_cast<TARGET&>(*this); |
477 | 312k | } _ZN5doris27PipelineXSinkLocalStateBase4castINS_22ExchangeSinkLocalStateEEERT_v Line | Count | Source | 472 | 11 | TARGET& cast() { | 473 | 11 | DCHECK(dynamic_cast<TARGET*>(this)) | 474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 475 | 0 | << " and expect type is" << typeid(TARGET).name(); | 476 | 11 | return reinterpret_cast<TARGET&>(*this); | 477 | 11 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_17AggSinkLocalStateEEERT_v Line | Count | Source | 472 | 191 | TARGET& cast() { | 473 | 191 | DCHECK(dynamic_cast<TARGET*>(this)) | 474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 475 | 0 | << " and expect type is" << typeid(TARGET).name(); | 476 | 191 | return reinterpret_cast<TARGET&>(*this); | 477 | 191 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_27HashJoinBuildSinkLocalStateEEERT_v Line | Count | Source | 472 | 312k | TARGET& cast() { | 473 | 312k | DCHECK(dynamic_cast<TARGET*>(this)) | 474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 475 | 0 | << " and expect type is" << typeid(TARGET).name(); | 476 | 312k | return reinterpret_cast<TARGET&>(*this); | 477 | 312k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_19UnionSinkLocalStateEEERT_v Line | Count | Source | 472 | 16 | TARGET& cast() { | 473 | 16 | DCHECK(dynamic_cast<TARGET*>(this)) | 474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 475 | 0 | << " and expect type is" << typeid(TARGET).name(); | 476 | 16 | return reinterpret_cast<TARGET&>(*this); | 477 | 16 | } |
Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_27LocalExchangeSinkLocalStateEEERT_v _ZN5doris27PipelineXSinkLocalStateBase4castINS_19DummySinkLocalStateEEERT_v Line | Count | Source | 472 | 1 | TARGET& cast() { | 473 | 1 | DCHECK(dynamic_cast<TARGET*>(this)) | 474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 475 | 0 | << " and expect type is" << typeid(TARGET).name(); | 476 | 1 | return reinterpret_cast<TARGET&>(*this); | 477 | 1 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_22AnalyticSinkLocalStateEEERT_v Line | Count | Source | 472 | 74 | TARGET& cast() { | 473 | 74 | DCHECK(dynamic_cast<TARGET*>(this)) | 474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 475 | 0 | << " and expect type is" << typeid(TARGET).name(); | 476 | 74 | return reinterpret_cast<TARGET&>(*this); | 477 | 74 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_19CacheSinkLocalStateEEERT_v Line | Count | Source | 472 | 3 | TARGET& cast() { | 473 | 3 | DCHECK(dynamic_cast<TARGET*>(this)) | 474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 475 | 0 | << " and expect type is" << typeid(TARGET).name(); | 476 | 3 | return reinterpret_cast<TARGET&>(*this); | 477 | 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 | 472 | 112 | TARGET& cast() { | 473 | 112 | DCHECK(dynamic_cast<TARGET*>(this)) | 474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 475 | 0 | << " and expect type is" << typeid(TARGET).name(); | 476 | 112 | return reinterpret_cast<TARGET&>(*this); | 477 | 112 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_23SpillSortSinkLocalStateEEERT_v Line | Count | Source | 472 | 45 | TARGET& cast() { | 473 | 45 | DCHECK(dynamic_cast<TARGET*>(this)) | 474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 475 | 0 | << " and expect type is" << typeid(TARGET).name(); | 476 | 45 | return reinterpret_cast<TARGET&>(*this); | 477 | 45 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_28PartitionedAggSinkLocalStateEEERT_v Line | Count | Source | 472 | 104 | TARGET& cast() { | 473 | 104 | DCHECK(dynamic_cast<TARGET*>(this)) | 474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 475 | 0 | << " and expect type is" << typeid(TARGET).name(); | 476 | 104 | return reinterpret_cast<TARGET&>(*this); | 477 | 104 | } |
Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_33MultiCastDataStreamSinkLocalStateEEERT_v _ZN5doris27PipelineXSinkLocalStateBase4castINS_27PartitionSortSinkLocalStateEEERT_v Line | Count | Source | 472 | 104 | TARGET& cast() { | 473 | 104 | DCHECK(dynamic_cast<TARGET*>(this)) | 474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 475 | 0 | << " and expect type is" << typeid(TARGET).name(); | 476 | 104 | return reinterpret_cast<TARGET&>(*this); | 477 | 104 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_22SetProbeSinkLocalStateILb1EEEEERT_v Line | Count | Source | 472 | 8 | TARGET& cast() { | 473 | 8 | DCHECK(dynamic_cast<TARGET*>(this)) | 474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 475 | 0 | << " and expect type is" << typeid(TARGET).name(); | 476 | 8 | return reinterpret_cast<TARGET&>(*this); | 477 | 8 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_22SetProbeSinkLocalStateILb0EEEEERT_v Line | Count | Source | 472 | 5 | TARGET& cast() { | 473 | 5 | DCHECK(dynamic_cast<TARGET*>(this)) | 474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 475 | 0 | << " and expect type is" << typeid(TARGET).name(); | 476 | 5 | return reinterpret_cast<TARGET&>(*this); | 477 | 5 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_17SetSinkLocalStateILb1EEEEERT_v Line | Count | Source | 472 | 6 | TARGET& cast() { | 473 | 6 | DCHECK(dynamic_cast<TARGET*>(this)) | 474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 475 | 0 | << " and expect type is" << typeid(TARGET).name(); | 476 | 6 | return reinterpret_cast<TARGET&>(*this); | 477 | 6 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_17SetSinkLocalStateILb0EEEEERT_v Line | Count | Source | 472 | 4 | TARGET& cast() { | 473 | 4 | DCHECK(dynamic_cast<TARGET*>(this)) | 474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 475 | 0 | << " and expect type is" << typeid(TARGET).name(); | 476 | 4 | return reinterpret_cast<TARGET&>(*this); | 477 | 4 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_33PartitionedHashJoinSinkLocalStateEEERT_v Line | Count | Source | 472 | 8 | TARGET& cast() { | 473 | 8 | DCHECK(dynamic_cast<TARGET*>(this)) | 474 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 475 | 0 | << " and expect type is" << typeid(TARGET).name(); | 476 | 8 | return reinterpret_cast<TARGET&>(*this); | 477 | 8 | } |
Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_30GroupCommitBlockSinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_18DictSinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_20RecCTESinkLocalStateEEERT_v Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_26RecCTEAnchorSinkLocalStateEEERT_v |
478 | | template <class TARGET> |
479 | | const TARGET& cast() const { |
480 | | DCHECK(dynamic_cast<const TARGET*>(this)) |
481 | | << " Mismatch type! Current type is " << typeid(*this).name() |
482 | | << " and expect type is" << typeid(TARGET).name(); |
483 | | return reinterpret_cast<const TARGET&>(*this); |
484 | | } |
485 | | |
486 | 46.3k | DataSinkOperatorXBase* parent() { return _parent; } |
487 | 106 | RuntimeState* state() { return _state; } |
488 | 103 | RuntimeProfile* operator_profile() { return _operator_profile; } |
489 | 45 | RuntimeProfile* common_profile() { return _common_profile; } |
490 | 795k | RuntimeProfile* custom_profile() { return _custom_profile; } |
491 | | |
492 | 1 | [[nodiscard]] RuntimeProfile* faker_runtime_profile() const { |
493 | 1 | return _faker_runtime_profile.get(); |
494 | 1 | } |
495 | | |
496 | 96.4k | RuntimeProfile::Counter* rows_input_counter() { return _rows_input_counter; } |
497 | 264k | RuntimeProfile::Counter* exec_time_counter() { return _exec_timer; } |
498 | 67 | RuntimeProfile::Counter* memory_used_counter() { return _memory_used_counter; } |
499 | | |
500 | 0 | virtual std::vector<Dependency*> dependencies() const { return {nullptr}; } |
501 | | |
502 | | // override in exchange sink , AsyncWriterSink |
503 | 0 | virtual Dependency* finishdependency() { return nullptr; } |
504 | | |
505 | 20 | bool low_memory_mode() { return _state->low_memory_mode(); } |
506 | | |
507 | | protected: |
508 | | DataSinkOperatorXBase* _parent = nullptr; |
509 | | RuntimeState* _state = nullptr; |
510 | | RuntimeProfile* _operator_profile = nullptr; |
511 | | RuntimeProfile* _common_profile = nullptr; |
512 | | RuntimeProfile* _custom_profile = nullptr; |
513 | | // Set to true after close() has been called. subclasses should check and set this in |
514 | | // close(). |
515 | | bool _closed = false; |
516 | | bool _terminated = false; |
517 | | //NOTICE: now add a faker profile, because sometimes the profile record is useless |
518 | | //so we want remove some counters and timers, eg: in join node, if it's broadcast_join |
519 | | //and shared hash table, some counter/timer about build hash table is useless, |
520 | | //so we could add those counter/timer in faker profile, and those will not display in web profile. |
521 | | std::unique_ptr<RuntimeProfile> _faker_runtime_profile = |
522 | | std::make_unique<RuntimeProfile>("faker profile"); |
523 | | |
524 | | RuntimeProfile::Counter* _rows_input_counter = nullptr; |
525 | | RuntimeProfile::Counter* _init_timer = nullptr; |
526 | | RuntimeProfile::Counter* _open_timer = nullptr; |
527 | | RuntimeProfile::Counter* _close_timer = nullptr; |
528 | | RuntimeProfile::Counter* _wait_for_dependency_timer = nullptr; |
529 | | RuntimeProfile::Counter* _wait_for_finish_dependency_timer = nullptr; |
530 | | RuntimeProfile::Counter* _exec_timer = nullptr; |
531 | | RuntimeProfile::HighWaterMarkCounter* _memory_used_counter = nullptr; |
532 | | }; |
533 | | |
534 | | template <typename SharedStateArg = FakeSharedState> |
535 | | class PipelineXSinkLocalState : public PipelineXSinkLocalStateBase { |
536 | | public: |
537 | | using SharedStateType = SharedStateArg; |
538 | | PipelineXSinkLocalState(DataSinkOperatorXBase* parent, RuntimeState* state) |
539 | 72.3k | : PipelineXSinkLocalStateBase(parent, state) {}_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 539 | 26 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 539 | 9 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 539 | 102 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 539 | 7 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 539 | 3 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 539 | 23 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 539 | 26 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 539 | 3 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 539 | 21 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 539 | 47 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 539 | 72.0k | : PipelineXSinkLocalStateBase(parent, state) {} |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 539 | 17 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 539 | 20 | : PipelineXSinkLocalStateBase(parent, state) {} |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 539 | 15 | : PipelineXSinkLocalStateBase(parent, state) {} |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE |
540 | 72.3k | ~PipelineXSinkLocalState() override = default; _ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEED2Ev Line | Count | Source | 540 | 26 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEED2Ev Line | Count | Source | 540 | 9 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEED2Ev Line | Count | Source | 540 | 102 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEED2Ev Line | Count | Source | 540 | 20 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEED2Ev Line | Count | Source | 540 | 72.0k | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEED2Ev Line | Count | Source | 540 | 7 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEED2Ev Line | Count | Source | 540 | 3 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEED2Ev Line | Count | Source | 540 | 23 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEED2Ev Line | Count | Source | 540 | 26 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEED2Ev Line | Count | Source | 540 | 3 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEED2Ev Line | Count | Source | 540 | 21 | ~PipelineXSinkLocalState() override = default; |
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEED2Ev Line | Count | Source | 540 | 47 | ~PipelineXSinkLocalState() override = default; |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEED2Ev _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEED2Ev Line | Count | Source | 540 | 15 | ~PipelineXSinkLocalState() override = default; |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEED2Ev Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEED2Ev _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEED2Ev Line | Count | Source | 540 | 17 | ~PipelineXSinkLocalState() override = default; |
|
541 | | |
542 | | Status init(RuntimeState* state, LocalSinkStateInfo& info) override; |
543 | | |
544 | 66 | Status prepare(RuntimeState* state) override { return Status::OK(); }_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 544 | 22 | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 544 | 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 | 544 | 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_20SpillSortSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE7prepareEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE7prepareEPNS_12RuntimeStateE |
545 | 72.3k | Status open(RuntimeState* state) override { return Status::OK(); }_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 545 | 7 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 545 | 8 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 545 | 47 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 545 | 9 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 545 | 102 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 545 | 20 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 545 | 2 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 545 | 72.0k | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 545 | 3 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 545 | 23 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 545 | 26 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 545 | 17 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 545 | 3 | Status open(RuntimeState* state) override { return Status::OK(); } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE |
546 | | |
547 | | Status terminate(RuntimeState* state) override; |
548 | | Status close(RuntimeState* state, Status exec_status) override; |
549 | | |
550 | | [[nodiscard]] std::string debug_string(int indentation_level) const override; |
551 | | |
552 | | virtual std::string name_suffix(); |
553 | | |
554 | 44 | std::vector<Dependency*> dependencies() const override { |
555 | 44 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; |
556 | 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 | 554 | 2 | std::vector<Dependency*> dependencies() const override { | 555 | 2 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 556 | 2 | } |
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12dependenciesEv _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12dependenciesEv Line | Count | Source | 554 | 35 | std::vector<Dependency*> dependencies() const override { | 555 | 35 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 556 | 35 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12dependenciesEv Line | Count | Source | 554 | 1 | std::vector<Dependency*> dependencies() const override { | 555 | 1 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 556 | 1 | } |
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12dependenciesEv _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12dependenciesEv Line | Count | Source | 554 | 6 | std::vector<Dependency*> dependencies() const override { | 555 | 6 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 556 | 6 | } |
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12dependenciesEv |
557 | | |
558 | 72.3k | virtual bool must_set_shared_state() const { |
559 | 72.3k | return !std::is_same_v<SharedStateArg, FakeSharedState>; |
560 | 72.3k | } _ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE21must_set_shared_stateEv Line | Count | Source | 558 | 7 | virtual bool must_set_shared_state() const { | 559 | 7 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 560 | 7 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE21must_set_shared_stateEv Line | Count | Source | 558 | 15 | virtual bool must_set_shared_state() const { | 559 | 15 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 560 | 15 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE21must_set_shared_stateEv Line | Count | Source | 558 | 47 | virtual bool must_set_shared_state() const { | 559 | 47 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 560 | 47 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE21must_set_shared_stateEv Line | Count | Source | 558 | 9 | virtual bool must_set_shared_state() const { | 559 | 9 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 560 | 9 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE21must_set_shared_stateEv Line | Count | Source | 558 | 102 | virtual bool must_set_shared_state() const { | 559 | 102 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 560 | 102 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE21must_set_shared_stateEv Line | Count | Source | 558 | 20 | virtual bool must_set_shared_state() const { | 559 | 20 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 560 | 20 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE21must_set_shared_stateEv Line | Count | Source | 558 | 2 | virtual bool must_set_shared_state() const { | 559 | 2 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 560 | 2 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE21must_set_shared_stateEv Line | Count | Source | 558 | 72.0k | virtual bool must_set_shared_state() const { | 559 | 72.0k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 560 | 72.0k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE21must_set_shared_stateEv Line | Count | Source | 558 | 3 | virtual bool must_set_shared_state() const { | 559 | 3 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 560 | 3 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE21must_set_shared_stateEv Line | Count | Source | 558 | 23 | virtual bool must_set_shared_state() const { | 559 | 23 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 560 | 23 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE21must_set_shared_stateEv Line | Count | Source | 558 | 26 | virtual bool must_set_shared_state() const { | 559 | 26 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 560 | 26 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE21must_set_shared_stateEv Line | Count | Source | 558 | 17 | virtual bool must_set_shared_state() const { | 559 | 17 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 560 | 17 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE21must_set_shared_stateEv Line | Count | Source | 558 | 3 | virtual bool must_set_shared_state() const { | 559 | 3 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 560 | 3 | } |
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE21must_set_shared_stateEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE21must_set_shared_stateEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE21must_set_shared_stateEv Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE21must_set_shared_stateEv |
561 | | |
562 | | protected: |
563 | | Dependency* _dependency = nullptr; |
564 | | SharedStateType* _shared_state = nullptr; |
565 | | }; |
566 | | |
567 | | class DataSinkOperatorXBase : public OperatorBase { |
568 | | public: |
569 | | DataSinkOperatorXBase(const int operator_id, const int node_id, const int dest_id) |
570 | 103 | : _operator_id(operator_id), _node_id(node_id), _dests_id({dest_id}) {} |
571 | | DataSinkOperatorXBase(const int operator_id, const TPlanNode& tnode, const int dest_id) |
572 | 72.1k | : OperatorBase(tnode.__isset.is_serial_operator && tnode.is_serial_operator), |
573 | 72.1k | _operator_id(operator_id), |
574 | 72.1k | _node_id(tnode.node_id), |
575 | 72.1k | _dests_id({dest_id}) {} |
576 | | |
577 | | DataSinkOperatorXBase(const int operator_id, const int node_id, std::vector<int>& dests) |
578 | 0 | : _operator_id(operator_id), _node_id(node_id), _dests_id(dests) {} |
579 | | |
580 | | #ifdef BE_TEST |
581 | 72.2k | DataSinkOperatorXBase() : _operator_id(-1), _node_id(0), _dests_id({-1}) {}; |
582 | | #endif |
583 | | |
584 | 144k | ~DataSinkOperatorXBase() override = default; |
585 | | |
586 | | // For agg/sort/join sink. |
587 | | virtual Status init(const TPlanNode& tnode, RuntimeState* state); |
588 | | |
589 | 10 | virtual bool reset_to_rerun(RuntimeState* state, OperatorXBase* root) const { return false; } |
590 | | |
591 | | Status init(const TDataSink& tsink) override; |
592 | | [[nodiscard]] virtual Status init(RuntimeState* state, ExchangeType type, const int num_buckets, |
593 | | const bool use_global_hash_shuffle, |
594 | 0 | const std::map<int, int>& shuffle_idx_to_instance_idx) { |
595 | 0 | return Status::InternalError("init() is only implemented in local exchange!"); |
596 | 0 | } |
597 | | |
598 | 72.1k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
599 | | Status terminate(RuntimeState* state) override; |
600 | 1.37M | [[nodiscard]] bool is_finished(RuntimeState* state) const { |
601 | 1.37M | auto result = state->get_sink_local_state_result(); |
602 | 1.37M | if (!result) { |
603 | 0 | return result.error(); |
604 | 0 | } |
605 | 1.37M | return result.value()->is_finished(); |
606 | 1.37M | } |
607 | | |
608 | | [[nodiscard]] virtual Status sink(RuntimeState* state, Block* block, bool eos) = 0; |
609 | | |
610 | | [[nodiscard]] virtual Status setup_local_state(RuntimeState* state, |
611 | | LocalSinkStateInfo& info) = 0; |
612 | | |
613 | | // Returns the memory this sink operator expects to allocate in the next |
614 | | // execution round (sink only — pipeline task sums all operators + sink). |
615 | 907 | [[nodiscard]] virtual size_t get_reserve_mem_size(RuntimeState* state, bool eos) { |
616 | 907 | return state->minimum_operator_memory_required_bytes(); |
617 | 907 | } |
618 | 0 | bool is_blockable(RuntimeState* state) const override { |
619 | 0 | return state->get_sink_local_state()->is_blockable(); |
620 | 0 | } |
621 | | |
622 | 0 | [[nodiscard]] bool is_spillable() const { return _spillable; } |
623 | | |
624 | | template <class TARGET> |
625 | 814k | TARGET& cast() { |
626 | 814k | DCHECK(dynamic_cast<TARGET*>(this)) |
627 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() |
628 | 0 | << " and expect type is" << typeid(TARGET).name(); |
629 | 814k | return reinterpret_cast<TARGET&>(*this); |
630 | 814k | } _ZN5doris21DataSinkOperatorXBase4castINS_18DummySinkOperatorXEEERT_v Line | Count | Source | 625 | 38 | TARGET& cast() { | 626 | 38 | DCHECK(dynamic_cast<TARGET*>(this)) | 627 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 628 | 0 | << " and expect type is" << typeid(TARGET).name(); | 629 | 38 | return reinterpret_cast<TARGET&>(*this); | 630 | 38 | } |
Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_26LocalExchangeSinkOperatorXEEERT_v _ZN5doris21DataSinkOperatorXBase4castINS_16AggSinkOperatorXEEERT_v Line | Count | Source | 625 | 178 | TARGET& cast() { | 626 | 178 | DCHECK(dynamic_cast<TARGET*>(this)) | 627 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 628 | 0 | << " and expect type is" << typeid(TARGET).name(); | 629 | 178 | return reinterpret_cast<TARGET&>(*this); | 630 | 178 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_21AnalyticSinkOperatorXEEERT_v Line | Count | Source | 625 | 101 | TARGET& cast() { | 626 | 101 | DCHECK(dynamic_cast<TARGET*>(this)) | 627 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 628 | 0 | << " and expect type is" << typeid(TARGET).name(); | 629 | 101 | return reinterpret_cast<TARGET&>(*this); | 630 | 101 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_21ExchangeSinkOperatorXEEERT_v Line | Count | Source | 625 | 24 | TARGET& cast() { | 626 | 24 | DCHECK(dynamic_cast<TARGET*>(this)) | 627 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 628 | 0 | << " and expect type is" << typeid(TARGET).name(); | 629 | 24 | return reinterpret_cast<TARGET&>(*this); | 630 | 24 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_26HashJoinBuildSinkOperatorXEEERT_v Line | Count | Source | 625 | 814k | TARGET& cast() { | 626 | 814k | DCHECK(dynamic_cast<TARGET*>(this)) | 627 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 628 | 0 | << " and expect type is" << typeid(TARGET).name(); | 629 | 814k | return reinterpret_cast<TARGET&>(*this); | 630 | 814k | } |
Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_32NestedLoopJoinBuildSinkOperatorXEEERT_v _ZN5doris21DataSinkOperatorXBase4castINS_32PartitionedHashJoinSinkOperatorXEEERT_v Line | Count | Source | 625 | 17 | TARGET& cast() { | 626 | 17 | DCHECK(dynamic_cast<TARGET*>(this)) | 627 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 628 | 0 | << " and expect type is" << typeid(TARGET).name(); | 629 | 17 | return reinterpret_cast<TARGET&>(*this); | 630 | 17 | } |
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 | 625 | 102 | TARGET& cast() { | 626 | 102 | DCHECK(dynamic_cast<TARGET*>(this)) | 627 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 628 | 0 | << " and expect type is" << typeid(TARGET).name(); | 629 | 102 | return reinterpret_cast<TARGET&>(*this); | 630 | 102 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_27PartitionedAggSinkOperatorXEEERT_v Line | Count | Source | 625 | 173 | TARGET& cast() { | 626 | 173 | DCHECK(dynamic_cast<TARGET*>(this)) | 627 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 628 | 0 | << " and expect type is" << typeid(TARGET).name(); | 629 | 173 | return reinterpret_cast<TARGET&>(*this); | 630 | 173 | } |
Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_25RecCTEAnchorSinkOperatorXEEERT_v Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_19RecCTESinkOperatorXEEERT_v Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_19ResultSinkOperatorXEEERT_v _ZN5doris21DataSinkOperatorXBase4castINS_21SetProbeSinkOperatorXILb1EEEEERT_v Line | Count | Source | 625 | 8 | TARGET& cast() { | 626 | 8 | DCHECK(dynamic_cast<TARGET*>(this)) | 627 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 628 | 0 | << " and expect type is" << typeid(TARGET).name(); | 629 | 8 | return reinterpret_cast<TARGET&>(*this); | 630 | 8 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_21SetProbeSinkOperatorXILb0EEEEERT_v Line | Count | Source | 625 | 5 | TARGET& cast() { | 626 | 5 | DCHECK(dynamic_cast<TARGET*>(this)) | 627 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 628 | 0 | << " and expect type is" << typeid(TARGET).name(); | 629 | 5 | return reinterpret_cast<TARGET&>(*this); | 630 | 5 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_16SetSinkOperatorXILb1EEEEERT_v Line | Count | Source | 625 | 12 | TARGET& cast() { | 626 | 12 | DCHECK(dynamic_cast<TARGET*>(this)) | 627 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 628 | 0 | << " and expect type is" << typeid(TARGET).name(); | 629 | 12 | return reinterpret_cast<TARGET&>(*this); | 630 | 12 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_16SetSinkOperatorXILb0EEEEERT_v Line | Count | Source | 625 | 8 | TARGET& cast() { | 626 | 8 | DCHECK(dynamic_cast<TARGET*>(this)) | 627 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 628 | 0 | << " and expect type is" << typeid(TARGET).name(); | 629 | 8 | return reinterpret_cast<TARGET&>(*this); | 630 | 8 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_17SortSinkOperatorXEEERT_v Line | Count | Source | 625 | 26 | TARGET& cast() { | 626 | 26 | DCHECK(dynamic_cast<TARGET*>(this)) | 627 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 628 | 0 | << " and expect type is" << typeid(TARGET).name(); | 629 | 26 | return reinterpret_cast<TARGET&>(*this); | 630 | 26 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_22SpillSortSinkOperatorXEEERT_v Line | Count | Source | 625 | 45 | TARGET& cast() { | 626 | 45 | DCHECK(dynamic_cast<TARGET*>(this)) | 627 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 628 | 0 | << " and expect type is" << typeid(TARGET).name(); | 629 | 45 | return reinterpret_cast<TARGET&>(*this); | 630 | 45 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_18UnionSinkOperatorXEEERT_v Line | Count | Source | 625 | 6 | TARGET& cast() { | 626 | 6 | DCHECK(dynamic_cast<TARGET*>(this)) | 627 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 628 | 0 | << " and expect type is" << typeid(TARGET).name(); | 629 | 6 | return reinterpret_cast<TARGET&>(*this); | 630 | 6 | } |
|
631 | | template <class TARGET> |
632 | | const TARGET& cast() const { |
633 | | DCHECK(dynamic_cast<const TARGET*>(this)) |
634 | | << " Mismatch type! Current type is " << typeid(*this).name() |
635 | | << " and expect type is" << typeid(TARGET).name(); |
636 | | return reinterpret_cast<const TARGET&>(*this); |
637 | | } |
638 | | |
639 | | [[nodiscard]] virtual std::shared_ptr<BasicSharedState> create_shared_state() const = 0; |
640 | | |
641 | 0 | Status close(RuntimeState* state) override { |
642 | 0 | return Status::InternalError("Should not reach here!"); |
643 | 0 | } |
644 | | |
645 | | [[nodiscard]] virtual std::string debug_string(int indentation_level) const; |
646 | | |
647 | | [[nodiscard]] virtual std::string debug_string(RuntimeState* state, |
648 | | int indentation_level) const; |
649 | | |
650 | 144k | [[nodiscard]] bool is_sink() const override { return true; } |
651 | | |
652 | 72.0k | static Status close(RuntimeState* state, Status exec_status) { |
653 | 72.0k | auto result = state->get_sink_local_state_result(); |
654 | 72.0k | if (!result) { |
655 | 0 | return result.error(); |
656 | 0 | } |
657 | 72.0k | return result.value()->close(state, exec_status); |
658 | 72.0k | } |
659 | | |
660 | 264k | [[nodiscard]] int operator_id() const { return _operator_id; } |
661 | | |
662 | 289k | [[nodiscard]] const std::vector<int>& dests_id() const { return _dests_id; } |
663 | | |
664 | 144k | [[nodiscard]] int nereids_id() const { return _nereids_id; } |
665 | | |
666 | 344k | [[nodiscard]] int node_id() const override { return _node_id; } |
667 | | |
668 | 218k | [[nodiscard]] std::string get_name() const override { return _name; } |
669 | | |
670 | 11 | virtual bool should_dry_run(RuntimeState* state) { return false; } |
671 | | |
672 | 0 | [[nodiscard]] virtual bool count_down_destination() { return true; } |
673 | | |
674 | | protected: |
675 | | template <typename Writer, typename Parent> |
676 | | requires(std::is_base_of_v<AsyncResultWriter, Writer>) |
677 | | friend class AsyncWriterSink; |
678 | | // _operator_id : the current Operator's ID, which is not visible to the user. |
679 | | // _node_id : the plan node ID corresponding to the Operator, which is visible on the profile. |
680 | | // _dests_id : the target _operator_id of the sink, for example, in the case of a multi-sink, there are multiple targets. |
681 | | const int _operator_id; |
682 | | const int _node_id; |
683 | | int _nereids_id = -1; |
684 | | bool _spillable = false; |
685 | | std::vector<int> _dests_id; |
686 | | std::string _name; |
687 | | }; |
688 | | |
689 | | template <typename LocalStateType> |
690 | | class DataSinkOperatorX : public DataSinkOperatorXBase { |
691 | | public: |
692 | | DataSinkOperatorX(const int id, const int node_id, const int dest_id) |
693 | 103 | : DataSinkOperatorXBase(id, node_id, dest_id) {}_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEEC2Eiii Line | Count | Source | 693 | 27 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_19DummySinkLocalStateEEC2Eiii Line | Count | Source | 693 | 18 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEEC2Eiii _ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEEC2Eiii Line | Count | Source | 693 | 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 | 693 | 19 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEEC2Eiii _ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEEC2Eiii Line | Count | Source | 693 | 29 | : 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 |
694 | | DataSinkOperatorX(const int id, const TPlanNode& tnode, const int dest_id) |
695 | 72.1k | : DataSinkOperatorXBase(id, tnode, dest_id) {}Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19DummySinkLocalStateEEC2EiRKNS_9TPlanNodeEi _ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Line | Count | Source | 695 | 29 | : DataSinkOperatorXBase(id, tnode, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEEC2EiRKNS_9TPlanNodeEi _ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Line | Count | Source | 695 | 72.0k | : DataSinkOperatorXBase(id, tnode, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEEC2EiRKNS_9TPlanNodeEi _ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Line | Count | Source | 695 | 49 | : 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 | 695 | 19 | : 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 |
696 | | |
697 | | DataSinkOperatorX(const int id, const int node_id, std::vector<int> dest_ids) |
698 | 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 |
699 | | #ifdef BE_TEST |
700 | 150 | DataSinkOperatorX() = default; _ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEEC2Ev Line | Count | Source | 700 | 9 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEEC2Ev Line | Count | Source | 700 | 102 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEEC2Ev Line | Count | Source | 700 | 3 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEEC2Ev Line | Count | Source | 700 | 6 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEEC2Ev Line | Count | Source | 700 | 8 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEEC2Ev Line | Count | Source | 700 | 4 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEEC2Ev Line | Count | Source | 700 | 5 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEEC2Ev Line | Count | Source | 700 | 9 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEEC2Ev Line | Count | Source | 700 | 3 | DataSinkOperatorX() = default; |
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEEC2Ev Line | Count | Source | 700 | 1 | DataSinkOperatorX() = default; |
|
701 | | #endif |
702 | 72.4k | ~DataSinkOperatorX() override = default; _ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEED2Ev Line | Count | Source | 702 | 56 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEED2Ev Line | Count | Source | 702 | 9 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEED2Ev Line | Count | Source | 702 | 10 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEED2Ev Line | Count | Source | 702 | 102 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEED2Ev Line | Count | Source | 702 | 72.0k | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEED2Ev Line | Count | Source | 702 | 49 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEED2Ev Line | Count | Source | 702 | 3 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEED2Ev Line | Count | Source | 702 | 6 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEED2Ev Line | Count | Source | 702 | 8 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEED2Ev Line | Count | Source | 702 | 4 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEED2Ev Line | Count | Source | 702 | 5 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEED2Ev Line | Count | Source | 702 | 28 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEED2Ev Line | Count | Source | 702 | 19 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEED2Ev Line | Count | Source | 702 | 3 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEED2Ev Line | Count | Source | 702 | 1 | ~DataSinkOperatorX() override = default; |
_ZN5doris17DataSinkOperatorXINS_19DummySinkLocalStateEED2Ev Line | Count | Source | 702 | 18 | ~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 | 702 | 29 | ~DataSinkOperatorX() override = default; |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEED2Ev |
703 | | |
704 | | Status setup_local_state(RuntimeState* state, LocalSinkStateInfo& info) override; |
705 | | std::shared_ptr<BasicSharedState> create_shared_state() const override; |
706 | | |
707 | | using LocalState = LocalStateType; |
708 | 312k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { |
709 | 312k | return state->get_sink_local_state()->template cast<LocalState>(); |
710 | 312k | } _ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 708 | 10 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 709 | 10 | return state->get_sink_local_state()->template cast<LocalState>(); | 710 | 10 | } |
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 708 | 191 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 709 | 191 | return state->get_sink_local_state()->template cast<LocalState>(); | 710 | 191 | } |
_ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 708 | 16 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 709 | 16 | return state->get_sink_local_state()->template cast<LocalState>(); | 710 | 16 | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19DummySinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE _ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 708 | 74 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 709 | 74 | return state->get_sink_local_state()->template cast<LocalState>(); | 710 | 74 | } |
_ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 708 | 3 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 709 | 3 | return state->get_sink_local_state()->template cast<LocalState>(); | 710 | 3 | } |
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 708 | 312k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 709 | 312k | return state->get_sink_local_state()->template cast<LocalState>(); | 710 | 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 | 708 | 112 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 709 | 112 | return state->get_sink_local_state()->template cast<LocalState>(); | 710 | 112 | } |
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 708 | 45 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 709 | 45 | return state->get_sink_local_state()->template cast<LocalState>(); | 710 | 45 | } |
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 708 | 104 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 709 | 104 | return state->get_sink_local_state()->template cast<LocalState>(); | 710 | 104 | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE _ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 708 | 104 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 709 | 104 | return state->get_sink_local_state()->template cast<LocalState>(); | 710 | 104 | } |
_ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 708 | 8 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 709 | 8 | return state->get_sink_local_state()->template cast<LocalState>(); | 710 | 8 | } |
_ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 708 | 5 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 709 | 5 | return state->get_sink_local_state()->template cast<LocalState>(); | 710 | 5 | } |
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 708 | 6 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 709 | 6 | return state->get_sink_local_state()->template cast<LocalState>(); | 710 | 6 | } |
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 708 | 4 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 709 | 4 | return state->get_sink_local_state()->template cast<LocalState>(); | 710 | 4 | } |
_ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 708 | 8 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 709 | 8 | return state->get_sink_local_state()->template cast<LocalState>(); | 710 | 8 | } |
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 |
711 | | }; |
712 | | |
713 | | template <typename SharedStateArg> |
714 | | class PipelineXSpillSinkLocalState : public PipelineXSinkLocalState<SharedStateArg> { |
715 | | public: |
716 | | using Base = PipelineXSinkLocalState<SharedStateArg>; |
717 | | PipelineXSpillSinkLocalState(DataSinkOperatorXBase* parent, RuntimeState* state) |
718 | 44 | : Base(parent, state) {}_ZN5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 718 | 7 | : Base(parent, state) {} |
Unexecuted instantiation: _ZN5doris28PipelineXSpillSinkLocalStateINS_20MultiCastSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE _ZN5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 718 | 20 | : Base(parent, state) {} |
_ZN5doris28PipelineXSpillSinkLocalStateINS_20SpillSortSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 718 | 17 | : Base(parent, state) {} |
|
719 | 44 | ~PipelineXSpillSinkLocalState() override = default; _ZN5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEED2Ev Line | Count | Source | 719 | 20 | ~PipelineXSpillSinkLocalState() override = default; |
_ZN5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEED2Ev Line | Count | Source | 719 | 7 | ~PipelineXSpillSinkLocalState() override = default; |
Unexecuted instantiation: _ZN5doris28PipelineXSpillSinkLocalStateINS_20MultiCastSharedStateEED2Ev _ZN5doris28PipelineXSpillSinkLocalStateINS_20SpillSortSharedStateEED2Ev Line | Count | Source | 719 | 17 | ~PipelineXSpillSinkLocalState() override = default; |
|
720 | | |
721 | 39 | Status init(RuntimeState* state, LocalSinkStateInfo& info) override { |
722 | 39 | RETURN_IF_ERROR(Base::init(state, info)); |
723 | 39 | init_spill_counters(); |
724 | 39 | return Status::OK(); |
725 | 39 | } _ZN5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 721 | 20 | Status init(RuntimeState* state, LocalSinkStateInfo& info) override { | 722 | 20 | RETURN_IF_ERROR(Base::init(state, info)); | 723 | 20 | init_spill_counters(); | 724 | 20 | return Status::OK(); | 725 | 20 | } |
_ZN5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 721 | 2 | Status init(RuntimeState* state, LocalSinkStateInfo& info) override { | 722 | 2 | RETURN_IF_ERROR(Base::init(state, info)); | 723 | 2 | init_spill_counters(); | 724 | 2 | return Status::OK(); | 725 | 2 | } |
_ZN5doris28PipelineXSpillSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 721 | 17 | Status init(RuntimeState* state, LocalSinkStateInfo& info) override { | 722 | 17 | RETURN_IF_ERROR(Base::init(state, info)); | 723 | 17 | init_spill_counters(); | 724 | 17 | return Status::OK(); | 725 | 17 | } |
Unexecuted instantiation: _ZN5doris28PipelineXSpillSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE |
726 | | |
727 | 44 | void init_spill_counters() { |
728 | 44 | _spill_write_file_total_count = ADD_COUNTER_WITH_LEVEL( |
729 | 44 | Base::custom_profile(), "SpillWriteFileTotalCount", TUnit::UNIT, 1); |
730 | 44 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( |
731 | 44 | Base::custom_profile(), "SpillWriteFileBytes", TUnit::BYTES, 1); |
732 | 44 | _spill_write_file_timer = |
733 | 44 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteFileTime", 1); |
734 | | |
735 | 44 | _spill_write_serialize_block_timer = |
736 | 44 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteSerializeBlockTime", 1); |
737 | 44 | _spill_write_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), |
738 | 44 | "SpillWriteBlockCount", TUnit::UNIT, 1); |
739 | 44 | _spill_write_block_data_size = ADD_COUNTER_WITH_LEVEL( |
740 | 44 | Base::custom_profile(), "SpillWriteBlockBytes", TUnit::BYTES, 1); |
741 | 44 | _spill_write_rows_count = |
742 | 44 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillWriteRows", TUnit::UNIT, 1); |
743 | | |
744 | 44 | _spill_max_rows_of_partition = ADD_COUNTER_WITH_LEVEL( |
745 | 44 | Base::custom_profile(), "SpillMaxRowsOfPartition", TUnit::UNIT, 1); |
746 | 44 | _spill_min_rows_of_partition = ADD_COUNTER_WITH_LEVEL( |
747 | 44 | Base::custom_profile(), "SpillMinRowsOfPartition", TUnit::UNIT, 1); |
748 | 44 | } _ZN5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEE19init_spill_countersEv Line | Count | Source | 727 | 20 | void init_spill_counters() { | 728 | 20 | _spill_write_file_total_count = ADD_COUNTER_WITH_LEVEL( | 729 | 20 | Base::custom_profile(), "SpillWriteFileTotalCount", TUnit::UNIT, 1); | 730 | 20 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( | 731 | 20 | Base::custom_profile(), "SpillWriteFileBytes", TUnit::BYTES, 1); | 732 | 20 | _spill_write_file_timer = | 733 | 20 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteFileTime", 1); | 734 | | | 735 | 20 | _spill_write_serialize_block_timer = | 736 | 20 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteSerializeBlockTime", 1); | 737 | 20 | _spill_write_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 738 | 20 | "SpillWriteBlockCount", TUnit::UNIT, 1); | 739 | 20 | _spill_write_block_data_size = ADD_COUNTER_WITH_LEVEL( | 740 | 20 | Base::custom_profile(), "SpillWriteBlockBytes", TUnit::BYTES, 1); | 741 | 20 | _spill_write_rows_count = | 742 | 20 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillWriteRows", TUnit::UNIT, 1); | 743 | | | 744 | 20 | _spill_max_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 745 | 20 | Base::custom_profile(), "SpillMaxRowsOfPartition", TUnit::UNIT, 1); | 746 | 20 | _spill_min_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 747 | 20 | Base::custom_profile(), "SpillMinRowsOfPartition", TUnit::UNIT, 1); | 748 | 20 | } |
_ZN5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEE19init_spill_countersEv Line | Count | Source | 727 | 7 | void init_spill_counters() { | 728 | 7 | _spill_write_file_total_count = ADD_COUNTER_WITH_LEVEL( | 729 | 7 | Base::custom_profile(), "SpillWriteFileTotalCount", TUnit::UNIT, 1); | 730 | 7 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( | 731 | 7 | Base::custom_profile(), "SpillWriteFileBytes", TUnit::BYTES, 1); | 732 | 7 | _spill_write_file_timer = | 733 | 7 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteFileTime", 1); | 734 | | | 735 | 7 | _spill_write_serialize_block_timer = | 736 | 7 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteSerializeBlockTime", 1); | 737 | 7 | _spill_write_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 738 | 7 | "SpillWriteBlockCount", TUnit::UNIT, 1); | 739 | 7 | _spill_write_block_data_size = ADD_COUNTER_WITH_LEVEL( | 740 | 7 | Base::custom_profile(), "SpillWriteBlockBytes", TUnit::BYTES, 1); | 741 | 7 | _spill_write_rows_count = | 742 | 7 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillWriteRows", TUnit::UNIT, 1); | 743 | | | 744 | 7 | _spill_max_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 745 | 7 | Base::custom_profile(), "SpillMaxRowsOfPartition", TUnit::UNIT, 1); | 746 | 7 | _spill_min_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 747 | 7 | Base::custom_profile(), "SpillMinRowsOfPartition", TUnit::UNIT, 1); | 748 | 7 | } |
_ZN5doris28PipelineXSpillSinkLocalStateINS_20SpillSortSharedStateEE19init_spill_countersEv Line | Count | Source | 727 | 17 | void init_spill_counters() { | 728 | 17 | _spill_write_file_total_count = ADD_COUNTER_WITH_LEVEL( | 729 | 17 | Base::custom_profile(), "SpillWriteFileTotalCount", TUnit::UNIT, 1); | 730 | 17 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( | 731 | 17 | Base::custom_profile(), "SpillWriteFileBytes", TUnit::BYTES, 1); | 732 | 17 | _spill_write_file_timer = | 733 | 17 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteFileTime", 1); | 734 | | | 735 | 17 | _spill_write_serialize_block_timer = | 736 | 17 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), "SpillWriteSerializeBlockTime", 1); | 737 | 17 | _spill_write_block_count = ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), | 738 | 17 | "SpillWriteBlockCount", TUnit::UNIT, 1); | 739 | 17 | _spill_write_block_data_size = ADD_COUNTER_WITH_LEVEL( | 740 | 17 | Base::custom_profile(), "SpillWriteBlockBytes", TUnit::BYTES, 1); | 741 | 17 | _spill_write_rows_count = | 742 | 17 | ADD_COUNTER_WITH_LEVEL(Base::custom_profile(), "SpillWriteRows", TUnit::UNIT, 1); | 743 | | | 744 | 17 | _spill_max_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 745 | 17 | Base::custom_profile(), "SpillMaxRowsOfPartition", TUnit::UNIT, 1); | 746 | 17 | _spill_min_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 747 | 17 | Base::custom_profile(), "SpillMinRowsOfPartition", TUnit::UNIT, 1); | 748 | 17 | } |
Unexecuted instantiation: _ZN5doris28PipelineXSpillSinkLocalStateINS_20MultiCastSharedStateEE19init_spill_countersEv |
749 | | |
750 | 0 | std::vector<Dependency*> dependencies() const override { |
751 | 0 | auto dependencies = Base::dependencies(); |
752 | 0 | return dependencies; |
753 | 0 | } Unexecuted instantiation: _ZNK5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris28PipelineXSpillSinkLocalStateINS_20SpillSortSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris28PipelineXSpillSinkLocalStateINS_20MultiCastSharedStateEE12dependenciesEv |
754 | | |
755 | 47 | void update_max_min_rows_counter() { |
756 | 47 | int64_t max_rows = 0; |
757 | 47 | int64_t min_rows = std::numeric_limits<int64_t>::max(); |
758 | | |
759 | 376 | for (auto rows : _rows_in_partitions) { |
760 | 376 | if (rows > max_rows) { |
761 | 11 | max_rows = rows; |
762 | 11 | } |
763 | 376 | if (rows < min_rows) { |
764 | 49 | min_rows = rows; |
765 | 49 | } |
766 | 376 | } |
767 | | |
768 | 47 | COUNTER_SET(_spill_max_rows_of_partition, max_rows); |
769 | 47 | COUNTER_SET(_spill_min_rows_of_partition, min_rows); |
770 | 47 | } _ZN5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEE27update_max_min_rows_counterEv Line | Count | Source | 755 | 43 | void update_max_min_rows_counter() { | 756 | 43 | int64_t max_rows = 0; | 757 | 43 | int64_t min_rows = std::numeric_limits<int64_t>::max(); | 758 | | | 759 | 344 | for (auto rows : _rows_in_partitions) { | 760 | 344 | if (rows > max_rows) { | 761 | 7 | max_rows = rows; | 762 | 7 | } | 763 | 344 | if (rows < min_rows) { | 764 | 43 | min_rows = rows; | 765 | 43 | } | 766 | 344 | } | 767 | | | 768 | 43 | COUNTER_SET(_spill_max_rows_of_partition, max_rows); | 769 | 43 | COUNTER_SET(_spill_min_rows_of_partition, min_rows); | 770 | 43 | } |
_ZN5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEE27update_max_min_rows_counterEv Line | Count | Source | 755 | 4 | void update_max_min_rows_counter() { | 756 | 4 | int64_t max_rows = 0; | 757 | 4 | int64_t min_rows = std::numeric_limits<int64_t>::max(); | 758 | | | 759 | 32 | for (auto rows : _rows_in_partitions) { | 760 | 32 | if (rows > max_rows) { | 761 | 4 | max_rows = rows; | 762 | 4 | } | 763 | 32 | if (rows < min_rows) { | 764 | 6 | min_rows = rows; | 765 | 6 | } | 766 | 32 | } | 767 | | | 768 | 4 | COUNTER_SET(_spill_max_rows_of_partition, max_rows); | 769 | 4 | COUNTER_SET(_spill_min_rows_of_partition, min_rows); | 770 | 4 | } |
|
771 | | |
772 | | std::vector<int64_t> _rows_in_partitions; |
773 | | // Spill write counters |
774 | | // Total time of writing file |
775 | | RuntimeProfile::Counter* _spill_write_file_total_size = nullptr; |
776 | | RuntimeProfile::Counter* _spill_write_file_total_count = nullptr; |
777 | | RuntimeProfile::Counter* _spill_write_file_timer = nullptr; |
778 | | RuntimeProfile::Counter* _spill_write_serialize_block_timer = nullptr; |
779 | | // Original count of spilled Blocks |
780 | | // One Big Block maybe split into multiple small Blocks when actually written to disk file. |
781 | | RuntimeProfile::Counter* _spill_write_block_count = nullptr; |
782 | | // Total bytes of spill data in Block format(in memory format) |
783 | | RuntimeProfile::Counter* _spill_write_block_data_size = nullptr; |
784 | | RuntimeProfile::Counter* _spill_write_rows_count = nullptr; |
785 | | // Spilled file total size |
786 | | RuntimeProfile::Counter* _spill_file_total_size = nullptr; |
787 | | |
788 | | RuntimeProfile::Counter* _spill_max_rows_of_partition = nullptr; |
789 | | RuntimeProfile::Counter* _spill_min_rows_of_partition = nullptr; |
790 | | }; |
791 | | |
792 | | class OperatorXBase : public OperatorBase { |
793 | | public: |
794 | | OperatorXBase(ObjectPool* pool, const TPlanNode& tnode, const int operator_id, |
795 | | const DescriptorTbl& descs) |
796 | 72.2k | : OperatorBase(tnode.__isset.is_serial_operator && tnode.is_serial_operator), |
797 | 72.2k | _operator_id(operator_id), |
798 | 72.2k | _node_id(tnode.node_id), |
799 | 72.2k | _type(tnode.node_type), |
800 | 72.2k | _pool(pool), |
801 | 72.2k | _tuple_ids(tnode.row_tuples), |
802 | 72.2k | _row_descriptor(descs, tnode.row_tuples), |
803 | 72.2k | _resource_profile(tnode.resource_profile), |
804 | 72.2k | _limit(tnode.limit) { |
805 | 72.2k | if (tnode.__isset.output_tuple_id) { |
806 | 72.1k | _output_row_descriptor.reset(new RowDescriptor(descs, {tnode.output_tuple_id})); |
807 | 72.1k | _output_row_descriptor = |
808 | 72.1k | std::make_unique<RowDescriptor>(descs, std::vector {tnode.output_tuple_id}); |
809 | 72.1k | } |
810 | 72.2k | if (!tnode.intermediate_output_tuple_id_list.empty()) { |
811 | | // common subexpression elimination |
812 | 0 | _intermediate_output_row_descriptor.reserve( |
813 | 0 | tnode.intermediate_output_tuple_id_list.size()); |
814 | 0 | for (auto output_tuple_id : tnode.intermediate_output_tuple_id_list) { |
815 | 0 | _intermediate_output_row_descriptor.push_back( |
816 | 0 | RowDescriptor(descs, std::vector {output_tuple_id})); |
817 | 0 | } |
818 | 0 | } |
819 | 72.2k | } |
820 | | |
821 | | OperatorXBase(ObjectPool* pool, int node_id, int operator_id) |
822 | 18 | : OperatorBase(), |
823 | 18 | _operator_id(operator_id), |
824 | 18 | _node_id(node_id), |
825 | 18 | _pool(pool), |
826 | 18 | _limit(-1) {} |
827 | | |
828 | | #ifdef BE_TEST |
829 | 144k | OperatorXBase() : _operator_id(-1), _node_id(0), _limit(-1) {}; |
830 | | #endif |
831 | | virtual Status init(const TPlanNode& tnode, RuntimeState* state); |
832 | 0 | Status init(const TDataSink& tsink) override { |
833 | 0 | throw Exception(Status::FatalError("should not reach here!")); |
834 | 0 | } |
835 | 0 | virtual Status init(ExchangeType type) { |
836 | 0 | throw Exception(Status::FatalError("should not reach here!")); |
837 | 0 | } |
838 | 0 | [[noreturn]] virtual const std::vector<TRuntimeFilterDesc>& runtime_filter_descs() { |
839 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, _op_name); |
840 | 0 | } |
841 | 50.3k | [[nodiscard]] std::string get_name() const override { return _op_name; } |
842 | 919k | [[nodiscard]] virtual bool need_more_input_data(RuntimeState* state) const { return true; } |
843 | 0 | bool is_blockable(RuntimeState* state) const override { |
844 | 0 | return state->get_sink_local_state()->is_blockable() || _blockable; |
845 | 0 | } |
846 | | |
847 | | Status prepare(RuntimeState* state) override; |
848 | | |
849 | | Status terminate(RuntimeState* state) override; |
850 | | [[nodiscard]] virtual Status get_block(RuntimeState* state, Block* block, bool* eos) = 0; |
851 | | |
852 | | Status close(RuntimeState* state) override; |
853 | | |
854 | 24.2k | [[nodiscard]] virtual const RowDescriptor& intermediate_row_desc() const { |
855 | 24.2k | return _row_descriptor; |
856 | 24.2k | } |
857 | | |
858 | 0 | [[nodiscard]] const RowDescriptor& intermediate_row_desc(int idx) { |
859 | 0 | if (idx == 0) { |
860 | 0 | return intermediate_row_desc(); |
861 | 0 | } |
862 | 0 | DCHECK((idx - 1) < _intermediate_output_row_descriptor.size()); |
863 | 0 | return _intermediate_output_row_descriptor[idx - 1]; |
864 | 0 | } |
865 | | |
866 | 48.1k | [[nodiscard]] const RowDescriptor& projections_row_desc() const { |
867 | 48.1k | if (_intermediate_output_row_descriptor.empty()) { |
868 | 48.1k | return intermediate_row_desc(); |
869 | 48.1k | } else { |
870 | 0 | return _intermediate_output_row_descriptor.back(); |
871 | 0 | } |
872 | 48.1k | } |
873 | | |
874 | | // Returns the memory this single operator expects to allocate in the next |
875 | | // execution round. Each operator reports only its OWN requirement — the |
876 | | // pipeline task is responsible for summing all operators + sink. |
877 | | // After the value is consumed the caller should invoke |
878 | | // reset_reserve_mem_size() so the next round starts from zero. |
879 | | // If this method is not overridden by a subclass, its default value is the |
880 | | // minimum operator memory (typically 1 MB). |
881 | 0 | [[nodiscard]] virtual size_t get_reserve_mem_size(RuntimeState* state) { |
882 | 0 | return state->minimum_operator_memory_required_bytes(); |
883 | 0 | } |
884 | | |
885 | | virtual std::string debug_string(int indentation_level = 0) const; |
886 | | |
887 | | virtual std::string debug_string(RuntimeState* state, int indentation_level = 0) const; |
888 | | |
889 | | virtual Status setup_local_state(RuntimeState* state, LocalStateInfo& info) = 0; |
890 | | |
891 | | template <class TARGET> |
892 | 96.7k | TARGET& cast() { |
893 | 96.7k | DCHECK(dynamic_cast<TARGET*>(this)) |
894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() |
895 | 0 | << " and expect type is" << typeid(TARGET).name(); |
896 | 96.7k | return reinterpret_cast<TARGET&>(*this); |
897 | 96.7k | } _ZN5doris13OperatorXBase4castINS_22TableFunctionOperatorXEEERT_v Line | Count | Source | 892 | 115 | TARGET& cast() { | 893 | 115 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 115 | return reinterpret_cast<TARGET&>(*this); | 897 | 115 | } |
_ZN5doris13OperatorXBase4castINS_13DummyOperatorEEERT_v Line | Count | Source | 892 | 42 | TARGET& cast() { | 893 | 42 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 42 | return reinterpret_cast<TARGET&>(*this); | 897 | 42 | } |
_ZN5doris13OperatorXBase4castINS_23ExchangeSourceOperatorXEEERT_v Line | Count | Source | 892 | 23 | TARGET& cast() { | 893 | 23 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 23 | return reinterpret_cast<TARGET&>(*this); | 897 | 23 | } |
_ZN5doris13OperatorXBase4castINS_18AggSourceOperatorXEEERT_v Line | Count | Source | 892 | 53 | TARGET& cast() { | 893 | 53 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 53 | return reinterpret_cast<TARGET&>(*this); | 897 | 53 | } |
_ZN5doris13OperatorXBase4castINS_20CacheSourceOperatorXEEERT_v Line | Count | Source | 892 | 6 | TARGET& cast() { | 893 | 6 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 6 | return reinterpret_cast<TARGET&>(*this); | 897 | 6 | } |
_ZN5doris13OperatorXBase4castINS_22DataGenSourceOperatorXEEERT_v Line | Count | Source | 892 | 3 | TARGET& cast() { | 893 | 3 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 3 | return reinterpret_cast<TARGET&>(*this); | 897 | 3 | } |
_ZN5doris13OperatorXBase4castINS_29DistinctStreamingAggOperatorXEEERT_v Line | Count | Source | 892 | 30 | TARGET& cast() { | 893 | 30 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 30 | return reinterpret_cast<TARGET&>(*this); | 897 | 30 | } |
_ZN5doris13OperatorXBase4castINS_17FileScanOperatorXEEERT_v Line | Count | Source | 892 | 11 | TARGET& cast() { | 893 | 11 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 11 | return reinterpret_cast<TARGET&>(*this); | 897 | 11 | } |
_ZN5doris13OperatorXBase4castINS_22HashJoinProbeOperatorXEEERT_v Line | Count | Source | 892 | 96.1k | TARGET& cast() { | 893 | 96.1k | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 96.1k | return reinterpret_cast<TARGET&>(*this); | 897 | 96.1k | } |
Unexecuted instantiation: _ZN5doris13OperatorXBase4castINS_28NestedLoopJoinProbeOperatorXEEERT_v _ZN5doris13OperatorXBase4castINS_33PartitionedHashJoinProbeOperatorXEEERT_v Line | Count | Source | 892 | 21 | TARGET& cast() { | 893 | 21 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 21 | return reinterpret_cast<TARGET&>(*this); | 897 | 21 | } |
_ZN5doris13OperatorXBase4castINS_29LocalMergeSortSourceOperatorXEEERT_v Line | Count | Source | 892 | 4 | TARGET& cast() { | 893 | 4 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 4 | return reinterpret_cast<TARGET&>(*this); | 897 | 4 | } |
_ZN5doris13OperatorXBase4castINS_17OlapScanOperatorXEEERT_v Line | Count | Source | 892 | 25 | TARGET& cast() { | 893 | 25 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 25 | return reinterpret_cast<TARGET&>(*this); | 897 | 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 | 892 | 15 | TARGET& cast() { | 893 | 15 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 15 | return reinterpret_cast<TARGET&>(*this); | 897 | 15 | } |
Unexecuted instantiation: _ZN5doris13OperatorXBase4castINS_21RecCTESourceOperatorXEEERT_v _ZN5doris13OperatorXBase4castINS_15RepeatOperatorXEEERT_v Line | Count | Source | 892 | 13 | TARGET& cast() { | 893 | 13 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 13 | return reinterpret_cast<TARGET&>(*this); | 897 | 13 | } |
_ZN5doris13OperatorXBase4castINS_17MockScanOperatorXEEERT_v Line | Count | Source | 892 | 101 | TARGET& cast() { | 893 | 101 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 101 | return reinterpret_cast<TARGET&>(*this); | 897 | 101 | } |
Unexecuted instantiation: _ZN5doris13OperatorXBase4castINS_19SchemaScanOperatorXEEERT_v _ZN5doris13OperatorXBase4castINS_18SetSourceOperatorXILb1EEEEERT_v Line | Count | Source | 892 | 12 | TARGET& cast() { | 893 | 12 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 12 | return reinterpret_cast<TARGET&>(*this); | 897 | 12 | } |
_ZN5doris13OperatorXBase4castINS_18SetSourceOperatorXILb0EEEEERT_v Line | Count | Source | 892 | 8 | TARGET& cast() { | 893 | 8 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 8 | return reinterpret_cast<TARGET&>(*this); | 897 | 8 | } |
_ZN5doris13OperatorXBase4castINS_24SpillSortSourceOperatorXEEERT_v Line | Count | Source | 892 | 20 | TARGET& cast() { | 893 | 20 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 20 | return reinterpret_cast<TARGET&>(*this); | 897 | 20 | } |
_ZN5doris13OperatorXBase4castINS_21StreamingAggOperatorXEEERT_v Line | Count | Source | 892 | 64 | TARGET& cast() { | 893 | 64 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 64 | return reinterpret_cast<TARGET&>(*this); | 897 | 64 | } |
_ZN5doris13OperatorXBase4castINS_20UnionSourceOperatorXEEERT_v Line | Count | Source | 892 | 6 | TARGET& cast() { | 893 | 6 | DCHECK(dynamic_cast<TARGET*>(this)) | 894 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 895 | 0 | << " and expect type is" << typeid(TARGET).name(); | 896 | 6 | return reinterpret_cast<TARGET&>(*this); | 897 | 6 | } |
|
898 | | template <class TARGET> |
899 | | const TARGET& cast() const { |
900 | | DCHECK(dynamic_cast<const TARGET*>(this)) |
901 | | << " Mismatch type! Current type is " << typeid(*this).name() |
902 | | << " and expect type is" << typeid(TARGET).name(); |
903 | | return reinterpret_cast<const TARGET&>(*this); |
904 | | } |
905 | | |
906 | 53 | [[nodiscard]] OperatorPtr get_child() { return _child; } |
907 | | |
908 | 0 | [[nodiscard]] VExprContextSPtrs& conjuncts() { return _conjuncts; } |
909 | 0 | [[nodiscard]] VExprContextSPtrs& projections() { return _projections; } |
910 | 6 | [[nodiscard]] virtual RowDescriptor& row_descriptor() { return _row_descriptor; } |
911 | | |
912 | 2.93M | [[nodiscard]] int operator_id() const { return _operator_id; } |
913 | 128k | [[nodiscard]] int node_id() const override { return _node_id; } |
914 | 48.3k | [[nodiscard]] int nereids_id() const { return _nereids_id; } |
915 | | |
916 | 0 | [[nodiscard]] int64_t limit() const { return _limit; } |
917 | | |
918 | 1.30M | [[nodiscard]] const RowDescriptor& row_desc() const override { |
919 | 1.30M | return _output_row_descriptor ? *_output_row_descriptor : _row_descriptor; |
920 | 1.30M | } |
921 | | |
922 | 12 | [[nodiscard]] const RowDescriptor* output_row_descriptor() { |
923 | 12 | return _output_row_descriptor.get(); |
924 | 12 | } |
925 | | |
926 | 48.1k | bool has_output_row_desc() const { return _output_row_descriptor != nullptr; } |
927 | | |
928 | | [[nodiscard]] virtual Status get_block_after_projects(RuntimeState* state, Block* block, |
929 | | bool* eos); |
930 | | |
931 | | /// Only use in vectorized exec engine try to do projections to trans _row_desc -> _output_row_desc |
932 | | Status do_projections(RuntimeState* state, Block* origin_block, Block* output_block) const; |
933 | 144k | void set_parallel_tasks(int parallel_tasks) { _parallel_tasks = parallel_tasks; } |
934 | 0 | int parallel_tasks() const { return _parallel_tasks; } |
935 | | |
936 | | // To keep compatibility with older FE |
937 | 1 | void set_serial_operator() { _is_serial_operator = true; } |
938 | | |
939 | | // Resets this operator's estimated memory usage to zero so that the next |
940 | | // call to get_reserve_mem_size() starts fresh. The pipeline task calls |
941 | | // this after consuming the reserve size for all operators in a round. |
942 | 0 | virtual void reset_reserve_mem_size(RuntimeState* state) {} |
943 | | |
944 | | protected: |
945 | | template <typename Dependency> |
946 | | friend class PipelineXLocalState; |
947 | | friend class PipelineXLocalStateBase; |
948 | | friend class Scanner; |
949 | | const int _operator_id; |
950 | | const int _node_id; // unique w/in single plan tree |
951 | | int _nereids_id = -1; |
952 | | TPlanNodeType::type _type; |
953 | | ObjectPool* _pool = nullptr; |
954 | | std::vector<TupleId> _tuple_ids; |
955 | | |
956 | | private: |
957 | | // The expr of operator set to private permissions, as cannot be executed concurrently, |
958 | | // should use local state's expr. |
959 | | VExprContextSPtrs _conjuncts; |
960 | | VExprContextSPtrs _projections; |
961 | | // Used in common subexpression elimination to compute intermediate results. |
962 | | std::vector<VExprContextSPtrs> _intermediate_projections; |
963 | | |
964 | | protected: |
965 | | RowDescriptor _row_descriptor; |
966 | | std::unique_ptr<RowDescriptor> _output_row_descriptor = nullptr; |
967 | | std::vector<RowDescriptor> _intermediate_output_row_descriptor; |
968 | | |
969 | | /// Resource information sent from the frontend. |
970 | | const TBackendResourceProfile _resource_profile; |
971 | | |
972 | | int64_t _limit; // -1: no limit |
973 | | |
974 | | uint32_t _debug_point_count = 0; |
975 | | std::atomic_uint32_t _bytes_per_row = 0; |
976 | | |
977 | | std::string _op_name; |
978 | | int _parallel_tasks = 0; |
979 | | |
980 | | //_keep_origin is used to avoid copying during projection, |
981 | | // currently set to false only in the nestloop join. |
982 | | bool _keep_origin = true; |
983 | | |
984 | | // _blockable is true if the operator contains expressions that may block execution |
985 | | bool _blockable = false; |
986 | | }; |
987 | | |
988 | | template <typename LocalStateType> |
989 | | class OperatorX : public OperatorXBase { |
990 | | public: |
991 | | OperatorX(ObjectPool* pool, const TPlanNode& tnode, const int operator_id, |
992 | | const DescriptorTbl& descs) |
993 | 72.2k | : OperatorXBase(pool, tnode, operator_id, descs) {}Unexecuted instantiation: _ZN5doris9OperatorXINS_23DummyOperatorLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris9OperatorXINS_14MockLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 993 | 3 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_13AggLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 993 | 29 | : 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 | 993 | 4 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 993 | 72.0k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
Unexecuted instantiation: _ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 993 | 47 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
Unexecuted instantiation: _ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris9OperatorXINS_18OlapScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 993 | 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 | 993 | 2 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
Unexecuted instantiation: _ZN5doris9OperatorXINS_16EsScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris9OperatorXINS_14SortLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 993 | 20 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_19SpillSortLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 993 | 19 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 993 | 29 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 993 | 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 |
994 | | OperatorX(ObjectPool* pool, int node_id, int operator_id) |
995 | 18 | : OperatorXBase(pool, node_id, operator_id) {};_ZN5doris9OperatorXINS_23DummyOperatorLocalStateEEC2EPNS_10ObjectPoolEii Line | Count | Source | 995 | 18 | : 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 |
996 | | |
997 | | #ifdef BE_TEST |
998 | 223 | OperatorX() = default; _ZN5doris9OperatorXINS_13AggLocalStateEEC2Ev Line | Count | Source | 998 | 27 | OperatorX() = default; |
_ZN5doris9OperatorXINS_18AnalyticLocalStateEEC2Ev Line | Count | Source | 998 | 9 | OperatorX() = default; |
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEEC2Ev Line | Count | Source | 998 | 3 | OperatorX() = default; |
_ZN5doris9OperatorXINS_14MockLocalStateEEC2Ev Line | Count | Source | 998 | 16 | OperatorX() = default; |
_ZN5doris9OperatorXINS_17DataGenLocalStateEEC2Ev Line | Count | Source | 998 | 3 | OperatorX() = default; |
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEEC2Ev Line | Count | Source | 998 | 3 | OperatorX() = default; |
_ZN5doris9OperatorXINS_18EmptySetLocalStateEEC2Ev Line | Count | Source | 998 | 1 | OperatorX() = default; |
_ZN5doris9OperatorXINS_18ExchangeLocalStateEEC2Ev Line | Count | Source | 998 | 2 | OperatorX() = default; |
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEEC2Ev Line | Count | Source | 998 | 1 | OperatorX() = default; |
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEEC2Ev Line | Count | Source | 998 | 102 | OperatorX() = default; |
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEEC2Ev Line | Count | Source | 998 | 3 | OperatorX() = default; |
_ZN5doris9OperatorXINS_16RepeatLocalStateEEC2Ev Line | Count | Source | 998 | 3 | OperatorX() = default; |
_ZN5doris9OperatorXINS_18MockScanLocalStateEEC2Ev Line | Count | Source | 998 | 21 | OperatorX() = default; |
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEEC2Ev Line | Count | Source | 998 | 6 | OperatorX() = default; |
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEEC2Ev Line | Count | Source | 998 | 4 | OperatorX() = default; |
_ZN5doris9OperatorXINS_14SortLocalStateEEC2Ev Line | Count | Source | 998 | 9 | OperatorX() = default; |
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEEC2Ev Line | Count | Source | 998 | 4 | OperatorX() = default; |
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEEC2Ev Line | Count | Source | 998 | 4 | OperatorX() = default; |
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEEC2Ev Line | Count | Source | 998 | 2 | OperatorX() = default; |
|
999 | | #endif |
1000 | | |
1001 | 72.4k | ~OperatorX() override = default; _ZN5doris9OperatorXINS_13AggLocalStateEED2Ev Line | Count | Source | 1001 | 56 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_18AnalyticLocalStateEED2Ev Line | Count | Source | 1001 | 9 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEED2Ev Line | Count | Source | 1001 | 3 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_14MockLocalStateEED2Ev Line | Count | Source | 1001 | 19 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_17DataGenLocalStateEED2Ev Line | Count | Source | 1001 | 3 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEED2Ev Line | Count | Source | 1001 | 3 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_18EmptySetLocalStateEED2Ev Line | Count | Source | 1001 | 1 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_18ExchangeLocalStateEED2Ev Line | Count | Source | 1001 | 6 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEED2Ev Line | Count | Source | 1001 | 1 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEED2Ev Line | Count | Source | 1001 | 102 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEED2Ev Line | Count | Source | 1001 | 72.0k | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEED2Ev Line | Count | Source | 1001 | 47 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEED2Ev Line | Count | Source | 1001 | 3 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_16RepeatLocalStateEED2Ev Line | Count | Source | 1001 | 3 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_18MockScanLocalStateEED2Ev Line | Count | Source | 1001 | 21 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEED2Ev Line | Count | Source | 1001 | 6 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEED2Ev Line | Count | Source | 1001 | 4 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_14SortLocalStateEED2Ev Line | Count | Source | 1001 | 29 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEED2Ev Line | Count | Source | 1001 | 4 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEED2Ev Line | Count | Source | 1001 | 6 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEED2Ev Line | Count | Source | 1001 | 2 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_23DummyOperatorLocalStateEED2Ev Line | Count | Source | 1001 | 18 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_18OlapScanLocalStateEED2Ev Line | Count | Source | 1001 | 13 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_18FileScanLocalStateEED2Ev Line | Count | Source | 1001 | 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 | 1001 | 19 | ~OperatorX() override = default; |
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEED2Ev Line | Count | Source | 1001 | 29 | ~OperatorX() override = default; |
Unexecuted instantiation: _ZN5doris9OperatorXINS_20SchemaScanLocalStateEED2Ev Unexecuted instantiation: _ZN5doris9OperatorXINS_18MetaScanLocalStateEED2Ev |
1002 | | |
1003 | | Status setup_local_state(RuntimeState* state, LocalStateInfo& info) override; |
1004 | | using LocalState = LocalStateType; |
1005 | 1.83M | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { |
1006 | 1.83M | return state->get_local_state(operator_id())->template cast<LocalState>(); |
1007 | 1.83M | } _ZNK5doris9OperatorXINS_23DummyOperatorLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 1.83M | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 1.83M | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 1.83M | } |
_ZNK5doris9OperatorXINS_13AggLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 130 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 130 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 130 | } |
_ZNK5doris9OperatorXINS_18AnalyticLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 46 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 46 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 46 | } |
_ZNK5doris9OperatorXINS_23AssertNumRowsLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 4 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 4 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 4 | } |
Unexecuted instantiation: _ZNK5doris9OperatorXINS_14MockLocalStateEE15get_local_stateEPNS_12RuntimeStateE _ZNK5doris9OperatorXINS_17DataGenLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 3 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 3 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 3 | } |
_ZNK5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 24 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 24 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 24 | } |
Unexecuted instantiation: _ZNK5doris9OperatorXINS_18EmptySetLocalStateEE15get_local_stateEPNS_12RuntimeStateE _ZNK5doris9OperatorXINS_18ExchangeLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 39 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 39 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 39 | } |
_ZNK5doris9OperatorXINS_23HashJoinProbeLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 178 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 178 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 178 | } |
_ZNK5doris9OperatorXINS_24LocalMergeSortLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 6 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 6 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 6 | } |
Unexecuted instantiation: _ZNK5doris9OperatorXINS_25MaterializationLocalStateEE15get_local_stateEPNS_12RuntimeStateE _ZNK5doris9OperatorXINS_29PartitionSortSourceLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 402 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 402 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 402 | } |
_ZNK5doris9OperatorXINS_24PartitionedAggLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 82 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 82 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 82 | } |
_ZNK5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 57 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 57 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 57 | } |
_ZNK5doris9OperatorXINS_21CacheSourceLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 6 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 6 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 6 | } |
_ZNK5doris9OperatorXINS_16RepeatLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 9 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 9 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 9 | } |
Unexecuted instantiation: _ZNK5doris9OperatorXINS_18MockScanLocalStateEE15get_local_stateEPNS_12RuntimeStateE _ZNK5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 6 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 6 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 6 | } |
_ZNK5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 5 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 5 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 5 | } |
_ZNK5doris9OperatorXINS_14SortLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 38 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 38 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 38 | } |
_ZNK5doris9OperatorXINS_19SpillSortLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 48 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 48 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 48 | } |
_ZNK5doris9OperatorXINS_22StreamingAggLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 21 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 21 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 21 | } |
_ZNK5doris9OperatorXINS_23TableFunctionLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 16 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 16 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 16 | } |
_ZNK5doris9OperatorXINS_21UnionSourceLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 1005 | 37 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 1006 | 37 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 1007 | 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 |
1008 | | |
1009 | | // Returns memory this single operator expects to allocate in the next round. |
1010 | | // Does NOT include child operators — the pipeline task iterates all |
1011 | | // operators itself. |
1012 | 918k | size_t get_reserve_mem_size(RuntimeState* state) override { |
1013 | 918k | auto& local_state = get_local_state(state); |
1014 | 918k | auto estimated_size = local_state.estimate_memory_usage(); |
1015 | 918k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { |
1016 | 918k | estimated_size = state->minimum_operator_memory_required_bytes(); |
1017 | 918k | } |
1018 | 918k | return estimated_size; |
1019 | 918k | } _ZN5doris9OperatorXINS_23DummyOperatorLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 918k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1013 | 918k | auto& local_state = get_local_state(state); | 1014 | 918k | auto estimated_size = local_state.estimate_memory_usage(); | 1015 | 918k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1016 | 918k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1017 | 918k | } | 1018 | 918k | return estimated_size; | 1019 | 918k | } |
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 | 1012 | 11 | size_t get_reserve_mem_size(RuntimeState* state) override { | 1013 | 11 | auto& local_state = get_local_state(state); | 1014 | 11 | auto estimated_size = local_state.estimate_memory_usage(); | 1015 | 11 | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1016 | 11 | estimated_size = state->minimum_operator_memory_required_bytes(); | 1017 | 11 | } | 1018 | 11 | return estimated_size; | 1019 | 11 | } |
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 4 | size_t get_reserve_mem_size(RuntimeState* state) override { | 1013 | 4 | auto& local_state = get_local_state(state); | 1014 | 4 | auto estimated_size = local_state.estimate_memory_usage(); | 1015 | 4 | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1016 | 4 | estimated_size = state->minimum_operator_memory_required_bytes(); | 1017 | 4 | } | 1018 | 4 | return estimated_size; | 1019 | 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 | 1012 | 1 | size_t get_reserve_mem_size(RuntimeState* state) override { | 1013 | 1 | auto& local_state = get_local_state(state); | 1014 | 1 | auto estimated_size = local_state.estimate_memory_usage(); | 1015 | 1 | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1016 | 1 | estimated_size = state->minimum_operator_memory_required_bytes(); | 1017 | 1 | } | 1018 | 1 | return estimated_size; | 1019 | 1 | } |
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 |
1020 | | |
1021 | 918k | void reset_reserve_mem_size(RuntimeState* state) override { |
1022 | 918k | auto& local_state = get_local_state(state); |
1023 | 918k | local_state.reset_estimate_memory_usage(); |
1024 | 918k | } _ZN5doris9OperatorXINS_23DummyOperatorLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1021 | 918k | void reset_reserve_mem_size(RuntimeState* state) override { | 1022 | 918k | auto& local_state = get_local_state(state); | 1023 | 918k | local_state.reset_estimate_memory_usage(); | 1024 | 918k | } |
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 | 1021 | 11 | void reset_reserve_mem_size(RuntimeState* state) override { | 1022 | 11 | auto& local_state = get_local_state(state); | 1023 | 11 | local_state.reset_estimate_memory_usage(); | 1024 | 11 | } |
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1021 | 4 | void reset_reserve_mem_size(RuntimeState* state) override { | 1022 | 4 | auto& local_state = get_local_state(state); | 1023 | 4 | local_state.reset_estimate_memory_usage(); | 1024 | 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 |
1025 | | }; |
1026 | | |
1027 | | /** |
1028 | | * StreamingOperatorX indicates operators which always processes block in streaming way (one-in-one-out). |
1029 | | */ |
1030 | | template <typename LocalStateType> |
1031 | | class StreamingOperatorX : public OperatorX<LocalStateType> { |
1032 | | public: |
1033 | | StreamingOperatorX(ObjectPool* pool, const TPlanNode& tnode, int operator_id, |
1034 | | const DescriptorTbl& descs) |
1035 | 0 | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {}Unexecuted instantiation: _ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Unexecuted instantiation: _ZN5doris18StreamingOperatorXINS_16SelectLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE |
1036 | | |
1037 | | #ifdef BE_TEST |
1038 | 3 | StreamingOperatorX() = default; |
1039 | | #endif |
1040 | | |
1041 | 3 | virtual ~StreamingOperatorX() = default; _ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEED2Ev Line | Count | Source | 1041 | 3 | virtual ~StreamingOperatorX() = default; |
Unexecuted instantiation: _ZN5doris18StreamingOperatorXINS_16SelectLocalStateEED2Ev |
1042 | | |
1043 | | Status get_block(RuntimeState* state, Block* block, bool* eos) override; |
1044 | | |
1045 | | virtual Status pull(RuntimeState* state, Block* block, bool* eos) = 0; |
1046 | | }; |
1047 | | |
1048 | | /** |
1049 | | * StatefulOperatorX indicates the operators with some states inside. |
1050 | | * |
1051 | | * Specifically, we called an operator stateful if an operator can determine its output by itself. |
1052 | | * 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). |
1053 | | * If there are still remain rows in probe block, we can get output block by calling `get_block` without any data from its child. |
1054 | | * In a nutshell, it is a one-to-many relation between input blocks and output blocks for StatefulOperator. |
1055 | | */ |
1056 | | template <typename LocalStateType> |
1057 | | class StatefulOperatorX : public OperatorX<LocalStateType> { |
1058 | | public: |
1059 | | StatefulOperatorX(ObjectPool* pool, const TPlanNode& tnode, const int operator_id, |
1060 | | const DescriptorTbl& descs) |
1061 | 72.1k | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {}Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1061 | 72.0k | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {} |
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1061 | 47 | : 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 | 1061 | 2 | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {} |
|
1062 | | #ifdef BE_TEST |
1063 | 14 | StatefulOperatorX() = default; _ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEEC2Ev Line | Count | Source | 1063 | 3 | StatefulOperatorX() = default; |
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEEC2Ev Line | Count | Source | 1063 | 3 | StatefulOperatorX() = default; |
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEEC2Ev Line | Count | Source | 1063 | 4 | StatefulOperatorX() = default; |
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEEC2Ev Line | Count | Source | 1063 | 4 | StatefulOperatorX() = default; |
|
1064 | | #endif |
1065 | 72.1k | virtual ~StatefulOperatorX() = default; _ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEED2Ev Line | Count | Source | 1065 | 3 | virtual ~StatefulOperatorX() = default; |
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEED2Ev Line | Count | Source | 1065 | 72.0k | virtual ~StatefulOperatorX() = default; |
_ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEED2Ev Line | Count | Source | 1065 | 47 | virtual ~StatefulOperatorX() = default; |
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEED2Ev Line | Count | Source | 1065 | 3 | virtual ~StatefulOperatorX() = default; |
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEED2Ev Line | Count | Source | 1065 | 4 | virtual ~StatefulOperatorX() = default; |
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEED2Ev Line | Count | Source | 1065 | 6 | virtual ~StatefulOperatorX() = default; |
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEED2Ev Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEED2Ev |
1066 | | |
1067 | | using OperatorX<LocalStateType>::get_local_state; |
1068 | | |
1069 | | [[nodiscard]] Status get_block(RuntimeState* state, Block* block, bool* eos) override; |
1070 | | |
1071 | | [[nodiscard]] virtual Status pull(RuntimeState* state, Block* block, bool* eos) const = 0; |
1072 | | [[nodiscard]] virtual Status push(RuntimeState* state, Block* input_block, bool eos) const = 0; |
1073 | 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 |
1074 | | }; |
1075 | | |
1076 | | template <typename Writer, typename Parent> |
1077 | | requires(std::is_base_of_v<AsyncResultWriter, Writer>) |
1078 | | class AsyncWriterSink : public PipelineXSinkLocalState<BasicSharedState> { |
1079 | | public: |
1080 | | using Base = PipelineXSinkLocalState<BasicSharedState>; |
1081 | | AsyncWriterSink(DataSinkOperatorXBase* parent, RuntimeState* state) |
1082 | 0 | : Base(parent, state), _async_writer_dependency(nullptr) { |
1083 | 0 | _finish_dependency = |
1084 | 0 | std::make_shared<Dependency>(parent->operator_id(), parent->node_id(), |
1085 | 0 | parent->get_name() + "_FINISH_DEPENDENCY", true); |
1086 | 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 |
1087 | | |
1088 | | Status init(RuntimeState* state, LocalSinkStateInfo& info) override; |
1089 | | |
1090 | | Status open(RuntimeState* state) override; |
1091 | | |
1092 | | Status sink(RuntimeState* state, Block* block, bool eos); |
1093 | | |
1094 | 0 | std::vector<Dependency*> dependencies() const override { |
1095 | 0 | return {_async_writer_dependency.get()}; |
1096 | 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 |
1097 | | Status close(RuntimeState* state, Status exec_status) override; |
1098 | | |
1099 | 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 |
1100 | | |
1101 | | protected: |
1102 | | VExprContextSPtrs _output_vexpr_ctxs; |
1103 | | std::unique_ptr<Writer> _writer; |
1104 | | |
1105 | | std::shared_ptr<Dependency> _async_writer_dependency; |
1106 | | std::shared_ptr<Dependency> _finish_dependency; |
1107 | | }; |
1108 | | |
1109 | | #ifdef BE_TEST |
1110 | | class DummyOperatorLocalState final : public PipelineXLocalState<FakeSharedState> { |
1111 | | public: |
1112 | | ENABLE_FACTORY_CREATOR(DummyOperatorLocalState); |
1113 | | |
1114 | | DummyOperatorLocalState(RuntimeState* state, OperatorXBase* parent) |
1115 | 15 | : PipelineXLocalState<FakeSharedState>(state, parent) { |
1116 | 15 | _tmp_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), |
1117 | 15 | "DummyOperatorDependency", true); |
1118 | 15 | _finish_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), |
1119 | 15 | "DummyOperatorDependency", true); |
1120 | 15 | _filter_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), |
1121 | 15 | "DummyOperatorDependency", true); |
1122 | 15 | } |
1123 | 12 | Dependency* finishdependency() override { return _finish_dependency.get(); } |
1124 | 15 | ~DummyOperatorLocalState() = default; |
1125 | | |
1126 | 12 | std::vector<Dependency*> dependencies() const override { return {_tmp_dependency.get()}; } |
1127 | 15 | std::vector<Dependency*> execution_dependencies() override { |
1128 | 15 | return {_filter_dependency.get()}; |
1129 | 15 | } |
1130 | | |
1131 | | private: |
1132 | | std::shared_ptr<Dependency> _tmp_dependency; |
1133 | | std::shared_ptr<Dependency> _finish_dependency; |
1134 | | std::shared_ptr<Dependency> _filter_dependency; |
1135 | | }; |
1136 | | |
1137 | | class DummyOperator final : public OperatorX<DummyOperatorLocalState> { |
1138 | | public: |
1139 | 18 | DummyOperator() : OperatorX<DummyOperatorLocalState>(nullptr, 0, 0) {} |
1140 | | |
1141 | 18 | [[nodiscard]] bool is_source() const override { return true; } |
1142 | | |
1143 | 917k | Status get_block(RuntimeState* state, Block* block, bool* eos) override { |
1144 | 917k | *eos = _eos; |
1145 | 917k | return Status::OK(); |
1146 | 917k | } |
1147 | 0 | void set_low_memory_mode(RuntimeState* state) override { _low_memory_mode = true; } |
1148 | 4 | Status terminate(RuntimeState* state) override { |
1149 | 4 | _terminated = true; |
1150 | 4 | return Status::OK(); |
1151 | 4 | } |
1152 | 5.51k | size_t revocable_mem_size(RuntimeState* state) const override { return _revocable_mem_size; } |
1153 | 918k | size_t get_reserve_mem_size(RuntimeState* state) override { |
1154 | 918k | return _disable_reserve_mem |
1155 | 918k | ? 0 |
1156 | 918k | : OperatorX<DummyOperatorLocalState>::get_reserve_mem_size(state); |
1157 | 918k | } |
1158 | 2 | Status revoke_memory(RuntimeState* state) override { |
1159 | 2 | _revoke_called = true; |
1160 | 2 | return Status::OK(); |
1161 | 2 | } |
1162 | | |
1163 | | private: |
1164 | | friend class AssertNumRowsLocalState; |
1165 | | bool _eos = false; |
1166 | | bool _low_memory_mode = false; |
1167 | | bool _terminated = false; |
1168 | | size_t _revocable_mem_size = 0; |
1169 | | bool _disable_reserve_mem = false; |
1170 | | bool _revoke_called = false; |
1171 | | }; |
1172 | | |
1173 | | class DummySinkLocalState final : public PipelineXSinkLocalState<BasicSharedState> { |
1174 | | public: |
1175 | | using Base = PipelineXSinkLocalState<BasicSharedState>; |
1176 | | ENABLE_FACTORY_CREATOR(DummySinkLocalState); |
1177 | 15 | DummySinkLocalState(DataSinkOperatorXBase* parent, RuntimeState* state) : Base(parent, state) { |
1178 | 15 | _tmp_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), |
1179 | 15 | "DummyOperatorDependency", true); |
1180 | 15 | _finish_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), |
1181 | 15 | "DummyOperatorDependency", true); |
1182 | 15 | } |
1183 | | |
1184 | 12 | std::vector<Dependency*> dependencies() const override { return {_tmp_dependency.get()}; } |
1185 | 8 | Dependency* finishdependency() override { return _finish_dependency.get(); } |
1186 | 1.37M | bool is_finished() const override { return _is_finished; } |
1187 | | |
1188 | | private: |
1189 | | std::shared_ptr<Dependency> _tmp_dependency; |
1190 | | std::shared_ptr<Dependency> _finish_dependency; |
1191 | | std::atomic_bool _is_finished = false; |
1192 | | }; |
1193 | | |
1194 | | class DummySinkOperatorX final : public DataSinkOperatorX<DummySinkLocalState> { |
1195 | | public: |
1196 | | DummySinkOperatorX(int op_id, int node_id, int dest_id) |
1197 | 18 | : DataSinkOperatorX<DummySinkLocalState>(op_id, node_id, dest_id) {} |
1198 | 5 | Status sink(RuntimeState* state, Block* in_block, bool eos) override { |
1199 | 5 | return _return_eof ? Status::Error<ErrorCode::END_OF_FILE>("source have closed") |
1200 | 5 | : Status::OK(); |
1201 | 5 | } |
1202 | 0 | void set_low_memory_mode(RuntimeState* state) override { _low_memory_mode = true; } |
1203 | 4 | Status terminate(RuntimeState* state) override { |
1204 | 4 | _terminated = true; |
1205 | 4 | return Status::OK(); |
1206 | 4 | } |
1207 | 3.68k | size_t revocable_mem_size(RuntimeState* state) const override { return _revocable_mem_size; } |
1208 | 908 | size_t get_reserve_mem_size(RuntimeState* state, bool eos) override { |
1209 | 908 | return _disable_reserve_mem |
1210 | 908 | ? 0 |
1211 | 908 | : DataSinkOperatorX<DummySinkLocalState>::get_reserve_mem_size(state, eos); |
1212 | 908 | } |
1213 | 1 | Status revoke_memory(RuntimeState* state) override { |
1214 | 1 | _revoke_called = true; |
1215 | 1 | return Status::OK(); |
1216 | 1 | } |
1217 | | |
1218 | | private: |
1219 | | bool _low_memory_mode = false; |
1220 | | bool _terminated = false; |
1221 | | std::atomic_bool _return_eof = false; |
1222 | | size_t _revocable_mem_size = 0; |
1223 | | bool _disable_reserve_mem = false; |
1224 | | bool _revoke_called = false; |
1225 | | }; |
1226 | | #endif |
1227 | | |
1228 | | #include "common/compile_check_end.h" |
1229 | | } // namespace doris |