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_counters.h" |
40 | | #include "exec/operator/spill_utils.h" |
41 | | #include "exec/pipeline/dependency.h" |
42 | | #include "runtime/memory/mem_tracker.h" |
43 | | #include "runtime/query_context.h" |
44 | | #include "runtime/runtime_profile.h" |
45 | | #include "runtime/runtime_profile_counter_names.h" |
46 | | #include "runtime/runtime_state.h" |
47 | | #include "runtime/thread_context.h" |
48 | | |
49 | | namespace doris { |
50 | | class RowDescriptor; |
51 | | class RuntimeState; |
52 | | class TDataSink; |
53 | | class AsyncResultWriter; |
54 | | class ScoreRuntime; |
55 | | class AnnTopNRuntime; |
56 | | } // namespace doris |
57 | | |
58 | | namespace doris { |
59 | | |
60 | | class OperatorBase; |
61 | | class OperatorXBase; |
62 | | class DataSinkOperatorXBase; |
63 | | |
64 | | using OperatorPtr = std::shared_ptr<OperatorXBase>; |
65 | | using Operators = std::vector<OperatorPtr>; |
66 | | |
67 | | using DataSinkOperatorPtr = std::shared_ptr<DataSinkOperatorXBase>; |
68 | | |
69 | | // This struct is used only for initializing local state. |
70 | | struct LocalStateInfo { |
71 | | RuntimeProfile* parent_profile = nullptr; |
72 | | const std::vector<TScanRangeParams>& scan_ranges; |
73 | | BasicSharedState* shared_state; |
74 | | const std::map<int, std::pair<std::shared_ptr<BasicSharedState>, |
75 | | std::vector<std::shared_ptr<Dependency>>>>& shared_state_map; |
76 | | const int task_idx; |
77 | | }; |
78 | | |
79 | | // This struct is used only for initializing local sink state. |
80 | | struct LocalSinkStateInfo { |
81 | | const int task_idx; |
82 | | RuntimeProfile* parent_profile = nullptr; |
83 | | const int sender_id; |
84 | | BasicSharedState* shared_state; |
85 | | const std::map<int, std::pair<std::shared_ptr<BasicSharedState>, |
86 | | std::vector<std::shared_ptr<Dependency>>>>& shared_state_map; |
87 | | const TDataSink& tsink; |
88 | | }; |
89 | | |
90 | | class OperatorBase { |
91 | | public: |
92 | 863k | explicit OperatorBase() : _child(nullptr), _is_closed(false) {} |
93 | | explicit OperatorBase(bool is_serial_operator) |
94 | 919k | : _child(nullptr), _is_closed(false), _is_serial_operator(is_serial_operator) {} |
95 | 1.78M | virtual ~OperatorBase() = default; |
96 | | |
97 | 0 | virtual bool is_sink() const { return false; } |
98 | | |
99 | 1.26M | virtual bool is_source() const { return false; } |
100 | | |
101 | | [[nodiscard]] virtual const RowDescriptor& row_desc() const; |
102 | | |
103 | 0 | [[nodiscard]] virtual Status init(const TDataSink& tsink) { return Status::OK(); } |
104 | | |
105 | | [[nodiscard]] virtual std::string get_name() const = 0; |
106 | | [[nodiscard]] virtual Status prepare(RuntimeState* state) = 0; |
107 | | [[nodiscard]] virtual Status terminate(RuntimeState* state) = 0; |
108 | | [[nodiscard]] virtual Status close(RuntimeState* state); |
109 | | [[nodiscard]] virtual int node_id() const = 0; |
110 | 643k | [[nodiscard]] virtual int parallelism(RuntimeState* state) const { |
111 | 643k | return _is_serial_operator ? 1 : state->query_parallel_instance_num(); |
112 | 643k | } |
113 | | |
114 | 1.41M | [[nodiscard]] virtual Status set_child(OperatorPtr child) { |
115 | 1.41M | if (_child && child != nullptr) { |
116 | 0 | return Status::InternalError("Child is already set in node name={}", get_name()); |
117 | 0 | } |
118 | 1.41M | _child = child; |
119 | 1.41M | return Status::OK(); |
120 | 1.41M | } |
121 | | |
122 | | // Operators need to be executed serially. (e.g. finalized agg without key) |
123 | 3.43M | [[nodiscard]] virtual bool is_serial_operator() const { return _is_serial_operator; } |
124 | | |
125 | 0 | [[nodiscard]] bool is_closed() const { return _is_closed; } |
126 | | |
127 | 9.06k | virtual size_t revocable_mem_size(RuntimeState* state) const { return 0; } |
128 | | |
129 | 0 | virtual Status revoke_memory(RuntimeState* state) { return Status::OK(); } |
130 | | |
131 | 6.00k | virtual bool is_hash_join_probe() const { return false; } |
132 | | |
133 | | /** |
134 | | * Pipeline task is blockable means it will be blocked in the next run. So we should put the |
135 | | * pipeline task into the blocking task scheduler. |
136 | | */ |
137 | | virtual bool is_blockable(RuntimeState* state) const = 0; |
138 | 0 | virtual void set_low_memory_mode(RuntimeState* state) {} |
139 | | |
140 | | OperatorPtr child() { return _child; } |
141 | 0 | virtual Status reset(RuntimeState* state) { |
142 | 0 | return Status::InternalError("Reset is not implemented in operator: {}", get_name()); |
143 | 0 | } |
144 | | |
145 | | /* -------------- Interfaces to determine the input data properties -------------- */ |
146 | | /** |
147 | | * Return True if this operator relies on the bucket distribution (e.g. COLOCATE join, 1-phase AGG). |
148 | | * Data input to this kind of operators must have the same distribution with the table buckets. |
149 | | * It is also means `required_data_distribution` should be `BUCKET_HASH_SHUFFLE`. |
150 | | * @return |
151 | | */ |
152 | 3.71M | [[nodiscard]] virtual bool is_colocated_operator() const { return false; } |
153 | | /** |
154 | | * Return True if this operator relies on the bucket distribution or specific hash data distribution (e.g. SHUFFLED HASH join). |
155 | | * Data input to this kind of operators must be HASH distributed according to some rules. |
156 | | * All colocated operators are also shuffled operators. |
157 | | * It is also means `required_data_distribution` should be `BUCKET_HASH_SHUFFLE` or `HASH_SHUFFLE`. |
158 | | * @return |
159 | | */ |
160 | 3.72M | [[nodiscard]] virtual bool is_shuffled_operator() const { return false; } |
161 | | /** |
162 | | * 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). |
163 | | * |
164 | | * For single child's operators, return true if this operator is followed by a shuffled operator. |
165 | | * For example, in the plan fragment: |
166 | | * `UNION` -> `SHUFFLED HASH JOIN` |
167 | | * The `SHUFFLED HASH JOIN` is a shuffled operator so the UNION operator is followed by a shuffled operator. |
168 | | */ |
169 | 4.27M | [[nodiscard]] virtual bool followed_by_shuffled_operator() const { |
170 | 4.27M | return _followed_by_shuffled_operator; |
171 | 4.27M | } |
172 | | /** |
173 | | * Update the operator properties according to the plan node. |
174 | | * This is called before `prepare`. |
175 | | */ |
176 | | virtual void update_operator(const TPlanNode& tnode, bool followed_by_shuffled_operator, |
177 | 621k | bool require_bucket_distribution) { |
178 | 621k | _followed_by_shuffled_operator = followed_by_shuffled_operator; |
179 | 621k | _require_bucket_distribution = require_bucket_distribution; |
180 | 621k | } |
181 | | /** |
182 | | * Return the required data distribution of this operator. |
183 | | */ |
184 | | [[nodiscard]] virtual DataDistribution required_data_distribution( |
185 | | RuntimeState* /*state*/) const; |
186 | | |
187 | | protected: |
188 | | OperatorPtr _child = nullptr; |
189 | | |
190 | | bool _is_closed; |
191 | | bool _followed_by_shuffled_operator = false; |
192 | | bool _require_bucket_distribution = false; |
193 | | bool _is_serial_operator = false; |
194 | | }; |
195 | | |
196 | | class PipelineXLocalStateBase { |
197 | | public: |
198 | | PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent); |
199 | 2.50M | virtual ~PipelineXLocalStateBase() = default; |
200 | | |
201 | | template <class TARGET> |
202 | 254M | TARGET& cast() { |
203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) |
204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() |
205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); |
206 | 254M | return reinterpret_cast<TARGET&>(*this); |
207 | 254M | } _ZN5doris23PipelineXLocalStateBase4castINS_22RecCTESourceLocalStateEEERT_v Line | Count | Source | 202 | 10.8k | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 10.8k | return reinterpret_cast<TARGET&>(*this); | 207 | 10.8k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_21CacheSourceLocalStateEEERT_v Line | Count | Source | 202 | 79 | TARGET& cast() { | 203 | 79 | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 0 | << " and expect type is" << typeid(TARGET).name(); | 206 | 79 | return reinterpret_cast<TARGET&>(*this); | 207 | 79 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_29LocalExchangeSourceLocalStateEEERT_v Line | Count | Source | 202 | 3.11M | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 3.11M | return reinterpret_cast<TARGET&>(*this); | 207 | 3.11M | } |
_ZN5doris23PipelineXLocalStateBase4castINS_35MultiCastDataStreamSourceLocalStateEEERT_v Line | Count | Source | 202 | 55.6k | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 55.6k | return reinterpret_cast<TARGET&>(*this); | 207 | 55.6k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_18OlapScanLocalStateEEERT_v Line | Count | Source | 202 | 50.9M | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 50.9M | return reinterpret_cast<TARGET&>(*this); | 207 | 50.9M | } |
_ZN5doris23PipelineXLocalStateBase4castINS_21GroupCommitLocalStateEEERT_v Line | Count | Source | 202 | 4.95M | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 4.95M | return reinterpret_cast<TARGET&>(*this); | 207 | 4.95M | } |
Unexecuted instantiation: _ZN5doris23PipelineXLocalStateBase4castINS_18JDBCScanLocalStateEEERT_v _ZN5doris23PipelineXLocalStateBase4castINS_18FileScanLocalStateEEERT_v Line | Count | Source | 202 | 446k | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 446k | return reinterpret_cast<TARGET&>(*this); | 207 | 446k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_16EsScanLocalStateEEERT_v Line | Count | Source | 202 | 11.4k | TARGET& cast() { | 203 | 11.4k | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 0 | << " and expect type is" << typeid(TARGET).name(); | 206 | 11.4k | return reinterpret_cast<TARGET&>(*this); | 207 | 11.4k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_23HashJoinProbeLocalStateEEERT_v Line | Count | Source | 202 | 1.21M | TARGET& cast() { | 203 | 1.21M | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 101 | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 101 | << " and expect type is" << typeid(TARGET).name(); | 206 | 1.21M | return reinterpret_cast<TARGET&>(*this); | 207 | 1.21M | } |
_ZN5doris23PipelineXLocalStateBase4castINS_34PartitionedHashJoinProbeLocalStateEEERT_v Line | Count | Source | 202 | 59 | TARGET& cast() { | 203 | 59 | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 0 | << " and expect type is" << typeid(TARGET).name(); | 206 | 59 | return reinterpret_cast<TARGET&>(*this); | 207 | 59 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_29NestedLoopJoinProbeLocalStateEEERT_v Line | Count | Source | 202 | 184M | TARGET& cast() { | 203 | 184M | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 144 | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 144 | << " and expect type is" << typeid(TARGET).name(); | 206 | 184M | return reinterpret_cast<TARGET&>(*this); | 207 | 184M | } |
_ZN5doris23PipelineXLocalStateBase4castINS_21UnionSourceLocalStateEEERT_v Line | Count | Source | 202 | 623k | TARGET& cast() { | 203 | 623k | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 14 | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 14 | << " and expect type is" << typeid(TARGET).name(); | 206 | 623k | return reinterpret_cast<TARGET&>(*this); | 207 | 623k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_29PartitionSortSourceLocalStateEEERT_v Line | Count | Source | 202 | 2.80k | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 2.80k | return reinterpret_cast<TARGET&>(*this); | 207 | 2.80k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_25MaterializationLocalStateEEERT_v Line | Count | Source | 202 | 34.7k | TARGET& cast() { | 203 | 34.7k | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 0 | << " and expect type is" << typeid(TARGET).name(); | 206 | 34.7k | return reinterpret_cast<TARGET&>(*this); | 207 | 34.7k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_19SetSourceLocalStateILb1EEEEERT_v Line | Count | Source | 202 | 7.37k | TARGET& cast() { | 203 | 7.37k | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 0 | << " and expect type is" << typeid(TARGET).name(); | 206 | 7.37k | return reinterpret_cast<TARGET&>(*this); | 207 | 7.37k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_19SetSourceLocalStateILb0EEEEERT_v Line | Count | Source | 202 | 8.24k | TARGET& cast() { | 203 | 8.24k | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 0 | << " and expect type is" << typeid(TARGET).name(); | 206 | 8.24k | return reinterpret_cast<TARGET&>(*this); | 207 | 8.24k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_18EmptySetLocalStateEEERT_v Line | Count | Source | 202 | 3.19k | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 3.19k | return reinterpret_cast<TARGET&>(*this); | 207 | 3.19k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_18MetaScanLocalStateEEERT_v Line | Count | Source | 202 | 19.1k | TARGET& cast() { | 203 | 19.1k | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 0 | << " and expect type is" << typeid(TARGET).name(); | 206 | 19.1k | return reinterpret_cast<TARGET&>(*this); | 207 | 19.1k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_16SelectLocalStateEEERT_v Line | Count | Source | 202 | 17.2k | TARGET& cast() { | 203 | 17.2k | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 0 | << " and expect type is" << typeid(TARGET).name(); | 206 | 17.2k | return reinterpret_cast<TARGET&>(*this); | 207 | 17.2k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_20RecCTEScanLocalStateEEERT_v Line | Count | Source | 202 | 12.8k | TARGET& cast() { | 203 | 12.8k | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 0 | << " and expect type is" << typeid(TARGET).name(); | 206 | 12.8k | return reinterpret_cast<TARGET&>(*this); | 207 | 12.8k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_23TableFunctionLocalStateEEERT_v Line | Count | Source | 202 | 54.9k | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 54.9k | return reinterpret_cast<TARGET&>(*this); | 207 | 54.9k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_18ExchangeLocalStateEEERT_v Line | Count | Source | 202 | 1.99M | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 1.99M | return reinterpret_cast<TARGET&>(*this); | 207 | 1.99M | } |
_ZN5doris23PipelineXLocalStateBase4castINS_30DistinctStreamingAggLocalStateEEERT_v Line | Count | Source | 202 | 4.51M | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 4.51M | return reinterpret_cast<TARGET&>(*this); | 207 | 4.51M | } |
_ZN5doris23PipelineXLocalStateBase4castINS_22StreamingAggLocalStateEEERT_v Line | Count | Source | 202 | 296k | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 296k | return reinterpret_cast<TARGET&>(*this); | 207 | 296k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_13AggLocalStateEEERT_v Line | Count | Source | 202 | 402k | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 402k | return reinterpret_cast<TARGET&>(*this); | 207 | 402k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_24PartitionedAggLocalStateEEERT_v Line | Count | Source | 202 | 114 | TARGET& cast() { | 203 | 114 | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 0 | << " and expect type is" << typeid(TARGET).name(); | 206 | 114 | return reinterpret_cast<TARGET&>(*this); | 207 | 114 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_21BucketedAggLocalStateEEERT_v Line | Count | Source | 202 | 20.6k | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 20.6k | return reinterpret_cast<TARGET&>(*this); | 207 | 20.6k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_14SortLocalStateEEERT_v Line | Count | Source | 202 | 40.9k | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 40.9k | return reinterpret_cast<TARGET&>(*this); | 207 | 40.9k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_19SpillSortLocalStateEEERT_v Line | Count | Source | 202 | 750 | TARGET& cast() { | 203 | 750 | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 0 | << " and expect type is" << typeid(TARGET).name(); | 206 | 750 | return reinterpret_cast<TARGET&>(*this); | 207 | 750 | } |
_ZN5doris23PipelineXLocalStateBase4castINS_24LocalMergeSortLocalStateEEERT_v Line | Count | Source | 202 | 1.38M | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 1.38M | return reinterpret_cast<TARGET&>(*this); | 207 | 1.38M | } |
_ZN5doris23PipelineXLocalStateBase4castINS_18AnalyticLocalStateEEERT_v Line | Count | Source | 202 | 38.5k | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 38.5k | return reinterpret_cast<TARGET&>(*this); | 207 | 38.5k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_16RepeatLocalStateEEERT_v Line | Count | Source | 202 | 26.7k | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 26.7k | return reinterpret_cast<TARGET&>(*this); | 207 | 26.7k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_23AssertNumRowsLocalStateEEERT_v Line | Count | Source | 202 | 1.28k | TARGET& cast() { | 203 | 1.28k | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 0 | << " and expect type is" << typeid(TARGET).name(); | 206 | 1.28k | return reinterpret_cast<TARGET&>(*this); | 207 | 1.28k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_17DataGenLocalStateEEERT_v Line | Count | Source | 202 | 31.5k | TARGET& cast() { | 203 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 206 | 31.5k | return reinterpret_cast<TARGET&>(*this); | 207 | 31.5k | } |
_ZN5doris23PipelineXLocalStateBase4castINS_20SchemaScanLocalStateEEERT_v Line | Count | Source | 202 | 11.2k | TARGET& cast() { | 203 | 11.2k | DCHECK(dynamic_cast<TARGET*>(this)) | 204 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 205 | 0 | << " and expect type is" << typeid(TARGET).name(); | 206 | 11.2k | return reinterpret_cast<TARGET&>(*this); | 207 | 11.2k | } |
|
208 | | template <class TARGET> |
209 | | const TARGET& cast() const { |
210 | | DCHECK(dynamic_cast<TARGET*>(this)) |
211 | | << " Mismatch type! Current type is " << typeid(*this).name() |
212 | | << " and expect type is" << typeid(TARGET).name(); |
213 | | return reinterpret_cast<const TARGET&>(*this); |
214 | | } |
215 | | |
216 | | // Do initialization. This step should be executed only once and in bthread, so we can do some |
217 | | // lightweight or non-idempotent operations (e.g. init profile, clone expr ctx from operatorX) |
218 | | virtual Status init(RuntimeState* state, LocalStateInfo& info) = 0; |
219 | | // Make sure all resources are ready before execution. For example, remote tablets should be |
220 | | // loaded to local storage. |
221 | | // This is called by execution pthread and different from `Operator::prepare` which is called |
222 | | // by bthread. |
223 | | virtual Status prepare(RuntimeState* state) = 0; |
224 | | // Do initialization. This step can be executed multiple times, so we should make sure it is |
225 | | // idempotent (e.g. wait for runtime filters). |
226 | | virtual Status open(RuntimeState* state) = 0; |
227 | | virtual Status close(RuntimeState* state) = 0; |
228 | | virtual Status terminate(RuntimeState* state) = 0; |
229 | | |
230 | | // If use projection, we should clear `_origin_block`. |
231 | | void clear_origin_block(); |
232 | | |
233 | | void reached_limit(Block* block, bool* eos); |
234 | 2.46M | RuntimeProfile* operator_profile() { return _operator_profile.get(); } |
235 | 739k | RuntimeProfile* common_profile() { return _common_profile.get(); } |
236 | 15.6M | RuntimeProfile* custom_profile() { return _custom_profile.get(); } |
237 | | |
238 | 60.0M | RuntimeProfile::Counter* exec_time_counter() { return _exec_timer; } |
239 | 0 | RuntimeProfile::Counter* memory_used_counter() { return _memory_used_counter; } |
240 | 7.53k | OperatorXBase* parent() { return _parent; } |
241 | 4.15M | RuntimeState* state() { return _state; } |
242 | 620k | VExprContextSPtrs& conjuncts() { return _conjuncts; } |
243 | 0 | VExprContextSPtrs& projections() { return _projections; } |
244 | 21.0k | [[nodiscard]] int64_t num_rows_returned() const { return _num_rows_returned; } |
245 | 668k | void add_num_rows_returned(int64_t delta) { _num_rows_returned += delta; } |
246 | 6.63k | void set_num_rows_returned(int64_t value) { _num_rows_returned = value; } |
247 | | |
248 | | [[nodiscard]] virtual std::string debug_string(int indentation_level = 0) const = 0; |
249 | | [[nodiscard]] virtual bool is_blockable() const; |
250 | | |
251 | 0 | virtual std::vector<Dependency*> dependencies() const { return {nullptr}; } |
252 | | |
253 | | // override in Scan |
254 | 2.46M | virtual Dependency* finishdependency() { return nullptr; } |
255 | | // override in Scan MultiCastSink |
256 | 1.55M | virtual std::vector<Dependency*> execution_dependencies() { return {}; } |
257 | | |
258 | | Status filter_block(const VExprContextSPtrs& expr_contexts, Block* block); |
259 | | |
260 | 27.6M | int64_t& estimate_memory_usage() { return _estimate_memory_usage; } |
261 | | |
262 | 53.7M | void reset_estimate_memory_usage() { _estimate_memory_usage = 0; } |
263 | | |
264 | 31.4M | bool low_memory_mode() { |
265 | | #ifdef BE_TEST |
266 | | return false; |
267 | | #else |
268 | 31.4M | return _state->low_memory_mode(); |
269 | 31.4M | #endif |
270 | 31.4M | } |
271 | | |
272 | | protected: |
273 | | friend class OperatorXBase; |
274 | | template <typename LocalStateType> |
275 | | friend class ScanOperatorX; |
276 | | |
277 | | ObjectPool* _pool = nullptr; |
278 | | int64_t _num_rows_returned {0}; |
279 | | int64_t _estimate_memory_usage {0}; |
280 | | |
281 | | /* |
282 | | Each operator has its profile like this: |
283 | | XXXX_OPERATOR: |
284 | | CommonCounters: |
285 | | ... |
286 | | CustomCounters: |
287 | | ... |
288 | | */ |
289 | | // Profile of this operator. |
290 | | // Should not modify this profile usually. |
291 | | std::unique_ptr<RuntimeProfile> _operator_profile; |
292 | | // CommonCounters of this operator. |
293 | | // CommonCounters are counters that will be used by all operators. |
294 | | std::unique_ptr<RuntimeProfile> _common_profile; |
295 | | // CustomCounters of this operator. |
296 | | // CustomCounters are counters that will be used by this operator only. |
297 | | std::unique_ptr<RuntimeProfile> _custom_profile; |
298 | | |
299 | | RuntimeProfile::Counter* _rows_returned_counter = nullptr; |
300 | | RuntimeProfile::Counter* _blocks_returned_counter = nullptr; |
301 | | RuntimeProfile::Counter* _wait_for_dependency_timer = nullptr; |
302 | | // Account for current memory and peak memory used by this node |
303 | | RuntimeProfile::HighWaterMarkCounter* _memory_used_counter = nullptr; |
304 | | RuntimeProfile::Counter* _projection_timer = nullptr; |
305 | | RuntimeProfile::Counter* _exec_timer = nullptr; |
306 | | RuntimeProfile::Counter* _init_timer = nullptr; |
307 | | RuntimeProfile::Counter* _open_timer = nullptr; |
308 | | RuntimeProfile::Counter* _close_timer = nullptr; |
309 | | |
310 | | OperatorXBase* _parent = nullptr; |
311 | | RuntimeState* _state = nullptr; |
312 | | VExprContextSPtrs _conjuncts; |
313 | | VExprContextSPtrs _projections; |
314 | | std::shared_ptr<ScoreRuntime> _score_runtime; |
315 | | std::shared_ptr<segment_v2::AnnTopNRuntime> _ann_topn_runtime; |
316 | | // Used in common subexpression elimination to compute intermediate results. |
317 | | std::vector<VExprContextSPtrs> _intermediate_projections; |
318 | | |
319 | | bool _closed = false; |
320 | | std::atomic<bool> _terminated = false; |
321 | | Block _origin_block; |
322 | | }; |
323 | | |
324 | | template <typename SharedStateArg = FakeSharedState> |
325 | | class PipelineXLocalState : public PipelineXLocalStateBase { |
326 | | public: |
327 | | using SharedStateType = SharedStateArg; |
328 | | PipelineXLocalState(RuntimeState* state, OperatorXBase* parent) |
329 | 2.48M | : PipelineXLocalStateBase(state, parent) {}_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 97.0k | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 40 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 267k | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 23 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 8.39k | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 9.04k | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 134k | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 638 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 25 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 1.23M | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 55.2k | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 17 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 7.73k | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 383 | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 4.92k | : PipelineXLocalStateBase(state, parent) {} |
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 670k | : PipelineXLocalStateBase(state, parent) {} |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 329 | 151 | : PipelineXLocalStateBase(state, parent) {} |
|
330 | | ~PipelineXLocalState() override = default; |
331 | | |
332 | | Status init(RuntimeState* state, LocalStateInfo& info) override; |
333 | 11.5M | Status prepare(RuntimeState* state) override { return Status::OK(); }_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 333 | 4.95M | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 333 | 24.6k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 333 | 1.40M | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 333 | 3.68M | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 333 | 64 | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 333 | 1.64k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 333 | 132k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 333 | 478k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE7prepareEPNS_12RuntimeStateE _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 333 | 96 | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 333 | 73.8k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 333 | 45.1k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 333 | 664k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 333 | 8.45k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 333 | 30 | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 333 | 56.5k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE7prepareEPNS_12RuntimeStateE _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 333 | 4.47k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
|
334 | | Status open(RuntimeState* state) override; |
335 | | |
336 | | virtual std::string name_suffix() const; |
337 | | |
338 | | Status close(RuntimeState* state) override; |
339 | | Status terminate(RuntimeState* state) override; |
340 | | |
341 | | [[nodiscard]] std::string debug_string(int indentation_level = 0) const override; |
342 | | |
343 | 28.2M | std::vector<Dependency*> dependencies() const override { |
344 | 28.2M | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; |
345 | 28.2M | } _ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12dependenciesEv Line | Count | Source | 343 | 473k | std::vector<Dependency*> dependencies() const override { | 344 | 473k | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 345 | 473k | } |
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12dependenciesEv Line | Count | Source | 343 | 4.90k | std::vector<Dependency*> dependencies() const override { | 344 | 18.4E | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 345 | 4.90k | } |
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12dependenciesEv Line | Count | Source | 343 | 226k | std::vector<Dependency*> dependencies() const override { | 344 | 226k | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 345 | 226k | } |
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12dependenciesEv Line | Count | Source | 343 | 663k | std::vector<Dependency*> dependencies() const override { | 344 | 18.4E | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 345 | 663k | } |
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12dependenciesEv Line | Count | Source | 343 | 14 | std::vector<Dependency*> dependencies() const override { | 344 | 14 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 345 | 14 | } |
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12dependenciesEv Line | Count | Source | 343 | 26.5M | std::vector<Dependency*> dependencies() const override { | 344 | 26.5M | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 345 | 26.5M | } |
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12dependenciesEv Line | Count | Source | 343 | 55.4k | std::vector<Dependency*> dependencies() const override { | 344 | 55.4k | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 345 | 55.4k | } |
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12dependenciesEv Line | Count | Source | 343 | 73.0k | std::vector<Dependency*> dependencies() const override { | 344 | 18.4E | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 345 | 73.0k | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12dependenciesEv _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12dependenciesEv Line | Count | Source | 343 | 12 | std::vector<Dependency*> dependencies() const override { | 344 | 12 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 345 | 12 | } |
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12dependenciesEv Line | Count | Source | 343 | 8.41k | std::vector<Dependency*> dependencies() const override { | 344 | 18.4E | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 345 | 8.41k | } |
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12dependenciesEv Line | Count | Source | 343 | 9.04k | std::vector<Dependency*> dependencies() const override { | 344 | 9.04k | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 345 | 9.04k | } |
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12dependenciesEv Line | Count | Source | 343 | 134k | std::vector<Dependency*> dependencies() const override { | 344 | 134k | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 345 | 134k | } |
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12dependenciesEv Line | Count | Source | 343 | 645 | std::vector<Dependency*> dependencies() const override { | 344 | 645 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 345 | 645 | } |
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12dependenciesEv Line | Count | Source | 343 | 6 | std::vector<Dependency*> dependencies() const override { | 344 | 6 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 345 | 6 | } |
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12dependenciesEv Line | Count | Source | 343 | 7.71k | std::vector<Dependency*> dependencies() const override { | 344 | 18.4E | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 345 | 7.71k | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12dependenciesEv Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12dependenciesEv |
346 | | |
347 | 2.41M | virtual bool must_set_shared_state() const { |
348 | 2.41M | return !std::is_same_v<SharedStateArg, FakeSharedState>; |
349 | 2.41M | } _ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE21must_set_shared_stateEv Line | Count | Source | 347 | 1.22M | virtual bool must_set_shared_state() const { | 348 | 1.22M | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 349 | 1.22M | } |
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE21must_set_shared_stateEv Line | Count | Source | 347 | 4.90k | virtual bool must_set_shared_state() const { | 348 | 4.90k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 349 | 4.90k | } |
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE21must_set_shared_stateEv Line | Count | Source | 347 | 264k | virtual bool must_set_shared_state() const { | 348 | 264k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 349 | 264k | } |
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE21must_set_shared_stateEv Line | Count | Source | 347 | 666k | virtual bool must_set_shared_state() const { | 348 | 666k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 349 | 666k | } |
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE21must_set_shared_stateEv Line | Count | Source | 347 | 17 | virtual bool must_set_shared_state() const { | 348 | 17 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 349 | 17 | } |
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE21must_set_shared_stateEv Line | Count | Source | 347 | 382 | virtual bool must_set_shared_state() const { | 348 | 382 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 349 | 382 | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE21must_set_shared_stateEv _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE21must_set_shared_stateEv Line | Count | Source | 347 | 96.3k | virtual bool must_set_shared_state() const { | 348 | 96.3k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 349 | 96.3k | } |
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE21must_set_shared_stateEv Line | Count | Source | 347 | 1 | virtual bool must_set_shared_state() const { | 348 | 1 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 349 | 1 | } |
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE21must_set_shared_stateEv Line | Count | Source | 347 | 23 | virtual bool must_set_shared_state() const { | 348 | 23 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 349 | 23 | } |
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE21must_set_shared_stateEv Line | Count | Source | 347 | 8.35k | virtual bool must_set_shared_state() const { | 348 | 8.35k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 349 | 8.35k | } |
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE21must_set_shared_stateEv Line | Count | Source | 347 | 9.00k | virtual bool must_set_shared_state() const { | 348 | 9.00k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 349 | 9.00k | } |
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE21must_set_shared_stateEv Line | Count | Source | 347 | 133k | virtual bool must_set_shared_state() const { | 348 | 133k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 349 | 133k | } |
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE21must_set_shared_stateEv Line | Count | Source | 347 | 619 | virtual bool must_set_shared_state() const { | 348 | 619 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 349 | 619 | } |
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE21must_set_shared_stateEv Line | Count | Source | 347 | 16 | virtual bool must_set_shared_state() const { | 348 | 16 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 349 | 16 | } |
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE21must_set_shared_stateEv Line | Count | Source | 347 | 7.72k | virtual bool must_set_shared_state() const { | 348 | 7.72k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 349 | 7.72k | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE21must_set_shared_stateEv _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE21must_set_shared_stateEv Line | Count | Source | 347 | 151 | virtual bool must_set_shared_state() const { | 348 | 151 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 349 | 151 | } |
|
350 | | |
351 | | protected: |
352 | | Dependency* _dependency = nullptr; |
353 | | SharedStateArg* _shared_state = nullptr; |
354 | | }; |
355 | | |
356 | | template <typename SharedStateArg> |
357 | | class PipelineXSpillLocalState : public PipelineXLocalState<SharedStateArg> { |
358 | | public: |
359 | | using Base = PipelineXLocalState<SharedStateArg>; |
360 | | PipelineXSpillLocalState(RuntimeState* state, OperatorXBase* parent) |
361 | 7.82k | : PipelineXLocalState<SharedStateArg>(state, parent) {}_ZN5doris24PipelineXSpillLocalStateINS_30PartitionedHashJoinSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 361 | 40 | : PipelineXLocalState<SharedStateArg>(state, parent) {} |
_ZN5doris24PipelineXSpillLocalStateINS_20SpillSortSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 361 | 23 | : PipelineXLocalState<SharedStateArg>(state, parent) {} |
_ZN5doris24PipelineXSpillLocalStateINS_25PartitionedAggSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 361 | 25 | : PipelineXLocalState<SharedStateArg>(state, parent) {} |
_ZN5doris24PipelineXSpillLocalStateINS_20MultiCastSharedStateEEC2EPNS_12RuntimeStateEPNS_13OperatorXBaseE Line | Count | Source | 361 | 7.73k | : PipelineXLocalState<SharedStateArg>(state, parent) {} |
|
362 | | ~PipelineXSpillLocalState() override = default; |
363 | | |
364 | 7.77k | Status init(RuntimeState* state, LocalStateInfo& info) override { |
365 | 7.77k | RETURN_IF_ERROR(PipelineXLocalState<SharedStateArg>::init(state, info)); |
366 | | |
367 | 7.77k | init_spill_read_counters(); |
368 | | |
369 | 7.77k | return Status::OK(); |
370 | 7.77k | } _ZN5doris24PipelineXSpillLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 364 | 23 | Status init(RuntimeState* state, LocalStateInfo& info) override { | 365 | 23 | RETURN_IF_ERROR(PipelineXLocalState<SharedStateArg>::init(state, info)); | 366 | | | 367 | 23 | init_spill_read_counters(); | 368 | | | 369 | 23 | return Status::OK(); | 370 | 23 | } |
_ZN5doris24PipelineXSpillLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 364 | 16 | Status init(RuntimeState* state, LocalStateInfo& info) override { | 365 | 16 | RETURN_IF_ERROR(PipelineXLocalState<SharedStateArg>::init(state, info)); | 366 | | | 367 | 16 | init_spill_read_counters(); | 368 | | | 369 | 16 | return Status::OK(); | 370 | 16 | } |
_ZN5doris24PipelineXSpillLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 364 | 7.73k | Status init(RuntimeState* state, LocalStateInfo& info) override { | 365 | 7.73k | RETURN_IF_ERROR(PipelineXLocalState<SharedStateArg>::init(state, info)); | 366 | | | 367 | 7.73k | init_spill_read_counters(); | 368 | | | 369 | 7.73k | return Status::OK(); | 370 | 7.73k | } |
_ZN5doris24PipelineXSpillLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 364 | 1 | Status init(RuntimeState* state, LocalStateInfo& info) override { | 365 | 1 | RETURN_IF_ERROR(PipelineXLocalState<SharedStateArg>::init(state, info)); | 366 | | | 367 | 1 | init_spill_read_counters(); | 368 | | | 369 | 1 | return Status::OK(); | 370 | 1 | } |
|
371 | | |
372 | 88 | void init_spill_write_counters() { |
373 | 88 | _write_counters.init(Base::custom_profile()); |
374 | | |
375 | | // Source-only extra write counters |
376 | 88 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( |
377 | 88 | Base::custom_profile(), profile::SPILL_WRITE_FILE_BYTES, TUnit::BYTES, 1); |
378 | 88 | _spill_file_total_count = ADD_COUNTER_WITH_LEVEL( |
379 | 88 | Base::custom_profile(), profile::SPILL_WRITE_FILE_TOTAL_COUNT, TUnit::UNIT, 1); |
380 | 88 | } _ZN5doris24PipelineXSpillLocalStateINS_30PartitionedHashJoinSharedStateEE25init_spill_write_countersEv Line | Count | Source | 372 | 40 | void init_spill_write_counters() { | 373 | 40 | _write_counters.init(Base::custom_profile()); | 374 | | | 375 | | // Source-only extra write counters | 376 | 40 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( | 377 | 40 | Base::custom_profile(), profile::SPILL_WRITE_FILE_BYTES, TUnit::BYTES, 1); | 378 | 40 | _spill_file_total_count = ADD_COUNTER_WITH_LEVEL( | 379 | 40 | Base::custom_profile(), profile::SPILL_WRITE_FILE_TOTAL_COUNT, TUnit::UNIT, 1); | 380 | 40 | } |
_ZN5doris24PipelineXSpillLocalStateINS_20SpillSortSharedStateEE25init_spill_write_countersEv Line | Count | Source | 372 | 23 | void init_spill_write_counters() { | 373 | 23 | _write_counters.init(Base::custom_profile()); | 374 | | | 375 | | // Source-only extra write counters | 376 | 23 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( | 377 | 23 | Base::custom_profile(), profile::SPILL_WRITE_FILE_BYTES, TUnit::BYTES, 1); | 378 | 23 | _spill_file_total_count = ADD_COUNTER_WITH_LEVEL( | 379 | 23 | Base::custom_profile(), profile::SPILL_WRITE_FILE_TOTAL_COUNT, TUnit::UNIT, 1); | 380 | 23 | } |
_ZN5doris24PipelineXSpillLocalStateINS_25PartitionedAggSharedStateEE25init_spill_write_countersEv Line | Count | Source | 372 | 25 | void init_spill_write_counters() { | 373 | 25 | _write_counters.init(Base::custom_profile()); | 374 | | | 375 | | // Source-only extra write counters | 376 | 25 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( | 377 | 25 | Base::custom_profile(), profile::SPILL_WRITE_FILE_BYTES, TUnit::BYTES, 1); | 378 | 25 | _spill_file_total_count = ADD_COUNTER_WITH_LEVEL( | 379 | 25 | Base::custom_profile(), profile::SPILL_WRITE_FILE_TOTAL_COUNT, TUnit::UNIT, 1); | 380 | 25 | } |
|
381 | | |
382 | 7.81k | void init_spill_read_counters() { |
383 | 7.81k | _spill_total_timer = |
384 | 7.81k | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), profile::SPILL_TOTAL_TIME, 1); |
385 | | |
386 | 7.81k | _read_counters.init(Base::custom_profile()); |
387 | | |
388 | 7.81k | _spill_file_current_size = ADD_COUNTER_WITH_LEVEL( |
389 | 7.81k | Base::custom_profile(), profile::SPILL_WRITE_FILE_CURRENT_BYTES, TUnit::BYTES, 1); |
390 | 7.81k | _spill_file_current_count = ADD_COUNTER_WITH_LEVEL( |
391 | 7.81k | Base::custom_profile(), profile::SPILL_WRITE_FILE_CURRENT_COUNT, TUnit::UNIT, 1); |
392 | 7.81k | } _ZN5doris24PipelineXSpillLocalStateINS_20SpillSortSharedStateEE24init_spill_read_countersEv Line | Count | Source | 382 | 23 | void init_spill_read_counters() { | 383 | 23 | _spill_total_timer = | 384 | 23 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), profile::SPILL_TOTAL_TIME, 1); | 385 | | | 386 | 23 | _read_counters.init(Base::custom_profile()); | 387 | | | 388 | 23 | _spill_file_current_size = ADD_COUNTER_WITH_LEVEL( | 389 | 23 | Base::custom_profile(), profile::SPILL_WRITE_FILE_CURRENT_BYTES, TUnit::BYTES, 1); | 390 | 23 | _spill_file_current_count = ADD_COUNTER_WITH_LEVEL( | 391 | 23 | Base::custom_profile(), profile::SPILL_WRITE_FILE_CURRENT_COUNT, TUnit::UNIT, 1); | 392 | 23 | } |
_ZN5doris24PipelineXSpillLocalStateINS_25PartitionedAggSharedStateEE24init_spill_read_countersEv Line | Count | Source | 382 | 25 | void init_spill_read_counters() { | 383 | 25 | _spill_total_timer = | 384 | 25 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), profile::SPILL_TOTAL_TIME, 1); | 385 | | | 386 | 25 | _read_counters.init(Base::custom_profile()); | 387 | | | 388 | 25 | _spill_file_current_size = ADD_COUNTER_WITH_LEVEL( | 389 | 25 | Base::custom_profile(), profile::SPILL_WRITE_FILE_CURRENT_BYTES, TUnit::BYTES, 1); | 390 | 25 | _spill_file_current_count = ADD_COUNTER_WITH_LEVEL( | 391 | 25 | Base::custom_profile(), profile::SPILL_WRITE_FILE_CURRENT_COUNT, TUnit::UNIT, 1); | 392 | 25 | } |
_ZN5doris24PipelineXSpillLocalStateINS_20MultiCastSharedStateEE24init_spill_read_countersEv Line | Count | Source | 382 | 7.72k | void init_spill_read_counters() { | 383 | 7.72k | _spill_total_timer = | 384 | 7.72k | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), profile::SPILL_TOTAL_TIME, 1); | 385 | | | 386 | 7.72k | _read_counters.init(Base::custom_profile()); | 387 | | | 388 | 7.72k | _spill_file_current_size = ADD_COUNTER_WITH_LEVEL( | 389 | 7.72k | Base::custom_profile(), profile::SPILL_WRITE_FILE_CURRENT_BYTES, TUnit::BYTES, 1); | 390 | 7.72k | _spill_file_current_count = ADD_COUNTER_WITH_LEVEL( | 391 | 7.72k | Base::custom_profile(), profile::SPILL_WRITE_FILE_CURRENT_COUNT, TUnit::UNIT, 1); | 392 | 7.72k | } |
_ZN5doris24PipelineXSpillLocalStateINS_30PartitionedHashJoinSharedStateEE24init_spill_read_countersEv Line | Count | Source | 382 | 40 | void init_spill_read_counters() { | 383 | 40 | _spill_total_timer = | 384 | 40 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), profile::SPILL_TOTAL_TIME, 1); | 385 | | | 386 | 40 | _read_counters.init(Base::custom_profile()); | 387 | | | 388 | 40 | _spill_file_current_size = ADD_COUNTER_WITH_LEVEL( | 389 | 40 | Base::custom_profile(), profile::SPILL_WRITE_FILE_CURRENT_BYTES, TUnit::BYTES, 1); | 390 | 40 | _spill_file_current_count = ADD_COUNTER_WITH_LEVEL( | 391 | 40 | Base::custom_profile(), profile::SPILL_WRITE_FILE_CURRENT_COUNT, TUnit::UNIT, 1); | 392 | 40 | } |
|
393 | | |
394 | | // Total time of spill, including spill task scheduling time, |
395 | | // serialize block time, write disk file time, |
396 | | // and read disk file time, deserialize block time etc. |
397 | | RuntimeProfile::Counter* _spill_total_timer = nullptr; |
398 | | |
399 | | // Shared spill write counters |
400 | | SpillWriteCounters _write_counters; |
401 | | // Backward-compatible aliases for commonly accessed write counters |
402 | | RuntimeProfile::Counter*& _spill_write_file_timer = _write_counters.spill_write_file_timer; |
403 | | RuntimeProfile::Counter*& _spill_write_serialize_block_timer = |
404 | | _write_counters.spill_write_serialize_block_timer; |
405 | | RuntimeProfile::Counter*& _spill_write_block_count = _write_counters.spill_write_block_count; |
406 | | RuntimeProfile::Counter*& _spill_write_block_data_size = |
407 | | _write_counters.spill_write_block_data_size; |
408 | | RuntimeProfile::Counter*& _spill_write_rows_count = _write_counters.spill_write_rows_count; |
409 | | |
410 | | // Source-only write counters (not in SpillWriteCounters) |
411 | | // Total bytes of spill data written to disk file(after serialized) |
412 | | RuntimeProfile::Counter* _spill_write_file_total_size = nullptr; |
413 | | RuntimeProfile::Counter* _spill_file_total_count = nullptr; |
414 | | RuntimeProfile::Counter* _spill_file_current_count = nullptr; |
415 | | // Spilled file total size |
416 | | RuntimeProfile::Counter* _spill_file_total_size = nullptr; |
417 | | // Current spilled file size |
418 | | RuntimeProfile::Counter* _spill_file_current_size = nullptr; |
419 | | |
420 | | // Shared spill read counters |
421 | | SpillReadCounters _read_counters; |
422 | | // Backward-compatible aliases for commonly accessed read counters |
423 | | RuntimeProfile::Counter*& _spill_read_file_time = _read_counters.spill_read_file_time; |
424 | | RuntimeProfile::Counter*& _spill_read_deserialize_block_timer = |
425 | | _read_counters.spill_read_deserialize_block_timer; |
426 | | RuntimeProfile::Counter*& _spill_read_block_count = _read_counters.spill_read_block_count; |
427 | | RuntimeProfile::Counter*& _spill_read_block_data_size = |
428 | | _read_counters.spill_read_block_data_size; |
429 | | RuntimeProfile::Counter*& _spill_read_file_size = _read_counters.spill_read_file_size; |
430 | | RuntimeProfile::Counter*& _spill_read_rows_count = _read_counters.spill_read_rows_count; |
431 | | RuntimeProfile::Counter*& _spill_read_file_count = _read_counters.spill_read_file_count; |
432 | | }; |
433 | | |
434 | | class DataSinkOperatorXBase; |
435 | | |
436 | | class PipelineXSinkLocalStateBase { |
437 | | public: |
438 | | PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent_, RuntimeState* state_); |
439 | 1.99M | virtual ~PipelineXSinkLocalStateBase() = default; |
440 | | |
441 | | // Do initialization. This step should be executed only once and in bthread, so we can do some |
442 | | // lightweight or non-idempotent operations (e.g. init profile, clone expr ctx from operatorX) |
443 | | virtual Status init(RuntimeState* state, LocalSinkStateInfo& info) = 0; |
444 | | |
445 | | virtual Status prepare(RuntimeState* state) = 0; |
446 | | // Do initialization. This step can be executed multiple times, so we should make sure it is |
447 | | // idempotent (e.g. wait for runtime filters). |
448 | | virtual Status open(RuntimeState* state) = 0; |
449 | | virtual Status terminate(RuntimeState* state) = 0; |
450 | | virtual Status close(RuntimeState* state, Status exec_status) = 0; |
451 | 27.9M | [[nodiscard]] virtual bool is_finished() const { return false; } |
452 | 14.8M | [[nodiscard]] virtual bool is_blockable() const { return false; } |
453 | | |
454 | | [[nodiscard]] virtual std::string debug_string(int indentation_level) const = 0; |
455 | | |
456 | | template <class TARGET> |
457 | 3.41M | TARGET& cast() { |
458 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) |
459 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() |
460 | 18.4E | << " and expect type is" << typeid(TARGET).name(); |
461 | 3.41M | return reinterpret_cast<TARGET&>(*this); |
462 | 3.41M | } _ZN5doris27PipelineXSinkLocalStateBase4castINS_22ExchangeSinkLocalStateEEERT_v Line | Count | Source | 457 | 800k | TARGET& cast() { | 458 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 461 | 800k | return reinterpret_cast<TARGET&>(*this); | 462 | 800k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_19UnionSinkLocalStateEEERT_v Line | Count | Source | 457 | 12.3k | TARGET& cast() { | 458 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 461 | 12.3k | return reinterpret_cast<TARGET&>(*this); | 462 | 12.3k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_25OlapTableSinkV2LocalStateEEERT_v Line | Count | Source | 457 | 6.45k | TARGET& cast() { | 458 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 461 | 6.45k | return reinterpret_cast<TARGET&>(*this); | 462 | 6.45k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_23OlapTableSinkLocalStateEEERT_v Line | Count | Source | 457 | 65.5k | TARGET& cast() { | 458 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 461 | 65.5k | return reinterpret_cast<TARGET&>(*this); | 462 | 65.5k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_23HiveTableSinkLocalStateEEERT_v Line | Count | Source | 457 | 7.49k | TARGET& cast() { | 458 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 461 | 7.49k | return reinterpret_cast<TARGET&>(*this); | 462 | 7.49k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_26IcebergTableSinkLocalStateEEERT_v Line | Count | Source | 457 | 5.34k | TARGET& cast() { | 458 | 5.34k | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 5.34k | return reinterpret_cast<TARGET&>(*this); | 462 | 5.34k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_27IcebergDeleteSinkLocalStateEEERT_v Line | Count | Source | 457 | 180 | TARGET& cast() { | 458 | 180 | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 180 | return reinterpret_cast<TARGET&>(*this); | 462 | 180 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_26IcebergMergeSinkLocalStateEEERT_v Line | Count | Source | 457 | 800 | TARGET& cast() { | 458 | 800 | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 800 | return reinterpret_cast<TARGET&>(*this); | 462 | 800 | } |
Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_21MCTableSinkLocalStateEEERT_v _ZN5doris27PipelineXSinkLocalStateBase4castINS_22TVFTableSinkLocalStateEEERT_v Line | Count | Source | 457 | 306 | TARGET& cast() { | 458 | 306 | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 306 | return reinterpret_cast<TARGET&>(*this); | 462 | 306 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_27LocalExchangeSinkLocalStateEEERT_v Line | Count | Source | 457 | 378k | TARGET& cast() { | 458 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 461 | 378k | return reinterpret_cast<TARGET&>(*this); | 462 | 378k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_17AggSinkLocalStateEEERT_v Line | Count | Source | 457 | 533k | TARGET& cast() { | 458 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 461 | 533k | return reinterpret_cast<TARGET&>(*this); | 462 | 533k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_27HashJoinBuildSinkLocalStateEEERT_v Line | Count | Source | 457 | 582k | TARGET& cast() { | 458 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 461 | 582k | return reinterpret_cast<TARGET&>(*this); | 462 | 582k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_26RecCTEAnchorSinkLocalStateEEERT_v Line | Count | Source | 457 | 467 | TARGET& cast() { | 458 | 467 | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 467 | return reinterpret_cast<TARGET&>(*this); | 462 | 467 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_20RecCTESinkLocalStateEEERT_v Line | Count | Source | 457 | 6.26k | TARGET& cast() { | 458 | 6.26k | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 6.26k | return reinterpret_cast<TARGET&>(*this); | 462 | 6.26k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_20ResultSinkLocalStateEEERT_v Line | Count | Source | 457 | 512k | TARGET& cast() { | 458 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 461 | 512k | return reinterpret_cast<TARGET&>(*this); | 462 | 512k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_23JdbcTableSinkLocalStateEEERT_v Line | Count | Source | 457 | 112 | TARGET& cast() { | 458 | 112 | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 112 | return reinterpret_cast<TARGET&>(*this); | 462 | 112 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_27MemoryScratchSinkLocalStateEEERT_v Line | Count | Source | 457 | 6 | TARGET& cast() { | 458 | 6 | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 6 | return reinterpret_cast<TARGET&>(*this); | 462 | 6 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_24ResultFileSinkLocalStateEEERT_v Line | Count | Source | 457 | 2.02k | TARGET& cast() { | 458 | 2.02k | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 2.02k | return reinterpret_cast<TARGET&>(*this); | 462 | 2.02k | } |
Unexecuted instantiation: _ZN5doris27PipelineXSinkLocalStateBase4castINS_31SpillIcebergTableSinkLocalStateEEERT_v _ZN5doris27PipelineXSinkLocalStateBase4castINS_22AnalyticSinkLocalStateEEERT_v Line | Count | Source | 457 | 29.5k | TARGET& cast() { | 458 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 461 | 29.5k | return reinterpret_cast<TARGET&>(*this); | 462 | 29.5k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_23BlackholeSinkLocalStateEEERT_v Line | Count | Source | 457 | 586 | TARGET& cast() { | 458 | 586 | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 586 | return reinterpret_cast<TARGET&>(*this); | 462 | 586 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_18SortSinkLocalStateEEERT_v Line | Count | Source | 457 | 405k | TARGET& cast() { | 458 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 461 | 405k | return reinterpret_cast<TARGET&>(*this); | 462 | 405k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_23SpillSortSinkLocalStateEEERT_v Line | Count | Source | 457 | 1.62k | TARGET& cast() { | 458 | 1.62k | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 1.62k | return reinterpret_cast<TARGET&>(*this); | 462 | 1.62k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_25BucketedAggSinkLocalStateEEERT_v Line | Count | Source | 457 | 2.95k | TARGET& cast() { | 458 | 2.95k | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 1 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 1 | << " and expect type is" << typeid(TARGET).name(); | 461 | 2.95k | return reinterpret_cast<TARGET&>(*this); | 462 | 2.95k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_28PartitionedAggSinkLocalStateEEERT_v Line | Count | Source | 457 | 124 | TARGET& cast() { | 458 | 124 | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 124 | return reinterpret_cast<TARGET&>(*this); | 462 | 124 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_33NestedLoopJoinBuildSinkLocalStateEEERT_v Line | Count | Source | 457 | 21.6k | TARGET& cast() { | 458 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 461 | 21.6k | return reinterpret_cast<TARGET&>(*this); | 462 | 21.6k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_33MultiCastDataStreamSinkLocalStateEEERT_v Line | Count | Source | 457 | 6.58k | TARGET& cast() { | 458 | 6.58k | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 6.58k | return reinterpret_cast<TARGET&>(*this); | 462 | 6.58k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_27PartitionSortSinkLocalStateEEERT_v Line | Count | Source | 457 | 1.17k | TARGET& cast() { | 458 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 461 | 1.17k | return reinterpret_cast<TARGET&>(*this); | 462 | 1.17k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_22SetProbeSinkLocalStateILb1EEEEERT_v Line | Count | Source | 457 | 11.0k | TARGET& cast() { | 458 | 11.0k | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 11.0k | return reinterpret_cast<TARGET&>(*this); | 462 | 11.0k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_22SetProbeSinkLocalStateILb0EEEEERT_v Line | Count | Source | 457 | 6.06k | TARGET& cast() { | 458 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 461 | 6.06k | return reinterpret_cast<TARGET&>(*this); | 462 | 6.06k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_17SetSinkLocalStateILb1EEEEERT_v Line | Count | Source | 457 | 5.92k | TARGET& cast() { | 458 | 5.92k | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 5.92k | return reinterpret_cast<TARGET&>(*this); | 462 | 5.92k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_17SetSinkLocalStateILb0EEEEERT_v Line | Count | Source | 457 | 6.04k | TARGET& cast() { | 458 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 461 | 6.04k | return reinterpret_cast<TARGET&>(*this); | 462 | 6.04k | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_33PartitionedHashJoinSinkLocalStateEEERT_v Line | Count | Source | 457 | 8 | TARGET& cast() { | 458 | 8 | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 8 | return reinterpret_cast<TARGET&>(*this); | 462 | 8 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_30GroupCommitBlockSinkLocalStateEEERT_v Line | Count | Source | 457 | 662 | TARGET& cast() { | 458 | 662 | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 662 | return reinterpret_cast<TARGET&>(*this); | 462 | 662 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_19CacheSinkLocalStateEEERT_v Line | Count | Source | 457 | 17 | TARGET& cast() { | 458 | 17 | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 17 | return reinterpret_cast<TARGET&>(*this); | 462 | 17 | } |
_ZN5doris27PipelineXSinkLocalStateBase4castINS_18DictSinkLocalStateEEERT_v Line | Count | Source | 457 | 275 | TARGET& cast() { | 458 | 275 | DCHECK(dynamic_cast<TARGET*>(this)) | 459 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 460 | 0 | << " and expect type is" << typeid(TARGET).name(); | 461 | 275 | return reinterpret_cast<TARGET&>(*this); | 462 | 275 | } |
|
463 | | template <class TARGET> |
464 | | const TARGET& cast() const { |
465 | | DCHECK(dynamic_cast<const TARGET*>(this)) |
466 | | << " Mismatch type! Current type is " << typeid(*this).name() |
467 | | << " and expect type is" << typeid(TARGET).name(); |
468 | | return reinterpret_cast<const TARGET&>(*this); |
469 | | } |
470 | | |
471 | 163k | DataSinkOperatorXBase* parent() { return _parent; } |
472 | 6.37M | RuntimeState* state() { return _state; } |
473 | 1.98M | RuntimeProfile* operator_profile() { return _operator_profile; } |
474 | 3.61M | RuntimeProfile* common_profile() { return _common_profile; } |
475 | 17.4M | RuntimeProfile* custom_profile() { return _custom_profile; } |
476 | | |
477 | 12.9k | [[nodiscard]] RuntimeProfile* faker_runtime_profile() const { |
478 | 12.9k | return _faker_runtime_profile.get(); |
479 | 12.9k | } |
480 | | |
481 | 2.75M | RuntimeProfile::Counter* rows_input_counter() { return _rows_input_counter; } |
482 | 8.07M | RuntimeProfile::Counter* exec_time_counter() { return _exec_timer; } |
483 | 3.80M | RuntimeProfile::Counter* memory_used_counter() { return _memory_used_counter; } |
484 | | |
485 | 0 | virtual std::vector<Dependency*> dependencies() const { return {nullptr}; } |
486 | | |
487 | | // override in exchange sink , AsyncWriterSink |
488 | 1.09M | virtual Dependency* finishdependency() { return nullptr; } |
489 | | |
490 | 813k | bool low_memory_mode() { return _state->low_memory_mode(); } |
491 | | |
492 | | protected: |
493 | | DataSinkOperatorXBase* _parent = nullptr; |
494 | | RuntimeState* _state = nullptr; |
495 | | RuntimeProfile* _operator_profile = nullptr; |
496 | | RuntimeProfile* _common_profile = nullptr; |
497 | | RuntimeProfile* _custom_profile = nullptr; |
498 | | // Set to true after close() has been called. subclasses should check and set this in |
499 | | // close(). |
500 | | bool _closed = false; |
501 | | bool _terminated = false; |
502 | | //NOTICE: now add a faker profile, because sometimes the profile record is useless |
503 | | //so we want remove some counters and timers, eg: in join node, if it's broadcast_join |
504 | | //and shared hash table, some counter/timer about build hash table is useless, |
505 | | //so we could add those counter/timer in faker profile, and those will not display in web profile. |
506 | | std::unique_ptr<RuntimeProfile> _faker_runtime_profile = |
507 | | std::make_unique<RuntimeProfile>(profile::FAKER_PROFILE); |
508 | | |
509 | | RuntimeProfile::Counter* _rows_input_counter = nullptr; |
510 | | RuntimeProfile::Counter* _init_timer = nullptr; |
511 | | RuntimeProfile::Counter* _open_timer = nullptr; |
512 | | RuntimeProfile::Counter* _close_timer = nullptr; |
513 | | RuntimeProfile::Counter* _wait_for_dependency_timer = nullptr; |
514 | | RuntimeProfile::Counter* _wait_for_finish_dependency_timer = nullptr; |
515 | | RuntimeProfile::Counter* _exec_timer = nullptr; |
516 | | RuntimeProfile::HighWaterMarkCounter* _memory_used_counter = nullptr; |
517 | | }; |
518 | | |
519 | | template <typename SharedStateArg = FakeSharedState> |
520 | | class PipelineXSinkLocalState : public PipelineXSinkLocalStateBase { |
521 | | public: |
522 | | using SharedStateType = SharedStateArg; |
523 | | PipelineXSinkLocalState(DataSinkOperatorXBase* parent, RuntimeState* state) |
524 | 1.98M | : PipelineXSinkLocalStateBase(parent, state) {}_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 145k | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 7 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 268k | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 29 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 8.42k | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 9.07k | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 134k | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 573 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 26 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 662k | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 7.76k | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 383 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 2.80k | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 12.0k | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 235k | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 493k | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 17 | : PipelineXSinkLocalStateBase(parent, state) {} |
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 524 | 302 | : PipelineXSinkLocalStateBase(parent, state) {} |
|
525 | | ~PipelineXSinkLocalState() override = default; |
526 | | |
527 | | Status init(RuntimeState* state, LocalSinkStateInfo& info) override; |
528 | | |
529 | 11.6M | Status prepare(RuntimeState* state) override { return Status::OK(); }_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 3.57M | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 41.8k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 3.58M | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 1.41M | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 44.5k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 48 | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 21.4k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 1.77k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE7prepareEPNS_12RuntimeStateE _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 5.78k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 1.54M | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 388k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 672 | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 47.1k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 948k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 4.18k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 30 | Status prepare(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE7prepareEPNS_12RuntimeStateE Line | Count | Source | 529 | 65.5k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
|
530 | 1.99M | Status open(RuntimeState* state) override { return Status::OK(); }_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 665k | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 7.77k | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 235k | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 9.06k | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 17 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 497k | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 2.81k | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 383 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 2 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 301 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 269k | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 145k | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 29 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 8.43k | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 134k | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 570 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 26 | Status open(RuntimeState* state) override { return Status::OK(); } |
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 530 | 12.1k | Status open(RuntimeState* state) override { return Status::OK(); } |
|
531 | | |
532 | | Status terminate(RuntimeState* state) override; |
533 | | Status close(RuntimeState* state, Status exec_status) override; |
534 | | |
535 | | [[nodiscard]] std::string debug_string(int indentation_level) const override; |
536 | | |
537 | | virtual std::string name_suffix(); |
538 | | |
539 | 1.17M | std::vector<Dependency*> dependencies() const override { |
540 | 18.4E | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; |
541 | 1.17M | } _ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12dependenciesEv Line | Count | Source | 539 | 92 | std::vector<Dependency*> dependencies() const override { | 540 | 92 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 92 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12dependenciesEv Line | Count | Source | 539 | 7.76k | std::vector<Dependency*> dependencies() const override { | 540 | 18.4E | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 7.76k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12dependenciesEv Line | Count | Source | 539 | 235k | std::vector<Dependency*> dependencies() const override { | 540 | 18.4E | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 235k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12dependenciesEv Line | Count | Source | 539 | 9.05k | std::vector<Dependency*> dependencies() const override { | 540 | 9.05k | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 9.05k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12dependenciesEv Line | Count | Source | 539 | 14 | std::vector<Dependency*> dependencies() const override { | 540 | 14 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 14 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12dependenciesEv Line | Count | Source | 539 | 426k | std::vector<Dependency*> dependencies() const override { | 540 | 18.4E | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 426k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12dependenciesEv Line | Count | Source | 539 | 2.81k | std::vector<Dependency*> dependencies() const override { | 540 | 2.81k | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 2.81k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12dependenciesEv Line | Count | Source | 539 | 280 | std::vector<Dependency*> dependencies() const override { | 540 | 280 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 280 | } |
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12dependenciesEv _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12dependenciesEv Line | Count | Source | 539 | 300 | std::vector<Dependency*> dependencies() const override { | 540 | 18.4E | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 300 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12dependenciesEv Line | Count | Source | 539 | 266k | std::vector<Dependency*> dependencies() const override { | 540 | 18.4E | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 266k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12dependenciesEv Line | Count | Source | 539 | 73.1k | std::vector<Dependency*> dependencies() const override { | 540 | 18.4E | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 73.1k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12dependenciesEv Line | Count | Source | 539 | 12 | std::vector<Dependency*> dependencies() const override { | 540 | 12 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 12 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12dependenciesEv Line | Count | Source | 539 | 8.43k | std::vector<Dependency*> dependencies() const override { | 540 | 8.43k | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 8.43k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12dependenciesEv Line | Count | Source | 539 | 134k | std::vector<Dependency*> dependencies() const override { | 540 | 18.4E | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 134k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12dependenciesEv Line | Count | Source | 539 | 573 | std::vector<Dependency*> dependencies() const override { | 540 | 573 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 573 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12dependenciesEv Line | Count | Source | 539 | 6 | std::vector<Dependency*> dependencies() const override { | 540 | 6 | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 6 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12dependenciesEv Line | Count | Source | 539 | 12.0k | std::vector<Dependency*> dependencies() const override { | 540 | 18.4E | return _dependency ? std::vector<Dependency*> {_dependency} : std::vector<Dependency*> {}; | 541 | 12.0k | } |
|
542 | | |
543 | 1.96M | virtual bool must_set_shared_state() const { |
544 | 1.96M | return !std::is_same_v<SharedStateArg, FakeSharedState>; |
545 | 1.96M | } _ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 655k | virtual bool must_set_shared_state() const { | 544 | 655k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 655k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 7.74k | virtual bool must_set_shared_state() const { | 544 | 7.74k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 7.74k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 489k | virtual bool must_set_shared_state() const { | 544 | 489k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 489k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 233k | virtual bool must_set_shared_state() const { | 544 | 233k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 233k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 9.01k | virtual bool must_set_shared_state() const { | 544 | 9.01k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 9.01k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 17 | virtual bool must_set_shared_state() const { | 544 | 17 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 17 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 2.80k | virtual bool must_set_shared_state() const { | 544 | 2.80k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 2.80k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 382 | virtual bool must_set_shared_state() const { | 544 | 382 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 382 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 2 | virtual bool must_set_shared_state() const { | 544 | 2 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 2 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 301 | virtual bool must_set_shared_state() const { | 544 | 301 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 301 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 265k | virtual bool must_set_shared_state() const { | 544 | 265k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 265k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 144k | virtual bool must_set_shared_state() const { | 544 | 144k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 144k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 29 | virtual bool must_set_shared_state() const { | 544 | 29 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 29 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 8.40k | virtual bool must_set_shared_state() const { | 544 | 8.40k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 8.40k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 134k | virtual bool must_set_shared_state() const { | 544 | 134k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 134k | } |
_ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 568 | virtual bool must_set_shared_state() const { | 544 | 568 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 568 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 26 | virtual bool must_set_shared_state() const { | 544 | 26 | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 26 | } |
_ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE21must_set_shared_stateEv Line | Count | Source | 543 | 11.9k | virtual bool must_set_shared_state() const { | 544 | 11.9k | return !std::is_same_v<SharedStateArg, FakeSharedState>; | 545 | 11.9k | } |
|
546 | | |
547 | | protected: |
548 | | Dependency* _dependency = nullptr; |
549 | | SharedStateType* _shared_state = nullptr; |
550 | | }; |
551 | | |
552 | | class DataSinkOperatorXBase : public OperatorBase { |
553 | | public: |
554 | | DataSinkOperatorXBase(const int operator_id, const int node_id, const int dest_id) |
555 | 536k | : _operator_id(operator_id), _node_id(node_id), _dests_id({dest_id}) {} |
556 | | DataSinkOperatorXBase(const int operator_id, const TPlanNode& tnode, const int dest_id) |
557 | 189k | : OperatorBase(tnode.__isset.is_serial_operator && tnode.is_serial_operator), |
558 | 189k | _operator_id(operator_id), |
559 | 189k | _node_id(tnode.node_id), |
560 | 189k | _dests_id({dest_id}) {} |
561 | | |
562 | | DataSinkOperatorXBase(const int operator_id, const int node_id, std::vector<int>& dests) |
563 | 1.84k | : _operator_id(operator_id), _node_id(node_id), _dests_id(dests) {} |
564 | | |
565 | | #ifdef BE_TEST |
566 | | DataSinkOperatorXBase() : _operator_id(-1), _node_id(0), _dests_id({-1}) {}; |
567 | | #endif |
568 | | |
569 | 801k | ~DataSinkOperatorXBase() override = default; |
570 | | |
571 | | // For agg/sort/join sink. |
572 | | virtual Status init(const TPlanNode& tnode, RuntimeState* state); |
573 | | |
574 | 1.91M | virtual bool reset_to_rerun(RuntimeState* state, OperatorXBase* root) const { return false; } |
575 | | |
576 | | Status init(const TDataSink& tsink) override; |
577 | | [[nodiscard]] virtual Status init(RuntimeState* state, ExchangeType type, const int num_buckets, |
578 | | const bool use_global_hash_shuffle, |
579 | 0 | const std::map<int, int>& shuffle_idx_to_instance_idx) { |
580 | 0 | return Status::InternalError("init() is only implemented in local exchange!"); |
581 | 0 | } |
582 | | |
583 | 727k | Status prepare(RuntimeState* state) override { return Status::OK(); } |
584 | | Status terminate(RuntimeState* state) override; |
585 | 30.6M | [[nodiscard]] bool is_finished(RuntimeState* state) const { |
586 | 30.6M | auto result = state->get_sink_local_state_result(); |
587 | 30.6M | if (!result) { |
588 | 0 | return result.error(); |
589 | 0 | } |
590 | 30.6M | return result.value()->is_finished(); |
591 | 30.6M | } |
592 | | |
593 | | [[nodiscard]] virtual Status sink(RuntimeState* state, Block* block, bool eos) = 0; |
594 | | |
595 | | [[nodiscard]] virtual Status setup_local_state(RuntimeState* state, |
596 | | LocalSinkStateInfo& info) = 0; |
597 | | |
598 | | // Returns the memory this sink operator expects to allocate in the next |
599 | | // execution round (sink only — pipeline task sums all operators + sink). |
600 | 2.23M | [[nodiscard]] virtual size_t get_reserve_mem_size(RuntimeState* state, bool eos) { |
601 | 2.23M | return state->minimum_operator_memory_required_bytes(); |
602 | 2.23M | } |
603 | 7.01M | bool is_blockable(RuntimeState* state) const override { |
604 | 7.01M | return state->get_sink_local_state()->is_blockable(); |
605 | 7.01M | } |
606 | | |
607 | 0 | [[nodiscard]] bool is_spillable() const { return _spillable; } |
608 | | |
609 | | template <class TARGET> |
610 | 7.08M | TARGET& cast() { |
611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) |
612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() |
613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); |
614 | 7.08M | return reinterpret_cast<TARGET&>(*this); |
615 | 7.08M | } _ZN5doris21DataSinkOperatorXBase4castINS_23ResultFileSinkOperatorXEEERT_v Line | Count | Source | 610 | 3.34k | TARGET& cast() { | 611 | 3.34k | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 0 | << " and expect type is" << typeid(TARGET).name(); | 614 | 3.34k | return reinterpret_cast<TARGET&>(*this); | 615 | 3.34k | } |
_ZN5doris21DataSinkOperatorXBase4castINS_22JdbcTableSinkOperatorXEEERT_v Line | Count | Source | 610 | 412 | TARGET& cast() { | 611 | 412 | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 0 | << " and expect type is" << typeid(TARGET).name(); | 614 | 412 | return reinterpret_cast<TARGET&>(*this); | 615 | 412 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_22OlapTableSinkOperatorXEEERT_v Line | Count | Source | 610 | 380k | TARGET& cast() { | 611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 614 | 380k | return reinterpret_cast<TARGET&>(*this); | 615 | 380k | } |
_ZN5doris21DataSinkOperatorXBase4castINS_24OlapTableSinkV2OperatorXEEERT_v Line | Count | Source | 610 | 37.8k | TARGET& cast() { | 611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 614 | 37.8k | return reinterpret_cast<TARGET&>(*this); | 615 | 37.8k | } |
_ZN5doris21DataSinkOperatorXBase4castINS_22HiveTableSinkOperatorXEEERT_v Line | Count | Source | 610 | 140k | TARGET& cast() { | 611 | 140k | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 124 | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 124 | << " and expect type is" << typeid(TARGET).name(); | 614 | 140k | return reinterpret_cast<TARGET&>(*this); | 615 | 140k | } |
_ZN5doris21DataSinkOperatorXBase4castINS_25IcebergTableSinkOperatorXEEERT_v Line | Count | Source | 610 | 45.4k | TARGET& cast() { | 611 | 45.4k | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 32 | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 32 | << " and expect type is" << typeid(TARGET).name(); | 614 | 45.4k | return reinterpret_cast<TARGET&>(*this); | 615 | 45.4k | } |
Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_30SpillIcebergTableSinkOperatorXEEERT_v _ZN5doris21DataSinkOperatorXBase4castINS_26IcebergDeleteSinkOperatorXEEERT_v Line | Count | Source | 610 | 638 | TARGET& cast() { | 611 | 638 | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 0 | << " and expect type is" << typeid(TARGET).name(); | 614 | 638 | return reinterpret_cast<TARGET&>(*this); | 615 | 638 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_25IcebergMergeSinkOperatorXEEERT_v Line | Count | Source | 610 | 5.00k | TARGET& cast() { | 611 | 5.00k | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 2 | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 2 | << " and expect type is" << typeid(TARGET).name(); | 614 | 5.00k | return reinterpret_cast<TARGET&>(*this); | 615 | 5.00k | } |
Unexecuted instantiation: _ZN5doris21DataSinkOperatorXBase4castINS_20MCTableSinkOperatorXEEERT_v _ZN5doris21DataSinkOperatorXBase4castINS_21TVFTableSinkOperatorXEEERT_v Line | Count | Source | 610 | 786 | TARGET& cast() { | 611 | 786 | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 0 | << " and expect type is" << typeid(TARGET).name(); | 614 | 786 | return reinterpret_cast<TARGET&>(*this); | 615 | 786 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_26HashJoinBuildSinkOperatorXEEERT_v Line | Count | Source | 610 | 1.61M | TARGET& cast() { | 611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 614 | 1.61M | return reinterpret_cast<TARGET&>(*this); | 615 | 1.61M | } |
_ZN5doris21DataSinkOperatorXBase4castINS_32NestedLoopJoinBuildSinkOperatorXEEERT_v Line | Count | Source | 610 | 16.8k | TARGET& cast() { | 611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 614 | 16.8k | return reinterpret_cast<TARGET&>(*this); | 615 | 16.8k | } |
_ZN5doris21DataSinkOperatorXBase4castINS_32PartitionedHashJoinSinkOperatorXEEERT_v Line | Count | Source | 610 | 17 | TARGET& cast() { | 611 | 17 | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 0 | << " and expect type is" << typeid(TARGET).name(); | 614 | 17 | return reinterpret_cast<TARGET&>(*this); | 615 | 17 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_19ResultSinkOperatorXEEERT_v Line | Count | Source | 610 | 1.27M | TARGET& cast() { | 611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 614 | 1.27M | return reinterpret_cast<TARGET&>(*this); | 615 | 1.27M | } |
_ZN5doris21DataSinkOperatorXBase4castINS_26MemoryScratchSinkOperatorXEEERT_v Line | Count | Source | 610 | 3 | TARGET& cast() { | 611 | 3 | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 0 | << " and expect type is" << typeid(TARGET).name(); | 614 | 3 | return reinterpret_cast<TARGET&>(*this); | 615 | 3 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_21AnalyticSinkOperatorXEEERT_v Line | Count | Source | 610 | 25.9k | TARGET& cast() { | 611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 614 | 25.9k | return reinterpret_cast<TARGET&>(*this); | 615 | 25.9k | } |
_ZN5doris21DataSinkOperatorXBase4castINS_17SortSinkOperatorXEEERT_v Line | Count | Source | 610 | 268k | TARGET& cast() { | 611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 614 | 268k | return reinterpret_cast<TARGET&>(*this); | 615 | 268k | } |
_ZN5doris21DataSinkOperatorXBase4castINS_22SpillSortSinkOperatorXEEERT_v Line | Count | Source | 610 | 515 | TARGET& cast() { | 611 | 515 | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 0 | << " and expect type is" << typeid(TARGET).name(); | 614 | 515 | return reinterpret_cast<TARGET&>(*this); | 615 | 515 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_26LocalExchangeSinkOperatorXEEERT_v Line | Count | Source | 610 | 562k | TARGET& cast() { | 611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 614 | 562k | return reinterpret_cast<TARGET&>(*this); | 615 | 562k | } |
_ZN5doris21DataSinkOperatorXBase4castINS_16AggSinkOperatorXEEERT_v Line | Count | Source | 610 | 559k | TARGET& cast() { | 611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 614 | 559k | return reinterpret_cast<TARGET&>(*this); | 615 | 559k | } |
_ZN5doris21DataSinkOperatorXBase4castINS_24BucketedAggSinkOperatorXEEERT_v Line | Count | Source | 610 | 2.61k | TARGET& cast() { | 611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 614 | 2.61k | return reinterpret_cast<TARGET&>(*this); | 615 | 2.61k | } |
_ZN5doris21DataSinkOperatorXBase4castINS_27PartitionedAggSinkOperatorXEEERT_v Line | Count | Source | 610 | 185 | TARGET& cast() { | 611 | 185 | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 0 | << " and expect type is" << typeid(TARGET).name(); | 614 | 185 | return reinterpret_cast<TARGET&>(*this); | 615 | 185 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_21ExchangeSinkOperatorXEEERT_v Line | Count | Source | 610 | 2.10M | TARGET& cast() { | 611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 614 | 2.10M | return reinterpret_cast<TARGET&>(*this); | 615 | 2.10M | } |
_ZN5doris21DataSinkOperatorXBase4castINS_18UnionSinkOperatorXEEERT_v Line | Count | Source | 610 | 15.4k | TARGET& cast() { | 611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 614 | 15.4k | return reinterpret_cast<TARGET&>(*this); | 615 | 15.4k | } |
_ZN5doris21DataSinkOperatorXBase4castINS_26PartitionSortSinkOperatorXEEERT_v Line | Count | Source | 610 | 382 | TARGET& cast() { | 611 | 382 | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 0 | << " and expect type is" << typeid(TARGET).name(); | 614 | 382 | return reinterpret_cast<TARGET&>(*this); | 615 | 382 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_21SetProbeSinkOperatorXILb1EEEEERT_v Line | Count | Source | 610 | 4.60k | TARGET& cast() { | 611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 614 | 4.60k | return reinterpret_cast<TARGET&>(*this); | 615 | 4.60k | } |
_ZN5doris21DataSinkOperatorXBase4castINS_21SetProbeSinkOperatorXILb0EEEEERT_v Line | Count | Source | 610 | 2.49k | TARGET& cast() { | 611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 614 | 2.49k | return reinterpret_cast<TARGET&>(*this); | 615 | 2.49k | } |
_ZN5doris21DataSinkOperatorXBase4castINS_16SetSinkOperatorXILb1EEEEERT_v Line | Count | Source | 610 | 4.87k | TARGET& cast() { | 611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 614 | 4.87k | return reinterpret_cast<TARGET&>(*this); | 615 | 4.87k | } |
_ZN5doris21DataSinkOperatorXBase4castINS_16SetSinkOperatorXILb0EEEEERT_v Line | Count | Source | 610 | 4.91k | TARGET& cast() { | 611 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 614 | 4.91k | return reinterpret_cast<TARGET&>(*this); | 615 | 4.91k | } |
_ZN5doris21DataSinkOperatorXBase4castINS_29GroupCommitBlockSinkOperatorXEEERT_v Line | Count | Source | 610 | 1.17k | TARGET& cast() { | 611 | 1.17k | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 0 | << " and expect type is" << typeid(TARGET).name(); | 614 | 1.17k | return reinterpret_cast<TARGET&>(*this); | 615 | 1.17k | } |
_ZN5doris21DataSinkOperatorXBase4castINS_17DictSinkOperatorXEEERT_v Line | Count | Source | 610 | 210 | TARGET& cast() { | 611 | 210 | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 0 | << " and expect type is" << typeid(TARGET).name(); | 614 | 210 | return reinterpret_cast<TARGET&>(*this); | 615 | 210 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_19RecCTESinkOperatorXEEERT_v Line | Count | Source | 610 | 151 | TARGET& cast() { | 611 | 151 | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 0 | << " and expect type is" << typeid(TARGET).name(); | 614 | 151 | return reinterpret_cast<TARGET&>(*this); | 615 | 151 | } |
_ZN5doris21DataSinkOperatorXBase4castINS_25RecCTEAnchorSinkOperatorXEEERT_v Line | Count | Source | 610 | 151 | TARGET& cast() { | 611 | 151 | DCHECK(dynamic_cast<TARGET*>(this)) | 612 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 613 | 0 | << " and expect type is" << typeid(TARGET).name(); | 614 | 151 | return reinterpret_cast<TARGET&>(*this); | 615 | 151 | } |
|
616 | | template <class TARGET> |
617 | | const TARGET& cast() const { |
618 | | DCHECK(dynamic_cast<const TARGET*>(this)) |
619 | | << " Mismatch type! Current type is " << typeid(*this).name() |
620 | | << " and expect type is" << typeid(TARGET).name(); |
621 | | return reinterpret_cast<const TARGET&>(*this); |
622 | | } |
623 | | |
624 | | [[nodiscard]] virtual std::shared_ptr<BasicSharedState> create_shared_state() const = 0; |
625 | | |
626 | 0 | Status close(RuntimeState* state) override { |
627 | 0 | return Status::InternalError("Should not reach here!"); |
628 | 0 | } |
629 | | |
630 | | [[nodiscard]] virtual std::string debug_string(int indentation_level) const; |
631 | | |
632 | | [[nodiscard]] virtual std::string debug_string(RuntimeState* state, |
633 | | int indentation_level) const; |
634 | | |
635 | 799k | [[nodiscard]] bool is_sink() const override { return true; } |
636 | | |
637 | 1.98M | static Status close(RuntimeState* state, Status exec_status) { |
638 | 1.98M | auto result = state->get_sink_local_state_result(); |
639 | 1.98M | if (!result) { |
640 | 0 | return result.error(); |
641 | 0 | } |
642 | 1.98M | return result.value()->close(state, exec_status); |
643 | 1.98M | } |
644 | | |
645 | 4.97M | [[nodiscard]] int operator_id() const { return _operator_id; } |
646 | | |
647 | 8.48M | [[nodiscard]] const std::vector<int>& dests_id() const { return _dests_id; } |
648 | | |
649 | 2.55M | [[nodiscard]] int nereids_id() const { return _nereids_id; } |
650 | | |
651 | 7.25M | [[nodiscard]] int node_id() const override { return _node_id; } |
652 | | |
653 | 4.58M | [[nodiscard]] std::string get_name() const override { return _name; } |
654 | | |
655 | 1.84M | virtual bool should_dry_run(RuntimeState* state) { return false; } |
656 | | |
657 | 326k | [[nodiscard]] virtual bool count_down_destination() { return true; } |
658 | | |
659 | | protected: |
660 | | template <typename Writer, typename Parent> |
661 | | requires(std::is_base_of_v<AsyncResultWriter, Writer>) |
662 | | friend class AsyncWriterSink; |
663 | | // _operator_id : the current Operator's ID, which is not visible to the user. |
664 | | // _node_id : the plan node ID corresponding to the Operator, which is visible on the profile. |
665 | | // _dests_id : the target _operator_id of the sink, for example, in the case of a multi-sink, there are multiple targets. |
666 | | const int _operator_id; |
667 | | const int _node_id; |
668 | | int _nereids_id = -1; |
669 | | bool _spillable = false; |
670 | | std::vector<int> _dests_id; |
671 | | std::string _name; |
672 | | }; |
673 | | |
674 | | template <typename LocalStateType> |
675 | | class DataSinkOperatorX : public DataSinkOperatorXBase { |
676 | | public: |
677 | | DataSinkOperatorX(const int id, const int node_id, const int dest_id) |
678 | 536k | : DataSinkOperatorXBase(id, node_id, dest_id) {}_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 103k | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEEC2Eiii Line | Count | Source | 678 | 2.04k | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 29.1k | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 165 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 1.46k | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 1.73k | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 20 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 80 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEEC2Eiii _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 156 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEEC2Eiii Line | Count | Source | 678 | 126 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEEC2Eiii Line | Count | Source | 678 | 204 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEEC2Eiii Line | Count | Source | 678 | 129 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEEC2Eiii Line | Count | Source | 678 | 144 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 151 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEEC2Eiii Line | Count | Source | 678 | 151 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEEC2Eiii _ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 249k | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 88 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 3 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 502 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEEC2Eiii Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEEC2Eiii _ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 13 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEEC2Eiii _ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 28 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 27 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEEC2Eiii _ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 35 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 145k | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEEC2Eiii _ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 1.41k | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEEC2Eiii _ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 62 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEEC2Eiii _ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 10 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEEC2Eiii Line | Count | Source | 678 | 105 | : DataSinkOperatorXBase(id, node_id, dest_id) {} |
|
679 | | DataSinkOperatorX(const int id, const TPlanNode& tnode, const int dest_id) |
680 | 189k | : DataSinkOperatorXBase(id, tnode, dest_id) {}_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Line | Count | Source | 680 | 79.7k | : 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_27IcebergDeleteSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEEC2EiRKNS_9TPlanNodeEi _ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Line | Count | Source | 680 | 1.64k | : DataSinkOperatorXBase(id, tnode, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEEC2EiRKNS_9TPlanNodeEi _ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Line | Count | Source | 680 | 43.8k | : DataSinkOperatorXBase(id, tnode, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEEC2EiRKNS_9TPlanNodeEi _ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Line | Count | Source | 680 | 59.5k | : DataSinkOperatorXBase(id, tnode, dest_id) {} |
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Line | Count | Source | 680 | 95 | : DataSinkOperatorXBase(id, tnode, dest_id) {} |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEEC2EiRKNS_9TPlanNodeEi _ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Line | Count | Source | 680 | 4.39k | : DataSinkOperatorXBase(id, tnode, dest_id) {} |
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 _ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEEC2EiRKNS_9TPlanNodeEi Line | Count | Source | 680 | 50 | : DataSinkOperatorXBase(id, tnode, dest_id) {} |
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 |
681 | | |
682 | | DataSinkOperatorX(const int id, const int node_id, std::vector<int> dest_ids) |
683 | 1.84k | : DataSinkOperatorXBase(id, node_id, dest_ids) {}_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Line | Count | Source | 683 | 1.84k | : DataSinkOperatorXBase(id, node_id, dest_ids) {} |
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_27IcebergDeleteSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEEC2EiiSt6vectorIiSaIiEE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEEC2EiiSt6vectorIiSaIiEE 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 |
684 | | #ifdef BE_TEST |
685 | | DataSinkOperatorX() = default; |
686 | | #endif |
687 | | ~DataSinkOperatorX() override = default; |
688 | | |
689 | | Status setup_local_state(RuntimeState* state, LocalSinkStateInfo& info) override; |
690 | | std::shared_ptr<BasicSharedState> create_shared_state() const override; |
691 | | |
692 | | using LocalState = LocalStateType; |
693 | 3.38M | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { |
694 | 3.38M | return state->get_sink_local_state()->template cast<LocalState>(); |
695 | 3.38M | } _ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 802k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 802k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 802k | } |
_ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 12.3k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 12.3k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 12.3k | } |
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 6.46k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 6.46k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 6.46k | } |
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 65.6k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 65.6k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 65.6k | } |
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 7.49k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 7.49k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 7.49k | } |
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 5.34k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 5.34k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 5.34k | } |
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 180 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 180 | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 180 | } |
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 800 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 800 | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 800 | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 306 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 306 | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 306 | } |
_ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 379k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 379k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 379k | } |
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 533k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 533k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 533k | } |
_ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 467 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 467 | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 467 | } |
_ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 6.26k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 6.26k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 6.26k | } |
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 551k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 551k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 551k | } |
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 513k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 513k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 513k | } |
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 112 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 112 | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 112 | } |
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 6 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 6 | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 6 | } |
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 2.02k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 2.02k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 2.02k | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE _ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 29.5k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 29.5k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 29.5k | } |
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 586 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 586 | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 586 | } |
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 405k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 405k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 405k | } |
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 1.61k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 1.61k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 1.61k | } |
_ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 2.96k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 2.96k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 2.96k | } |
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 124 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 124 | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 124 | } |
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 21.6k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 21.6k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 21.6k | } |
_ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 6.58k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 6.58k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 6.58k | } |
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 1.17k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 1.17k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 1.17k | } |
_ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 11.0k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 11.0k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 11.0k | } |
_ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 6.06k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 6.06k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 6.06k | } |
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 5.92k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 5.92k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 5.92k | } |
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 6.04k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 6.04k | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 6.04k | } |
_ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 8 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 8 | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 8 | } |
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 662 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 662 | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 662 | } |
_ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 17 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 17 | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 17 | } |
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 693 | 275 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 694 | 275 | return state->get_sink_local_state()->template cast<LocalState>(); | 695 | 275 | } |
|
696 | | }; |
697 | | |
698 | | template <typename SharedStateArg> |
699 | | class PipelineXSpillSinkLocalState : public PipelineXSinkLocalState<SharedStateArg> { |
700 | | public: |
701 | | using Base = PipelineXSinkLocalState<SharedStateArg>; |
702 | | PipelineXSpillSinkLocalState(DataSinkOperatorXBase* parent, RuntimeState* state) |
703 | 2.87k | : Base(parent, state) {}_ZN5doris28PipelineXSpillSinkLocalStateINS_20MultiCastSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 703 | 2.81k | : Base(parent, state) {} |
_ZN5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 703 | 7 | : Base(parent, state) {} |
_ZN5doris28PipelineXSpillSinkLocalStateINS_20SpillSortSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 703 | 29 | : Base(parent, state) {} |
_ZN5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 703 | 26 | : Base(parent, state) {} |
|
704 | 2.87k | ~PipelineXSpillSinkLocalState() override = default; _ZN5doris28PipelineXSpillSinkLocalStateINS_20MultiCastSharedStateEED2Ev Line | Count | Source | 704 | 2.81k | ~PipelineXSpillSinkLocalState() override = default; |
_ZN5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEED2Ev Line | Count | Source | 704 | 7 | ~PipelineXSpillSinkLocalState() override = default; |
_ZN5doris28PipelineXSpillSinkLocalStateINS_20SpillSortSharedStateEED2Ev Line | Count | Source | 704 | 29 | ~PipelineXSpillSinkLocalState() override = default; |
_ZN5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEED2Ev Line | Count | Source | 704 | 26 | ~PipelineXSpillSinkLocalState() override = default; |
|
705 | | |
706 | 2.85k | Status init(RuntimeState* state, LocalSinkStateInfo& info) override { |
707 | 2.85k | RETURN_IF_ERROR(Base::init(state, info)); |
708 | 2.85k | init_spill_counters(); |
709 | 2.85k | return Status::OK(); |
710 | 2.85k | } _ZN5doris28PipelineXSpillSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 706 | 2.80k | Status init(RuntimeState* state, LocalSinkStateInfo& info) override { | 707 | 2.80k | RETURN_IF_ERROR(Base::init(state, info)); | 708 | 2.80k | init_spill_counters(); | 709 | 2.80k | return Status::OK(); | 710 | 2.80k | } |
_ZN5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 706 | 2 | Status init(RuntimeState* state, LocalSinkStateInfo& info) override { | 707 | 2 | RETURN_IF_ERROR(Base::init(state, info)); | 708 | 2 | init_spill_counters(); | 709 | 2 | return Status::OK(); | 710 | 2 | } |
_ZN5doris28PipelineXSpillSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 706 | 29 | Status init(RuntimeState* state, LocalSinkStateInfo& info) override { | 707 | 29 | RETURN_IF_ERROR(Base::init(state, info)); | 708 | 29 | init_spill_counters(); | 709 | 29 | return Status::OK(); | 710 | 29 | } |
_ZN5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 706 | 26 | Status init(RuntimeState* state, LocalSinkStateInfo& info) override { | 707 | 26 | RETURN_IF_ERROR(Base::init(state, info)); | 708 | 26 | init_spill_counters(); | 709 | 26 | return Status::OK(); | 710 | 26 | } |
|
711 | | |
712 | 2.86k | void init_spill_counters() { |
713 | 2.86k | _spill_total_timer = |
714 | 2.86k | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), profile::SPILL_TOTAL_TIME, 1); |
715 | | |
716 | 2.86k | _write_counters.init(Base::custom_profile()); |
717 | | |
718 | | // SpillFileWriter looks up these counters via get_counter() in its |
719 | | // constructor. They must be registered on the CustomCounters profile |
720 | | // before any SpillFileWriter is created, otherwise the lookups return |
721 | | // nullptr and COUNTER_UPDATE will SEGV. |
722 | 2.86k | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( |
723 | 2.86k | Base::custom_profile(), profile::SPILL_WRITE_FILE_BYTES, TUnit::BYTES, 1); |
724 | 2.86k | _spill_file_total_count = ADD_COUNTER_WITH_LEVEL( |
725 | 2.86k | Base::custom_profile(), profile::SPILL_WRITE_FILE_TOTAL_COUNT, TUnit::UNIT, 1); |
726 | | |
727 | 2.86k | _spill_max_rows_of_partition = ADD_COUNTER_WITH_LEVEL( |
728 | 2.86k | Base::custom_profile(), profile::SPILL_MAX_ROWS_OF_PARTITION, TUnit::UNIT, 1); |
729 | 2.86k | _spill_min_rows_of_partition = ADD_COUNTER_WITH_LEVEL( |
730 | 2.86k | Base::custom_profile(), profile::SPILL_MIN_ROWS_OF_PARTITION, TUnit::UNIT, 1); |
731 | 2.86k | } _ZN5doris28PipelineXSpillSinkLocalStateINS_20MultiCastSharedStateEE19init_spill_countersEv Line | Count | Source | 712 | 2.80k | void init_spill_counters() { | 713 | 2.80k | _spill_total_timer = | 714 | 2.80k | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), profile::SPILL_TOTAL_TIME, 1); | 715 | | | 716 | 2.80k | _write_counters.init(Base::custom_profile()); | 717 | | | 718 | | // SpillFileWriter looks up these counters via get_counter() in its | 719 | | // constructor. They must be registered on the CustomCounters profile | 720 | | // before any SpillFileWriter is created, otherwise the lookups return | 721 | | // nullptr and COUNTER_UPDATE will SEGV. | 722 | 2.80k | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( | 723 | 2.80k | Base::custom_profile(), profile::SPILL_WRITE_FILE_BYTES, TUnit::BYTES, 1); | 724 | 2.80k | _spill_file_total_count = ADD_COUNTER_WITH_LEVEL( | 725 | 2.80k | Base::custom_profile(), profile::SPILL_WRITE_FILE_TOTAL_COUNT, TUnit::UNIT, 1); | 726 | | | 727 | 2.80k | _spill_max_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 728 | 2.80k | Base::custom_profile(), profile::SPILL_MAX_ROWS_OF_PARTITION, TUnit::UNIT, 1); | 729 | 2.80k | _spill_min_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 730 | 2.80k | Base::custom_profile(), profile::SPILL_MIN_ROWS_OF_PARTITION, TUnit::UNIT, 1); | 731 | 2.80k | } |
_ZN5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEE19init_spill_countersEv Line | Count | Source | 712 | 7 | void init_spill_counters() { | 713 | 7 | _spill_total_timer = | 714 | 7 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), profile::SPILL_TOTAL_TIME, 1); | 715 | | | 716 | 7 | _write_counters.init(Base::custom_profile()); | 717 | | | 718 | | // SpillFileWriter looks up these counters via get_counter() in its | 719 | | // constructor. They must be registered on the CustomCounters profile | 720 | | // before any SpillFileWriter is created, otherwise the lookups return | 721 | | // nullptr and COUNTER_UPDATE will SEGV. | 722 | 7 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( | 723 | 7 | Base::custom_profile(), profile::SPILL_WRITE_FILE_BYTES, TUnit::BYTES, 1); | 724 | 7 | _spill_file_total_count = ADD_COUNTER_WITH_LEVEL( | 725 | 7 | Base::custom_profile(), profile::SPILL_WRITE_FILE_TOTAL_COUNT, TUnit::UNIT, 1); | 726 | | | 727 | 7 | _spill_max_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 728 | 7 | Base::custom_profile(), profile::SPILL_MAX_ROWS_OF_PARTITION, TUnit::UNIT, 1); | 729 | 7 | _spill_min_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 730 | 7 | Base::custom_profile(), profile::SPILL_MIN_ROWS_OF_PARTITION, TUnit::UNIT, 1); | 731 | 7 | } |
_ZN5doris28PipelineXSpillSinkLocalStateINS_20SpillSortSharedStateEE19init_spill_countersEv Line | Count | Source | 712 | 29 | void init_spill_counters() { | 713 | 29 | _spill_total_timer = | 714 | 29 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), profile::SPILL_TOTAL_TIME, 1); | 715 | | | 716 | 29 | _write_counters.init(Base::custom_profile()); | 717 | | | 718 | | // SpillFileWriter looks up these counters via get_counter() in its | 719 | | // constructor. They must be registered on the CustomCounters profile | 720 | | // before any SpillFileWriter is created, otherwise the lookups return | 721 | | // nullptr and COUNTER_UPDATE will SEGV. | 722 | 29 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( | 723 | 29 | Base::custom_profile(), profile::SPILL_WRITE_FILE_BYTES, TUnit::BYTES, 1); | 724 | 29 | _spill_file_total_count = ADD_COUNTER_WITH_LEVEL( | 725 | 29 | Base::custom_profile(), profile::SPILL_WRITE_FILE_TOTAL_COUNT, TUnit::UNIT, 1); | 726 | | | 727 | 29 | _spill_max_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 728 | 29 | Base::custom_profile(), profile::SPILL_MAX_ROWS_OF_PARTITION, TUnit::UNIT, 1); | 729 | 29 | _spill_min_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 730 | 29 | Base::custom_profile(), profile::SPILL_MIN_ROWS_OF_PARTITION, TUnit::UNIT, 1); | 731 | 29 | } |
_ZN5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEE19init_spill_countersEv Line | Count | Source | 712 | 26 | void init_spill_counters() { | 713 | 26 | _spill_total_timer = | 714 | 26 | ADD_TIMER_WITH_LEVEL(Base::custom_profile(), profile::SPILL_TOTAL_TIME, 1); | 715 | | | 716 | 26 | _write_counters.init(Base::custom_profile()); | 717 | | | 718 | | // SpillFileWriter looks up these counters via get_counter() in its | 719 | | // constructor. They must be registered on the CustomCounters profile | 720 | | // before any SpillFileWriter is created, otherwise the lookups return | 721 | | // nullptr and COUNTER_UPDATE will SEGV. | 722 | 26 | _spill_write_file_total_size = ADD_COUNTER_WITH_LEVEL( | 723 | 26 | Base::custom_profile(), profile::SPILL_WRITE_FILE_BYTES, TUnit::BYTES, 1); | 724 | 26 | _spill_file_total_count = ADD_COUNTER_WITH_LEVEL( | 725 | 26 | Base::custom_profile(), profile::SPILL_WRITE_FILE_TOTAL_COUNT, TUnit::UNIT, 1); | 726 | | | 727 | 26 | _spill_max_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 728 | 26 | Base::custom_profile(), profile::SPILL_MAX_ROWS_OF_PARTITION, TUnit::UNIT, 1); | 729 | 26 | _spill_min_rows_of_partition = ADD_COUNTER_WITH_LEVEL( | 730 | 26 | Base::custom_profile(), profile::SPILL_MIN_ROWS_OF_PARTITION, TUnit::UNIT, 1); | 731 | 26 | } |
|
732 | | |
733 | 2.82k | std::vector<Dependency*> dependencies() const override { |
734 | 2.82k | auto dependencies = Base::dependencies(); |
735 | 2.82k | return dependencies; |
736 | 2.82k | } _ZNK5doris28PipelineXSpillSinkLocalStateINS_20MultiCastSharedStateEE12dependenciesEv Line | Count | Source | 733 | 2.81k | std::vector<Dependency*> dependencies() const override { | 734 | 2.81k | auto dependencies = Base::dependencies(); | 735 | 2.81k | return dependencies; | 736 | 2.81k | } |
Unexecuted instantiation: _ZNK5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12dependenciesEv _ZNK5doris28PipelineXSpillSinkLocalStateINS_20SpillSortSharedStateEE12dependenciesEv Line | Count | Source | 733 | 12 | std::vector<Dependency*> dependencies() const override { | 734 | 12 | auto dependencies = Base::dependencies(); | 735 | 12 | return dependencies; | 736 | 12 | } |
_ZNK5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEE12dependenciesEv Line | Count | Source | 733 | 6 | std::vector<Dependency*> dependencies() const override { | 734 | 6 | auto dependencies = Base::dependencies(); | 735 | 6 | return dependencies; | 736 | 6 | } |
|
737 | | |
738 | 59 | void update_max_min_rows_counter() { |
739 | 59 | int64_t max_rows = 0; |
740 | 59 | int64_t min_rows = std::numeric_limits<int64_t>::max(); |
741 | | |
742 | 424 | for (auto rows : _rows_in_partitions) { |
743 | 424 | if (rows > max_rows) { |
744 | 11 | max_rows = rows; |
745 | 11 | } |
746 | 424 | if (rows < min_rows) { |
747 | 61 | min_rows = rows; |
748 | 61 | } |
749 | 424 | } |
750 | | |
751 | 59 | COUNTER_SET(_spill_max_rows_of_partition, max_rows); |
752 | 59 | COUNTER_SET(_spill_min_rows_of_partition, min_rows); |
753 | 59 | } _ZN5doris28PipelineXSpillSinkLocalStateINS_30PartitionedHashJoinSharedStateEE27update_max_min_rows_counterEv Line | Count | Source | 738 | 4 | void update_max_min_rows_counter() { | 739 | 4 | int64_t max_rows = 0; | 740 | 4 | int64_t min_rows = std::numeric_limits<int64_t>::max(); | 741 | | | 742 | 32 | for (auto rows : _rows_in_partitions) { | 743 | 32 | if (rows > max_rows) { | 744 | 4 | max_rows = rows; | 745 | 4 | } | 746 | 32 | if (rows < min_rows) { | 747 | 6 | min_rows = rows; | 748 | 6 | } | 749 | 32 | } | 750 | | | 751 | 4 | COUNTER_SET(_spill_max_rows_of_partition, max_rows); | 752 | 4 | COUNTER_SET(_spill_min_rows_of_partition, min_rows); | 753 | 4 | } |
_ZN5doris28PipelineXSpillSinkLocalStateINS_25PartitionedAggSharedStateEE27update_max_min_rows_counterEv Line | Count | Source | 738 | 55 | void update_max_min_rows_counter() { | 739 | 55 | int64_t max_rows = 0; | 740 | 55 | int64_t min_rows = std::numeric_limits<int64_t>::max(); | 741 | | | 742 | 392 | for (auto rows : _rows_in_partitions) { | 743 | 392 | if (rows > max_rows) { | 744 | 7 | max_rows = rows; | 745 | 7 | } | 746 | 392 | if (rows < min_rows) { | 747 | 55 | min_rows = rows; | 748 | 55 | } | 749 | 392 | } | 750 | | | 751 | 55 | COUNTER_SET(_spill_max_rows_of_partition, max_rows); | 752 | 55 | COUNTER_SET(_spill_min_rows_of_partition, min_rows); | 753 | 55 | } |
|
754 | | |
755 | | std::vector<int64_t> _rows_in_partitions; |
756 | | |
757 | | // Total time of spill, including spill task scheduling time, |
758 | | // serialize block time, write disk file time, |
759 | | // and read disk file time, deserialize block time etc. |
760 | | RuntimeProfile::Counter* _spill_total_timer = nullptr; |
761 | | |
762 | | // Shared spill write counters |
763 | | SpillWriteCounters _write_counters; |
764 | | // Backward-compatible aliases for commonly accessed write counters |
765 | | RuntimeProfile::Counter*& _spill_write_file_timer = _write_counters.spill_write_file_timer; |
766 | | RuntimeProfile::Counter*& _spill_write_serialize_block_timer = |
767 | | _write_counters.spill_write_serialize_block_timer; |
768 | | RuntimeProfile::Counter*& _spill_write_block_count = _write_counters.spill_write_block_count; |
769 | | RuntimeProfile::Counter*& _spill_write_block_data_size = |
770 | | _write_counters.spill_write_block_data_size; |
771 | | RuntimeProfile::Counter*& _spill_write_rows_count = _write_counters.spill_write_rows_count; |
772 | | |
773 | | // Sink-only counters |
774 | | // Spilled file total size |
775 | | RuntimeProfile::Counter* _spill_file_total_size = nullptr; |
776 | | // Total bytes written to spill files (required by SpillFileWriter) |
777 | | RuntimeProfile::Counter* _spill_write_file_total_size = nullptr; |
778 | | // Total number of spill files created (required by SpillFileWriter) |
779 | | RuntimeProfile::Counter* _spill_file_total_count = nullptr; |
780 | | RuntimeProfile::Counter* _spill_max_rows_of_partition = nullptr; |
781 | | RuntimeProfile::Counter* _spill_min_rows_of_partition = nullptr; |
782 | | }; |
783 | | |
784 | | class OperatorXBase : public OperatorBase { |
785 | | public: |
786 | | OperatorXBase(ObjectPool* pool, const TPlanNode& tnode, const int operator_id, |
787 | | const DescriptorTbl& descs) |
788 | 729k | : OperatorBase(tnode.__isset.is_serial_operator && tnode.is_serial_operator), |
789 | 729k | _operator_id(operator_id), |
790 | 729k | _node_id(tnode.node_id), |
791 | 729k | _type(tnode.node_type), |
792 | 729k | _pool(pool), |
793 | 729k | _tuple_ids(tnode.row_tuples), |
794 | 729k | _row_descriptor(descs, tnode.row_tuples), |
795 | 729k | _resource_profile(tnode.resource_profile), |
796 | 729k | _limit(tnode.limit) { |
797 | 729k | if (tnode.__isset.output_tuple_id) { |
798 | 345k | _output_row_descriptor = |
799 | 345k | std::make_unique<RowDescriptor>(descs, std::vector {tnode.output_tuple_id}); |
800 | 345k | } |
801 | 729k | if (!tnode.intermediate_output_tuple_id_list.empty()) { |
802 | | // common subexpression elimination |
803 | 3.02k | _intermediate_output_row_descriptor.reserve( |
804 | 3.02k | tnode.intermediate_output_tuple_id_list.size()); |
805 | 4.09k | for (auto output_tuple_id : tnode.intermediate_output_tuple_id_list) { |
806 | 4.09k | _intermediate_output_row_descriptor.push_back( |
807 | 4.09k | RowDescriptor(descs, std::vector {output_tuple_id})); |
808 | 4.09k | } |
809 | 3.02k | } |
810 | 729k | } |
811 | | |
812 | | OperatorXBase(ObjectPool* pool, int node_id, int operator_id) |
813 | 108k | : OperatorBase(), |
814 | 108k | _operator_id(operator_id), |
815 | 108k | _node_id(node_id), |
816 | 108k | _pool(pool), |
817 | 108k | _limit(-1) {} |
818 | | |
819 | | #ifdef BE_TEST |
820 | | OperatorXBase() : _operator_id(-1), _node_id(0), _limit(-1) {}; |
821 | | #endif |
822 | | virtual Status init(const TPlanNode& tnode, RuntimeState* state); |
823 | 0 | Status init(const TDataSink& tsink) override { |
824 | 0 | throw Exception(Status::FatalError("should not reach here!")); |
825 | 0 | } |
826 | 0 | virtual Status init(ExchangeType type) { |
827 | 0 | throw Exception(Status::FatalError("should not reach here!")); |
828 | 0 | } |
829 | 0 | [[noreturn]] virtual const std::vector<TRuntimeFilterDesc>& runtime_filter_descs() { |
830 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, _op_name); |
831 | 0 | } |
832 | 4.51M | [[nodiscard]] std::string get_name() const override { return _op_name; } |
833 | 6.97M | [[nodiscard]] virtual bool need_more_input_data(RuntimeState* state) const { return true; } |
834 | 8.95M | bool is_blockable(RuntimeState* state) const override { |
835 | 8.95M | return state->get_sink_local_state()->is_blockable() || _blockable; |
836 | 8.95M | } |
837 | | |
838 | | Status prepare(RuntimeState* state) override; |
839 | | |
840 | | Status terminate(RuntimeState* state) override; |
841 | | [[nodiscard]] virtual Status get_block(RuntimeState* state, Block* block, bool* eos) = 0; |
842 | | |
843 | | Status close(RuntimeState* state) override; |
844 | | |
845 | 1.74M | [[nodiscard]] virtual const RowDescriptor& intermediate_row_desc() const { |
846 | 1.74M | return _row_descriptor; |
847 | 1.74M | } |
848 | | |
849 | 4.10k | [[nodiscard]] const RowDescriptor& intermediate_row_desc(int idx) { |
850 | 4.10k | if (idx == 0) { |
851 | 3.02k | return intermediate_row_desc(); |
852 | 3.02k | } |
853 | 4.10k | DCHECK((idx - 1) < _intermediate_output_row_descriptor.size()); |
854 | 1.08k | return _intermediate_output_row_descriptor[idx - 1]; |
855 | 4.10k | } |
856 | | |
857 | 712k | [[nodiscard]] const RowDescriptor& projections_row_desc() const { |
858 | 712k | if (_intermediate_output_row_descriptor.empty()) { |
859 | 710k | return intermediate_row_desc(); |
860 | 710k | } else { |
861 | 2.67k | return _intermediate_output_row_descriptor.back(); |
862 | 2.67k | } |
863 | 712k | } |
864 | | |
865 | | // Returns the memory this single operator expects to allocate in the next |
866 | | // execution round. Each operator reports only its OWN requirement — the |
867 | | // pipeline task is responsible for summing all operators + sink. |
868 | | // After the value is consumed the caller should invoke |
869 | | // reset_reserve_mem_size() so the next round starts from zero. |
870 | | // If this method is not overridden by a subclass, its default value is the |
871 | | // minimum operator memory (typically 1 MB). |
872 | 0 | [[nodiscard]] virtual size_t get_reserve_mem_size(RuntimeState* state) { |
873 | 0 | return state->minimum_operator_memory_required_bytes(); |
874 | 0 | } |
875 | | |
876 | | virtual std::string debug_string(int indentation_level = 0) const; |
877 | | |
878 | | virtual std::string debug_string(RuntimeState* state, int indentation_level = 0) const; |
879 | | |
880 | | virtual Status setup_local_state(RuntimeState* state, LocalStateInfo& info) = 0; |
881 | | |
882 | | template <class TARGET> |
883 | 90.0M | TARGET& cast() { |
884 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) |
885 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() |
886 | 18.4E | << " and expect type is" << typeid(TARGET).name(); |
887 | 90.0M | return reinterpret_cast<TARGET&>(*this); |
888 | 90.0M | } _ZN5doris13OperatorXBase4castINS_17OlapScanOperatorXEEERT_v Line | Count | Source | 883 | 16.3M | TARGET& cast() { | 884 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 887 | 16.3M | return reinterpret_cast<TARGET&>(*this); | 888 | 16.3M | } |
Unexecuted instantiation: _ZN5doris13OperatorXBase4castINS_17JDBCScanOperatorXEEERT_v _ZN5doris13OperatorXBase4castINS_17FileScanOperatorXEEERT_v Line | Count | Source | 883 | 821k | TARGET& cast() { | 884 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 887 | 821k | return reinterpret_cast<TARGET&>(*this); | 888 | 821k | } |
_ZN5doris13OperatorXBase4castINS_15EsScanOperatorXEEERT_v Line | Count | Source | 883 | 8.75k | TARGET& cast() { | 884 | 8.75k | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 0 | << " and expect type is" << typeid(TARGET).name(); | 887 | 8.75k | return reinterpret_cast<TARGET&>(*this); | 888 | 8.75k | } |
_ZN5doris13OperatorXBase4castINS_17MetaScanOperatorXEEERT_v Line | Count | Source | 883 | 43.7k | TARGET& cast() { | 884 | 43.7k | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 0 | << " and expect type is" << typeid(TARGET).name(); | 887 | 43.7k | return reinterpret_cast<TARGET&>(*this); | 888 | 43.7k | } |
_ZN5doris13OperatorXBase4castINS_20GroupCommitOperatorXEEERT_v Line | Count | Source | 883 | 539 | TARGET& cast() { | 884 | 539 | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 0 | << " and expect type is" << typeid(TARGET).name(); | 887 | 539 | return reinterpret_cast<TARGET&>(*this); | 888 | 539 | } |
_ZN5doris13OperatorXBase4castINS_22HashJoinProbeOperatorXEEERT_v Line | Count | Source | 883 | 446k | TARGET& cast() { | 884 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 887 | 446k | return reinterpret_cast<TARGET&>(*this); | 888 | 446k | } |
_ZN5doris13OperatorXBase4castINS_28NestedLoopJoinProbeOperatorXEEERT_v Line | Count | Source | 883 | 69.1M | TARGET& cast() { | 884 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 887 | 69.1M | return reinterpret_cast<TARGET&>(*this); | 888 | 69.1M | } |
_ZN5doris13OperatorXBase4castINS_33PartitionedHashJoinProbeOperatorXEEERT_v Line | Count | Source | 883 | 21 | TARGET& cast() { | 884 | 21 | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 0 | << " and expect type is" << typeid(TARGET).name(); | 887 | 21 | return reinterpret_cast<TARGET&>(*this); | 888 | 21 | } |
_ZN5doris13OperatorXBase4castINS_24SpillSortSourceOperatorXEEERT_v Line | Count | Source | 883 | 32 | TARGET& cast() { | 884 | 32 | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 0 | << " and expect type is" << typeid(TARGET).name(); | 887 | 32 | return reinterpret_cast<TARGET&>(*this); | 888 | 32 | } |
_ZN5doris13OperatorXBase4castINS_29LocalMergeSortSourceOperatorXEEERT_v Line | Count | Source | 883 | 82.8k | TARGET& cast() { | 884 | 82.8k | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 1 | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 1 | << " and expect type is" << typeid(TARGET).name(); | 887 | 82.8k | return reinterpret_cast<TARGET&>(*this); | 888 | 82.8k | } |
_ZN5doris13OperatorXBase4castINS_18AggSourceOperatorXEEERT_v Line | Count | Source | 883 | 195k | TARGET& cast() { | 884 | 195k | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 8 | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 8 | << " and expect type is" << typeid(TARGET).name(); | 887 | 195k | return reinterpret_cast<TARGET&>(*this); | 888 | 195k | } |
_ZN5doris13OperatorXBase4castINS_26BucketedAggSourceOperatorXEEERT_v Line | Count | Source | 883 | 1.45k | TARGET& cast() { | 884 | 1.45k | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 0 | << " and expect type is" << typeid(TARGET).name(); | 887 | 1.45k | return reinterpret_cast<TARGET&>(*this); | 888 | 1.45k | } |
_ZN5doris13OperatorXBase4castINS_29PartitionedAggSourceOperatorXEEERT_v Line | Count | Source | 883 | 21 | TARGET& cast() { | 884 | 21 | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 0 | << " and expect type is" << typeid(TARGET).name(); | 887 | 21 | return reinterpret_cast<TARGET&>(*this); | 888 | 21 | } |
_ZN5doris13OperatorXBase4castINS_22TableFunctionOperatorXEEERT_v Line | Count | Source | 883 | 27.8k | TARGET& cast() { | 884 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 887 | 27.8k | return reinterpret_cast<TARGET&>(*this); | 888 | 27.8k | } |
_ZN5doris13OperatorXBase4castINS_23ExchangeSourceOperatorXEEERT_v Line | Count | Source | 883 | 813k | TARGET& cast() { | 884 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 887 | 813k | return reinterpret_cast<TARGET&>(*this); | 888 | 813k | } |
_ZN5doris13OperatorXBase4castINS_15RepeatOperatorXEEERT_v Line | Count | Source | 883 | 5.13k | TARGET& cast() { | 884 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 887 | 5.13k | return reinterpret_cast<TARGET&>(*this); | 888 | 5.13k | } |
_ZN5doris13OperatorXBase4castINS_20UnionSourceOperatorXEEERT_v Line | Count | Source | 883 | 165k | TARGET& cast() { | 884 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 887 | 165k | return reinterpret_cast<TARGET&>(*this); | 888 | 165k | } |
_ZN5doris13OperatorXBase4castINS_36MultiCastDataStreamerSourceOperatorXEEERT_v Line | Count | Source | 883 | 15.4k | TARGET& cast() { | 884 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 887 | 15.4k | return reinterpret_cast<TARGET&>(*this); | 888 | 15.4k | } |
_ZN5doris13OperatorXBase4castINS_18SetSourceOperatorXILb1EEEEERT_v Line | Count | Source | 883 | 4.88k | TARGET& cast() { | 884 | 4.88k | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 1 | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 1 | << " and expect type is" << typeid(TARGET).name(); | 887 | 4.88k | return reinterpret_cast<TARGET&>(*this); | 888 | 4.88k | } |
_ZN5doris13OperatorXBase4castINS_18SetSourceOperatorXILb0EEEEERT_v Line | Count | Source | 883 | 4.92k | TARGET& cast() { | 884 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 887 | 4.92k | return reinterpret_cast<TARGET&>(*this); | 888 | 4.92k | } |
_ZN5doris13OperatorXBase4castINS_22DataGenSourceOperatorXEEERT_v Line | Count | Source | 883 | 461 | TARGET& cast() { | 884 | 461 | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 0 | << " and expect type is" << typeid(TARGET).name(); | 887 | 461 | return reinterpret_cast<TARGET&>(*this); | 888 | 461 | } |
_ZN5doris13OperatorXBase4castINS_19SchemaScanOperatorXEEERT_v Line | Count | Source | 883 | 2.04k | TARGET& cast() { | 884 | 2.04k | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 0 | << " and expect type is" << typeid(TARGET).name(); | 887 | 2.04k | return reinterpret_cast<TARGET&>(*this); | 888 | 2.04k | } |
_ZN5doris13OperatorXBase4castINS_20CacheSourceOperatorXEEERT_v Line | Count | Source | 883 | 34 | TARGET& cast() { | 884 | 34 | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 0 | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 0 | << " and expect type is" << typeid(TARGET).name(); | 887 | 34 | return reinterpret_cast<TARGET&>(*this); | 888 | 34 | } |
_ZN5doris13OperatorXBase4castINS_21RecCTESourceOperatorXEEERT_v Line | Count | Source | 883 | 598 | TARGET& cast() { | 884 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 887 | 598 | return reinterpret_cast<TARGET&>(*this); | 888 | 598 | } |
_ZN5doris13OperatorXBase4castINS_21StreamingAggOperatorXEEERT_v Line | Count | Source | 883 | 874k | TARGET& cast() { | 884 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 887 | 874k | return reinterpret_cast<TARGET&>(*this); | 888 | 874k | } |
_ZN5doris13OperatorXBase4castINS_29DistinctStreamingAggOperatorXEEERT_v Line | Count | Source | 883 | 1.04M | TARGET& cast() { | 884 | 18.4E | DCHECK(dynamic_cast<TARGET*>(this)) | 885 | 18.4E | << " Mismatch type! Current type is " << typeid(*this).name() | 886 | 18.4E | << " and expect type is" << typeid(TARGET).name(); | 887 | 1.04M | return reinterpret_cast<TARGET&>(*this); | 888 | 1.04M | } |
|
889 | | template <class TARGET> |
890 | | const TARGET& cast() const { |
891 | | DCHECK(dynamic_cast<const TARGET*>(this)) |
892 | | << " Mismatch type! Current type is " << typeid(*this).name() |
893 | | << " and expect type is" << typeid(TARGET).name(); |
894 | | return reinterpret_cast<const TARGET&>(*this); |
895 | | } |
896 | | |
897 | 88.4k | [[nodiscard]] OperatorPtr get_child() { return _child; } |
898 | | |
899 | 7.62k | [[nodiscard]] VExprContextSPtrs& conjuncts() { return _conjuncts; } |
900 | 0 | [[nodiscard]] VExprContextSPtrs& projections() { return _projections; } |
901 | 2.03M | [[nodiscard]] virtual RowDescriptor& row_descriptor() { return _row_descriptor; } |
902 | | |
903 | 350M | [[nodiscard]] int operator_id() const { return _operator_id; } |
904 | 11.3M | [[nodiscard]] int node_id() const override { return _node_id; } |
905 | 3.87M | [[nodiscard]] int nereids_id() const { return _nereids_id; } |
906 | | |
907 | 564k | [[nodiscard]] int64_t limit() const { return _limit; } |
908 | | |
909 | 12.0M | [[nodiscard]] const RowDescriptor& row_desc() const override { |
910 | 12.0M | return _output_row_descriptor ? *_output_row_descriptor : _row_descriptor; |
911 | 12.0M | } |
912 | | |
913 | 1.54M | [[nodiscard]] const RowDescriptor* output_row_descriptor() { |
914 | 1.54M | return _output_row_descriptor.get(); |
915 | 1.54M | } |
916 | | |
917 | 711k | bool has_output_row_desc() const { return _output_row_descriptor != nullptr; } |
918 | | |
919 | | [[nodiscard]] virtual Status get_block_after_projects(RuntimeState* state, Block* block, |
920 | | bool* eos); |
921 | | |
922 | | /// Only use in vectorized exec engine try to do projections to trans _row_desc -> _output_row_desc |
923 | | Status do_projections(RuntimeState* state, Block* origin_block, Block* output_block) const; |
924 | 1.10M | void set_parallel_tasks(int parallel_tasks) { _parallel_tasks = parallel_tasks; } |
925 | 105 | int parallel_tasks() const { return _parallel_tasks; } |
926 | | |
927 | | // To keep compatibility with older FE |
928 | 1 | void set_serial_operator() { _is_serial_operator = true; } |
929 | | |
930 | | // Resets this operator's estimated memory usage to zero so that the next |
931 | | // call to get_reserve_mem_size() starts fresh. The pipeline task calls |
932 | | // this after consuming the reserve size for all operators in a round. |
933 | 0 | virtual void reset_reserve_mem_size(RuntimeState* state) {} |
934 | | |
935 | | protected: |
936 | | template <typename Dependency> |
937 | | friend class PipelineXLocalState; |
938 | | friend class PipelineXLocalStateBase; |
939 | | friend class Scanner; |
940 | | const int _operator_id; |
941 | | const int _node_id; // unique w/in single plan tree |
942 | | int _nereids_id = -1; |
943 | | TPlanNodeType::type _type; |
944 | | ObjectPool* _pool = nullptr; |
945 | | std::vector<TupleId> _tuple_ids; |
946 | | |
947 | | private: |
948 | | // The expr of operator set to private permissions, as cannot be executed concurrently, |
949 | | // should use local state's expr. |
950 | | VExprContextSPtrs _conjuncts; |
951 | | VExprContextSPtrs _projections; |
952 | | // Used in common subexpression elimination to compute intermediate results. |
953 | | std::vector<VExprContextSPtrs> _intermediate_projections; |
954 | | |
955 | | protected: |
956 | | RowDescriptor _row_descriptor; |
957 | | std::unique_ptr<RowDescriptor> _output_row_descriptor = nullptr; |
958 | | std::vector<RowDescriptor> _intermediate_output_row_descriptor; |
959 | | |
960 | | /// Resource information sent from the frontend. |
961 | | const TBackendResourceProfile _resource_profile; |
962 | | |
963 | | int64_t _limit; // -1: no limit |
964 | | |
965 | | uint32_t _debug_point_count = 0; |
966 | | std::atomic_uint32_t _bytes_per_row = 0; |
967 | | |
968 | | std::string _op_name; |
969 | | int _parallel_tasks = 0; |
970 | | |
971 | | //_keep_origin is used to avoid copying during projection, |
972 | | // currently set to false only in the nestloop join. |
973 | | bool _keep_origin = true; |
974 | | |
975 | | // _blockable is true if the operator contains expressions that may block execution |
976 | | bool _blockable = false; |
977 | | }; |
978 | | |
979 | | template <typename LocalStateType> |
980 | | class OperatorX : public OperatorXBase { |
981 | | public: |
982 | | OperatorX(ObjectPool* pool, const TPlanNode& tnode, const int operator_id, |
983 | | const DescriptorTbl& descs) |
984 | 730k | : OperatorXBase(pool, tnode, operator_id, descs) {}_ZN5doris9OperatorXINS_21UnionSourceLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 53.1k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 62 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_25MaterializationLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 1.61k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 126 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 129 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_18EmptySetLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 1.59k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_16SelectLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 1.62k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 151 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 1.95k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 79.7k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_18OlapScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 209k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 77 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris9OperatorXINS_18FileScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 22.6k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_16EsScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 620 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_18AnalyticLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 1.64k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_14SortLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 2.35k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_19SpillSortLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 28 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 41.5k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_13AggLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 59.5k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 95 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 35 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 926 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_18ExchangeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 143k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_16RepeatLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 296 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 4.39k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 218 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
Unexecuted instantiation: _ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris9OperatorXINS_17DataGenLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 459 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 2.04k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_18MetaScanLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 6.24k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
Unexecuted instantiation: _ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 48 | : OperatorXBase(pool, tnode, operator_id, descs) {} |
Unexecuted instantiation: _ZN5doris9OperatorXINS_21CacheSourceLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE _ZN5doris9OperatorXINS_22StreamingAggLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 3.32k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 984 | 91.2k | : OperatorXBase(pool, tnode, operator_id, descs) {} |
|
985 | | OperatorX(ObjectPool* pool, int node_id, int operator_id) |
986 | 108k | : OperatorXBase(pool, node_id, operator_id) {};_ZN5doris9OperatorXINS_21CacheSourceLocalStateEEC2EPNS_10ObjectPoolEii Line | Count | Source | 986 | 10 | : OperatorXBase(pool, node_id, operator_id) {}; |
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEEC2EPNS_10ObjectPoolEii Line | Count | Source | 986 | 103k | : OperatorXBase(pool, node_id, operator_id) {}; |
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEEC2EPNS_10ObjectPoolEii Line | Count | Source | 986 | 5.31k | : 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_21BucketedAggLocalStateEEC2EPNS_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_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_34PartitionedHashJoinProbeLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_22RecCTESourceLocalStateEEC2EPNS_10ObjectPoolEii Unexecuted instantiation: _ZN5doris9OperatorXINS_20RecCTEScanLocalStateEEC2EPNS_10ObjectPoolEii |
987 | | |
988 | | #ifdef BE_TEST |
989 | | OperatorX() = default; |
990 | | #endif |
991 | | |
992 | | ~OperatorX() override = default; |
993 | | |
994 | | Status setup_local_state(RuntimeState* state, LocalStateInfo& info) override; |
995 | | using LocalState = LocalStateType; |
996 | 160M | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { |
997 | 160M | return state->get_local_state(operator_id())->template cast<LocalState>(); |
998 | 160M | } _ZNK5doris9OperatorXINS_22RecCTESourceLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 10.8k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 10.8k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 10.8k | } |
_ZNK5doris9OperatorXINS_21CacheSourceLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 79 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 79 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 79 | } |
_ZNK5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 3.11M | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 3.11M | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 3.11M | } |
_ZNK5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 55.7k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 55.7k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 55.7k | } |
_ZNK5doris9OperatorXINS_18OlapScanLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 49.8M | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 49.8M | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 49.8M | } |
_ZNK5doris9OperatorXINS_21GroupCommitLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 4.95M | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 4.95M | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 4.95M | } |
Unexecuted instantiation: _ZNK5doris9OperatorXINS_18JDBCScanLocalStateEE15get_local_stateEPNS_12RuntimeStateE _ZNK5doris9OperatorXINS_18FileScanLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 413k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 413k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 413k | } |
_ZNK5doris9OperatorXINS_16EsScanLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 2.60k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 2.60k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 2.60k | } |
_ZNK5doris9OperatorXINS_23HashJoinProbeLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 674k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 674k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 674k | } |
_ZNK5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 59 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 59 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 59 | } |
_ZNK5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 92.1M | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 92.1M | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 92.1M | } |
_ZNK5doris9OperatorXINS_21UnionSourceLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 572k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 572k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 572k | } |
_ZNK5doris9OperatorXINS_29PartitionSortSourceLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 2.80k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 2.80k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 2.80k | } |
_ZNK5doris9OperatorXINS_25MaterializationLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 34.7k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 34.7k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 34.7k | } |
_ZNK5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 7.37k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 7.37k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 7.37k | } |
_ZNK5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 8.25k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 8.25k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 8.25k | } |
_ZNK5doris9OperatorXINS_18EmptySetLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 3.19k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 3.19k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 3.19k | } |
_ZNK5doris9OperatorXINS_18MetaScanLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 19.1k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 19.1k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 19.1k | } |
_ZNK5doris9OperatorXINS_16SelectLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 17.2k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 17.2k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 17.2k | } |
_ZNK5doris9OperatorXINS_20RecCTEScanLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 12.8k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 12.8k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 12.8k | } |
_ZNK5doris9OperatorXINS_23TableFunctionLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 30.4k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 30.4k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 30.4k | } |
_ZNK5doris9OperatorXINS_18ExchangeLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 1.99M | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 1.99M | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 1.99M | } |
_ZNK5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 4.52M | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 4.52M | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 4.52M | } |
_ZNK5doris9OperatorXINS_22StreamingAggLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 296k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 296k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 296k | } |
_ZNK5doris9OperatorXINS_13AggLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 403k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 403k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 403k | } |
_ZNK5doris9OperatorXINS_24PartitionedAggLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 114 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 114 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 114 | } |
_ZNK5doris9OperatorXINS_21BucketedAggLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 20.6k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 20.6k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 20.6k | } |
_ZNK5doris9OperatorXINS_14SortLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 40.9k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 40.9k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 40.9k | } |
_ZNK5doris9OperatorXINS_19SpillSortLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 750 | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 750 | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 750 | } |
_ZNK5doris9OperatorXINS_24LocalMergeSortLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 1.38M | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 1.38M | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 1.38M | } |
_ZNK5doris9OperatorXINS_18AnalyticLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 38.5k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 38.5k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 38.5k | } |
_ZNK5doris9OperatorXINS_16RepeatLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 14.2k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 14.2k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 14.2k | } |
_ZNK5doris9OperatorXINS_23AssertNumRowsLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 1.28k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 1.28k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 1.28k | } |
_ZNK5doris9OperatorXINS_17DataGenLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 31.5k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 31.5k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 31.5k | } |
_ZNK5doris9OperatorXINS_20SchemaScanLocalStateEE15get_local_stateEPNS_12RuntimeStateE Line | Count | Source | 996 | 11.2k | [[nodiscard]] LocalState& get_local_state(RuntimeState* state) const { | 997 | 11.2k | return state->get_local_state(operator_id())->template cast<LocalState>(); | 998 | 11.2k | } |
|
999 | | |
1000 | | // Returns memory this single operator expects to allocate in the next round. |
1001 | | // Does NOT include child operators — the pipeline task iterates all |
1002 | | // operators itself. |
1003 | 26.1M | size_t get_reserve_mem_size(RuntimeState* state) override { |
1004 | 26.1M | auto& local_state = get_local_state(state); |
1005 | 26.1M | auto estimated_size = local_state.estimate_memory_usage(); |
1006 | 26.1M | if (estimated_size < state->minimum_operator_memory_required_bytes()) { |
1007 | 26.1M | estimated_size = state->minimum_operator_memory_required_bytes(); |
1008 | 26.1M | } |
1009 | 26.1M | return estimated_size; |
1010 | 26.1M | } _ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 2.95k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 2.95k | auto& local_state = get_local_state(state); | 1005 | 2.95k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 2.95k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 2.95k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 2.95k | } | 1009 | 2.95k | return estimated_size; | 1010 | 2.95k | } |
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 23 | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 23 | auto& local_state = get_local_state(state); | 1005 | 23 | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 23 | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 23 | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 23 | } | 1009 | 23 | return estimated_size; | 1010 | 23 | } |
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 1.04M | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 1.04M | auto& local_state = get_local_state(state); | 1005 | 1.04M | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 1.04M | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 1.04M | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 1.04M | } | 1009 | 1.04M | return estimated_size; | 1010 | 1.04M | } |
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 18.6k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 18.6k | auto& local_state = get_local_state(state); | 1005 | 18.6k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 18.6k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 18.6k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 18.6k | } | 1009 | 18.6k | return estimated_size; | 1010 | 18.6k | } |
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 155k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 155k | auto& local_state = get_local_state(state); | 1005 | 155k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 155k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 155k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 155k | } | 1009 | 155k | return estimated_size; | 1010 | 155k | } |
_ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 1 | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 1 | auto& local_state = get_local_state(state); | 1005 | 1 | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 1 | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 1 | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 1 | } | 1009 | 1 | return estimated_size; | 1010 | 1 | } |
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 23.0M | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 23.0M | auto& local_state = get_local_state(state); | 1005 | 23.0M | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 23.0M | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 23.0M | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 23.0M | } | 1009 | 23.0M | return estimated_size; | 1010 | 23.0M | } |
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 127k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 127k | auto& local_state = get_local_state(state); | 1005 | 127k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 127k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 127k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 127k | } | 1009 | 127k | return estimated_size; | 1010 | 127k | } |
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 802 | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 802 | auto& local_state = get_local_state(state); | 1005 | 802 | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 802 | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 802 | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 802 | } | 1009 | 802 | return estimated_size; | 1010 | 802 | } |
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 4.50k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 4.50k | auto& local_state = get_local_state(state); | 1005 | 4.50k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 4.50k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 4.50k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 4.50k | } | 1009 | 4.50k | return estimated_size; | 1010 | 4.50k | } |
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 2.46k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 2.46k | auto& local_state = get_local_state(state); | 1005 | 2.46k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 2.46k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 2.46k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 2.46k | } | 1009 | 2.46k | return estimated_size; | 1010 | 2.46k | } |
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 2.47k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 2.47k | auto& local_state = get_local_state(state); | 1005 | 2.47k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 2.47k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 2.47k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 2.47k | } | 1009 | 2.47k | return estimated_size; | 1010 | 2.47k | } |
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 1.59k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 1.59k | auto& local_state = get_local_state(state); | 1005 | 1.59k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 1.59k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 1.59k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 1.59k | } | 1009 | 1.59k | return estimated_size; | 1010 | 1.59k | } |
_ZN5doris9OperatorXINS_16SelectLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 5.75k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 5.75k | auto& local_state = get_local_state(state); | 1005 | 5.75k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 5.75k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 5.75k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 5.75k | } | 1009 | 5.75k | return estimated_size; | 1010 | 5.75k | } |
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 4.29k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 4.29k | auto& local_state = get_local_state(state); | 1005 | 4.29k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 4.29k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 4.29k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 4.29k | } | 1009 | 4.29k | return estimated_size; | 1010 | 4.29k | } |
Unexecuted instantiation: _ZN5doris9OperatorXINS_18OlapScanLocalStateEE20get_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 _ZN5doris9OperatorXINS_18ExchangeLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 668k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 668k | auto& local_state = get_local_state(state); | 1005 | 668k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 668k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 668k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 668k | } | 1009 | 668k | return estimated_size; | 1010 | 668k | } |
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 526k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 526k | auto& local_state = get_local_state(state); | 1005 | 526k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 526k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 526k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 526k | } | 1009 | 526k | return estimated_size; | 1010 | 526k | } |
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 37.3k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 37.3k | auto& local_state = get_local_state(state); | 1005 | 37.3k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 37.3k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 37.3k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 37.3k | } | 1009 | 37.3k | return estimated_size; | 1010 | 37.3k | } |
_ZN5doris9OperatorXINS_13AggLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 135k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 135k | auto& local_state = get_local_state(state); | 1005 | 135k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 135k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 135k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 135k | } | 1009 | 135k | return estimated_size; | 1010 | 135k | } |
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 6 | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 6 | auto& local_state = get_local_state(state); | 1005 | 6 | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 6 | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 6 | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 6 | } | 1009 | 6 | return estimated_size; | 1010 | 6 | } |
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 6.91k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 6.91k | auto& local_state = get_local_state(state); | 1005 | 6.91k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 6.93k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 6.93k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 6.93k | } | 1009 | 6.91k | return estimated_size; | 1010 | 6.91k | } |
_ZN5doris9OperatorXINS_14SortLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 13.5k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 13.5k | auto& local_state = get_local_state(state); | 1005 | 13.5k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 13.5k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 13.5k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 13.5k | } | 1009 | 13.5k | return estimated_size; | 1010 | 13.5k | } |
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 226 | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 226 | auto& local_state = get_local_state(state); | 1005 | 226 | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 226 | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 226 | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 226 | } | 1009 | 226 | return estimated_size; | 1010 | 226 | } |
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 348k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 348k | auto& local_state = get_local_state(state); | 1005 | 348k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 348k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 348k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 348k | } | 1009 | 348k | return estimated_size; | 1010 | 348k | } |
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 12.8k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 12.8k | auto& local_state = get_local_state(state); | 1005 | 12.8k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 12.8k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 12.8k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 12.8k | } | 1009 | 12.8k | return estimated_size; | 1010 | 12.8k | } |
_ZN5doris9OperatorXINS_16RepeatLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 3.23k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 3.23k | auto& local_state = get_local_state(state); | 1005 | 3.23k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 3.23k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 3.23k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 3.23k | } | 1009 | 3.23k | return estimated_size; | 1010 | 3.23k | } |
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 6.44k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 6.44k | auto& local_state = get_local_state(state); | 1005 | 6.44k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 6.44k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 6.43k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 6.43k | } | 1009 | 6.44k | return estimated_size; | 1010 | 6.44k | } |
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 427 | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 427 | auto& local_state = get_local_state(state); | 1005 | 427 | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 427 | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 427 | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 427 | } | 1009 | 427 | return estimated_size; | 1010 | 427 | } |
_ZN5doris9OperatorXINS_17DataGenLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 10.5k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 10.5k | auto& local_state = get_local_state(state); | 1005 | 10.5k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 10.5k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 10.5k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 10.5k | } | 1009 | 10.5k | return estimated_size; | 1010 | 10.5k | } |
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1003 | 3.74k | size_t get_reserve_mem_size(RuntimeState* state) override { | 1004 | 3.74k | auto& local_state = get_local_state(state); | 1005 | 3.74k | auto estimated_size = local_state.estimate_memory_usage(); | 1006 | 3.74k | if (estimated_size < state->minimum_operator_memory_required_bytes()) { | 1007 | 3.74k | estimated_size = state->minimum_operator_memory_required_bytes(); | 1008 | 3.74k | } | 1009 | 3.74k | return estimated_size; | 1010 | 3.74k | } |
Unexecuted instantiation: _ZN5doris9OperatorXINS_18MetaScanLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris9OperatorXINS_18FileScanLocalStateEE20get_reserve_mem_sizeEPNS_12RuntimeStateE |
1011 | | |
1012 | 52.2M | void reset_reserve_mem_size(RuntimeState* state) override { |
1013 | 52.2M | auto& local_state = get_local_state(state); |
1014 | 52.2M | local_state.reset_estimate_memory_usage(); |
1015 | 52.2M | } _ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 2.95k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 2.95k | auto& local_state = get_local_state(state); | 1014 | 2.95k | local_state.reset_estimate_memory_usage(); | 1015 | 2.95k | } |
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 23 | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 23 | auto& local_state = get_local_state(state); | 1014 | 23 | local_state.reset_estimate_memory_usage(); | 1015 | 23 | } |
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 1.04M | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 1.04M | auto& local_state = get_local_state(state); | 1014 | 1.04M | local_state.reset_estimate_memory_usage(); | 1015 | 1.04M | } |
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 18.6k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 18.6k | auto& local_state = get_local_state(state); | 1014 | 18.6k | local_state.reset_estimate_memory_usage(); | 1015 | 18.6k | } |
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 24.2M | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 24.2M | auto& local_state = get_local_state(state); | 1014 | 24.2M | local_state.reset_estimate_memory_usage(); | 1015 | 24.2M | } |
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 1.65M | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 1.65M | auto& local_state = get_local_state(state); | 1014 | 1.65M | local_state.reset_estimate_memory_usage(); | 1015 | 1.65M | } |
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE _ZN5doris9OperatorXINS_18FileScanLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 137k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 137k | auto& local_state = get_local_state(state); | 1014 | 137k | local_state.reset_estimate_memory_usage(); | 1015 | 137k | } |
_ZN5doris9OperatorXINS_16EsScanLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 868 | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 868 | auto& local_state = get_local_state(state); | 1014 | 868 | local_state.reset_estimate_memory_usage(); | 1015 | 868 | } |
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 155k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 155k | auto& local_state = get_local_state(state); | 1014 | 155k | local_state.reset_estimate_memory_usage(); | 1015 | 155k | } |
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE _ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 23.0M | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 23.0M | auto& local_state = get_local_state(state); | 1014 | 23.0M | local_state.reset_estimate_memory_usage(); | 1015 | 23.0M | } |
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 127k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 127k | auto& local_state = get_local_state(state); | 1014 | 127k | local_state.reset_estimate_memory_usage(); | 1015 | 127k | } |
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 803 | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 803 | auto& local_state = get_local_state(state); | 1014 | 803 | local_state.reset_estimate_memory_usage(); | 1015 | 803 | } |
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 4.50k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 4.50k | auto& local_state = get_local_state(state); | 1014 | 4.50k | local_state.reset_estimate_memory_usage(); | 1015 | 4.50k | } |
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 2.46k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 2.46k | auto& local_state = get_local_state(state); | 1014 | 2.46k | local_state.reset_estimate_memory_usage(); | 1015 | 2.46k | } |
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 2.47k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 2.47k | auto& local_state = get_local_state(state); | 1014 | 2.47k | local_state.reset_estimate_memory_usage(); | 1015 | 2.47k | } |
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 1.59k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 1.59k | auto& local_state = get_local_state(state); | 1014 | 1.59k | local_state.reset_estimate_memory_usage(); | 1015 | 1.59k | } |
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 6.38k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 6.38k | auto& local_state = get_local_state(state); | 1014 | 6.38k | local_state.reset_estimate_memory_usage(); | 1015 | 6.38k | } |
_ZN5doris9OperatorXINS_16SelectLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 5.75k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 5.75k | auto& local_state = get_local_state(state); | 1014 | 5.75k | local_state.reset_estimate_memory_usage(); | 1015 | 5.75k | } |
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 4.29k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 4.29k | auto& local_state = get_local_state(state); | 1014 | 4.29k | local_state.reset_estimate_memory_usage(); | 1015 | 4.29k | } |
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 668k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 668k | auto& local_state = get_local_state(state); | 1014 | 668k | local_state.reset_estimate_memory_usage(); | 1015 | 668k | } |
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 527k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 527k | auto& local_state = get_local_state(state); | 1014 | 527k | local_state.reset_estimate_memory_usage(); | 1015 | 527k | } |
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 37.3k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 37.3k | auto& local_state = get_local_state(state); | 1014 | 37.3k | local_state.reset_estimate_memory_usage(); | 1015 | 37.3k | } |
_ZN5doris9OperatorXINS_13AggLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 135k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 135k | auto& local_state = get_local_state(state); | 1014 | 135k | local_state.reset_estimate_memory_usage(); | 1015 | 135k | } |
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 6 | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 6 | auto& local_state = get_local_state(state); | 1014 | 6 | local_state.reset_estimate_memory_usage(); | 1015 | 6 | } |
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 6.93k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 6.93k | auto& local_state = get_local_state(state); | 1014 | 6.93k | local_state.reset_estimate_memory_usage(); | 1015 | 6.93k | } |
_ZN5doris9OperatorXINS_14SortLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 13.5k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 13.5k | auto& local_state = get_local_state(state); | 1014 | 13.5k | local_state.reset_estimate_memory_usage(); | 1015 | 13.5k | } |
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 226 | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 226 | auto& local_state = get_local_state(state); | 1014 | 226 | local_state.reset_estimate_memory_usage(); | 1015 | 226 | } |
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 348k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 348k | auto& local_state = get_local_state(state); | 1014 | 348k | local_state.reset_estimate_memory_usage(); | 1015 | 348k | } |
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 12.8k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 12.8k | auto& local_state = get_local_state(state); | 1014 | 12.8k | local_state.reset_estimate_memory_usage(); | 1015 | 12.8k | } |
_ZN5doris9OperatorXINS_16RepeatLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 3.23k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 3.23k | auto& local_state = get_local_state(state); | 1014 | 3.23k | local_state.reset_estimate_memory_usage(); | 1015 | 3.23k | } |
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 6.44k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 6.44k | auto& local_state = get_local_state(state); | 1014 | 6.44k | local_state.reset_estimate_memory_usage(); | 1015 | 6.44k | } |
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 427 | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 427 | auto& local_state = get_local_state(state); | 1014 | 427 | local_state.reset_estimate_memory_usage(); | 1015 | 427 | } |
_ZN5doris9OperatorXINS_17DataGenLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 10.5k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 10.5k | auto& local_state = get_local_state(state); | 1014 | 10.5k | local_state.reset_estimate_memory_usage(); | 1015 | 10.5k | } |
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE22reset_reserve_mem_sizeEPNS_12RuntimeStateE Line | Count | Source | 1012 | 3.74k | void reset_reserve_mem_size(RuntimeState* state) override { | 1013 | 3.74k | auto& local_state = get_local_state(state); | 1014 | 3.74k | local_state.reset_estimate_memory_usage(); | 1015 | 3.74k | } |
|
1016 | | }; |
1017 | | |
1018 | | /** |
1019 | | * StreamingOperatorX indicates operators which always processes block in streaming way (one-in-one-out). |
1020 | | */ |
1021 | | template <typename LocalStateType> |
1022 | | class StreamingOperatorX : public OperatorX<LocalStateType> { |
1023 | | public: |
1024 | | StreamingOperatorX(ObjectPool* pool, const TPlanNode& tnode, int operator_id, |
1025 | | const DescriptorTbl& descs) |
1026 | 1.84k | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {}_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1026 | 1.62k | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {} |
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1026 | 218 | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {} |
|
1027 | | |
1028 | | #ifdef BE_TEST |
1029 | | StreamingOperatorX() = default; |
1030 | | #endif |
1031 | | |
1032 | | virtual ~StreamingOperatorX() = default; |
1033 | | |
1034 | | Status get_block(RuntimeState* state, Block* block, bool* eos) override; |
1035 | | |
1036 | | virtual Status pull(RuntimeState* state, Block* block, bool* eos) = 0; |
1037 | | }; |
1038 | | |
1039 | | /** |
1040 | | * StatefulOperatorX indicates the operators with some states inside. |
1041 | | * |
1042 | | * Specifically, we called an operator stateful if an operator can determine its output by itself. |
1043 | | * 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). |
1044 | | * If there are still remain rows in probe block, we can get output block by calling `get_block` without any data from its child. |
1045 | | * In a nutshell, it is a one-to-many relation between input blocks and output blocks for StatefulOperator. |
1046 | | */ |
1047 | | template <typename LocalStateType> |
1048 | | class StatefulOperatorX : public OperatorX<LocalStateType> { |
1049 | | public: |
1050 | | StatefulOperatorX(ObjectPool* pool, const TPlanNode& tnode, const int operator_id, |
1051 | | const DescriptorTbl& descs) |
1052 | 181k | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {}_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1052 | 1.61k | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {} |
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1052 | 79.7k | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {} |
_ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1052 | 48 | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {} |
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1052 | 296 | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {} |
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1052 | 3.32k | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {} |
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1052 | 91.2k | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {} |
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1052 | 4.39k | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {} |
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEEC2EPNS_10ObjectPoolERKNS_9TPlanNodeEiRKNS_13DescriptorTblE Line | Count | Source | 1052 | 926 | : OperatorX<LocalStateType>(pool, tnode, operator_id, descs) {} |
|
1053 | | #ifdef BE_TEST |
1054 | | StatefulOperatorX() = default; |
1055 | | #endif |
1056 | | virtual ~StatefulOperatorX() = default; |
1057 | | |
1058 | | using OperatorX<LocalStateType>::get_local_state; |
1059 | | |
1060 | | [[nodiscard]] Status get_block(RuntimeState* state, Block* block, bool* eos) override; |
1061 | | |
1062 | | [[nodiscard]] virtual Status pull(RuntimeState* state, Block* block, bool* eos) const = 0; |
1063 | | [[nodiscard]] virtual Status push(RuntimeState* state, Block* input_block, bool eos) const = 0; |
1064 | 0 | bool need_more_input_data(RuntimeState* state) const override { return true; }Unexecuted instantiation: _ZNK5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE20need_more_input_dataEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE20need_more_input_dataEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE20need_more_input_dataEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17StatefulOperatorXINS_25MaterializationLocalStateEE20need_more_input_dataEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE20need_more_input_dataEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE20need_more_input_dataEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17StatefulOperatorXINS_16RepeatLocalStateEE20need_more_input_dataEPNS_12RuntimeStateE Unexecuted instantiation: _ZNK5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE20need_more_input_dataEPNS_12RuntimeStateE |
1065 | | }; |
1066 | | |
1067 | | template <typename Writer, typename Parent> |
1068 | | requires(std::is_base_of_v<AsyncResultWriter, Writer>) |
1069 | | class AsyncWriterSink : public PipelineXSinkLocalState<BasicSharedState> { |
1070 | | public: |
1071 | | using Base = PipelineXSinkLocalState<BasicSharedState>; |
1072 | | AsyncWriterSink(DataSinkOperatorXBase* parent, RuntimeState* state) |
1073 | 68.1k | : Base(parent, state), _async_writer_dependency(nullptr) { |
1074 | 68.1k | _finish_dependency = |
1075 | 68.1k | std::make_shared<Dependency>(parent->operator_id(), parent->node_id(), |
1076 | 68.1k | parent->get_name() + "_FINISH_DEPENDENCY", true); |
1077 | 68.1k | } _ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 1073 | 522 | : Base(parent, state), _async_writer_dependency(nullptr) { | 1074 | 522 | _finish_dependency = | 1075 | 522 | std::make_shared<Dependency>(parent->operator_id(), parent->node_id(), | 1076 | 522 | parent->get_name() + "_FINISH_DEPENDENCY", true); | 1077 | 522 | } |
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 1073 | 88 | : Base(parent, state), _async_writer_dependency(nullptr) { | 1074 | 88 | _finish_dependency = | 1075 | 88 | std::make_shared<Dependency>(parent->operator_id(), parent->node_id(), | 1076 | 88 | parent->get_name() + "_FINISH_DEPENDENCY", true); | 1077 | 88 | } |
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 1073 | 52.5k | : Base(parent, state), _async_writer_dependency(nullptr) { | 1074 | 52.5k | _finish_dependency = | 1075 | 52.5k | std::make_shared<Dependency>(parent->operator_id(), parent->node_id(), | 1076 | 52.5k | parent->get_name() + "_FINISH_DEPENDENCY", true); | 1077 | 52.5k | } |
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 1073 | 5.47k | : Base(parent, state), _async_writer_dependency(nullptr) { | 1074 | 5.47k | _finish_dependency = | 1075 | 5.47k | std::make_shared<Dependency>(parent->operator_id(), parent->node_id(), | 1076 | 5.47k | parent->get_name() + "_FINISH_DEPENDENCY", true); | 1077 | 5.47k | } |
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 1073 | 5.14k | : Base(parent, state), _async_writer_dependency(nullptr) { | 1074 | 5.14k | _finish_dependency = | 1075 | 5.14k | std::make_shared<Dependency>(parent->operator_id(), parent->node_id(), | 1076 | 5.14k | parent->get_name() + "_FINISH_DEPENDENCY", true); | 1077 | 5.14k | } |
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 1073 | 3.38k | : Base(parent, state), _async_writer_dependency(nullptr) { | 1074 | 3.38k | _finish_dependency = | 1075 | 3.38k | std::make_shared<Dependency>(parent->operator_id(), parent->node_id(), | 1076 | 3.38k | parent->get_name() + "_FINISH_DEPENDENCY", true); | 1077 | 3.38k | } |
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 1073 | 160 | : Base(parent, state), _async_writer_dependency(nullptr) { | 1074 | 160 | _finish_dependency = | 1075 | 160 | std::make_shared<Dependency>(parent->operator_id(), parent->node_id(), | 1076 | 160 | parent->get_name() + "_FINISH_DEPENDENCY", true); | 1077 | 160 | } |
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 1073 | 640 | : Base(parent, state), _async_writer_dependency(nullptr) { | 1074 | 640 | _finish_dependency = | 1075 | 640 | std::make_shared<Dependency>(parent->operator_id(), parent->node_id(), | 1076 | 640 | parent->get_name() + "_FINISH_DEPENDENCY", true); | 1077 | 640 | } |
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEEC2EPNS_21DataSinkOperatorXBaseEPNS_12RuntimeStateE Line | Count | Source | 1073 | 156 | : Base(parent, state), _async_writer_dependency(nullptr) { | 1074 | 156 | _finish_dependency = | 1075 | 156 | std::make_shared<Dependency>(parent->operator_id(), parent->node_id(), | 1076 | 156 | parent->get_name() + "_FINISH_DEPENDENCY", true); | 1077 | 156 | } |
|
1078 | | |
1079 | | Status init(RuntimeState* state, LocalSinkStateInfo& info) override; |
1080 | | |
1081 | | Status open(RuntimeState* state) override; |
1082 | | |
1083 | | Status sink(RuntimeState* state, Block* block, bool eos); |
1084 | | |
1085 | 68.4k | std::vector<Dependency*> dependencies() const override { |
1086 | 68.4k | return {_async_writer_dependency.get()}; |
1087 | 68.4k | } _ZNK5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE12dependenciesEv Line | Count | Source | 1085 | 5.47k | std::vector<Dependency*> dependencies() const override { | 1086 | 5.47k | return {_async_writer_dependency.get()}; | 1087 | 5.47k | } |
_ZNK5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE12dependenciesEv Line | Count | Source | 1085 | 52.8k | std::vector<Dependency*> dependencies() const override { | 1086 | 52.8k | return {_async_writer_dependency.get()}; | 1087 | 52.8k | } |
_ZNK5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE12dependenciesEv Line | Count | Source | 1085 | 5.14k | std::vector<Dependency*> dependencies() const override { | 1086 | 5.14k | return {_async_writer_dependency.get()}; | 1087 | 5.14k | } |
_ZNK5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE12dependenciesEv Line | Count | Source | 1085 | 160 | std::vector<Dependency*> dependencies() const override { | 1086 | 160 | return {_async_writer_dependency.get()}; | 1087 | 160 | } |
_ZNK5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE12dependenciesEv Line | Count | Source | 1085 | 640 | std::vector<Dependency*> dependencies() const override { | 1086 | 640 | return {_async_writer_dependency.get()}; | 1087 | 640 | } |
_ZNK5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE12dependenciesEv Line | Count | Source | 1085 | 3.38k | std::vector<Dependency*> dependencies() const override { | 1086 | 3.38k | return {_async_writer_dependency.get()}; | 1087 | 3.38k | } |
_ZNK5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE12dependenciesEv Line | Count | Source | 1085 | 88 | std::vector<Dependency*> dependencies() const override { | 1086 | 88 | return {_async_writer_dependency.get()}; | 1087 | 88 | } |
Unexecuted instantiation: _ZNK5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE12dependenciesEv _ZNK5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE12dependenciesEv Line | Count | Source | 1085 | 156 | std::vector<Dependency*> dependencies() const override { | 1086 | 156 | return {_async_writer_dependency.get()}; | 1087 | 156 | } |
_ZNK5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE12dependenciesEv Line | Count | Source | 1085 | 522 | std::vector<Dependency*> dependencies() const override { | 1086 | 522 | return {_async_writer_dependency.get()}; | 1087 | 522 | } |
Unexecuted instantiation: _ZNK5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE12dependenciesEv |
1088 | | Status close(RuntimeState* state, Status exec_status) override; |
1089 | | |
1090 | 68.4k | Dependency* finishdependency() override { return _finish_dependency.get(); }_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE16finishdependencyEv Line | Count | Source | 1090 | 5.47k | Dependency* finishdependency() override { return _finish_dependency.get(); } |
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE16finishdependencyEv Line | Count | Source | 1090 | 52.8k | Dependency* finishdependency() override { return _finish_dependency.get(); } |
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE16finishdependencyEv Line | Count | Source | 1090 | 5.14k | Dependency* finishdependency() override { return _finish_dependency.get(); } |
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE16finishdependencyEv Line | Count | Source | 1090 | 160 | Dependency* finishdependency() override { return _finish_dependency.get(); } |
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE16finishdependencyEv Line | Count | Source | 1090 | 640 | Dependency* finishdependency() override { return _finish_dependency.get(); } |
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE16finishdependencyEv Line | Count | Source | 1090 | 3.38k | Dependency* finishdependency() override { return _finish_dependency.get(); } |
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE16finishdependencyEv Line | Count | Source | 1090 | 88 | Dependency* finishdependency() override { return _finish_dependency.get(); } |
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE16finishdependencyEv _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE16finishdependencyEv Line | Count | Source | 1090 | 156 | Dependency* finishdependency() override { return _finish_dependency.get(); } |
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE16finishdependencyEv Line | Count | Source | 1090 | 522 | Dependency* finishdependency() override { return _finish_dependency.get(); } |
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE16finishdependencyEv |
1091 | | |
1092 | | protected: |
1093 | | VExprContextSPtrs _output_vexpr_ctxs; |
1094 | | std::unique_ptr<Writer> _writer; |
1095 | | |
1096 | | std::shared_ptr<Dependency> _async_writer_dependency; |
1097 | | std::shared_ptr<Dependency> _finish_dependency; |
1098 | | }; |
1099 | | |
1100 | | #ifdef BE_TEST |
1101 | | class DummyOperatorLocalState final : public PipelineXLocalState<FakeSharedState> { |
1102 | | public: |
1103 | | ENABLE_FACTORY_CREATOR(DummyOperatorLocalState); |
1104 | | |
1105 | | DummyOperatorLocalState(RuntimeState* state, OperatorXBase* parent) |
1106 | | : PipelineXLocalState<FakeSharedState>(state, parent) { |
1107 | | _tmp_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), |
1108 | | "DummyOperatorDependency", true); |
1109 | | _finish_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), |
1110 | | "DummyOperatorDependency", true); |
1111 | | _filter_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), |
1112 | | "DummyOperatorDependency", true); |
1113 | | } |
1114 | | Dependency* finishdependency() override { return _finish_dependency.get(); } |
1115 | | ~DummyOperatorLocalState() = default; |
1116 | | |
1117 | | std::vector<Dependency*> dependencies() const override { return {_tmp_dependency.get()}; } |
1118 | | std::vector<Dependency*> execution_dependencies() override { |
1119 | | return {_filter_dependency.get()}; |
1120 | | } |
1121 | | |
1122 | | private: |
1123 | | std::shared_ptr<Dependency> _tmp_dependency; |
1124 | | std::shared_ptr<Dependency> _finish_dependency; |
1125 | | std::shared_ptr<Dependency> _filter_dependency; |
1126 | | }; |
1127 | | |
1128 | | class DummyOperator final : public OperatorX<DummyOperatorLocalState> { |
1129 | | public: |
1130 | | DummyOperator() : OperatorX<DummyOperatorLocalState>(nullptr, 0, 0) {} |
1131 | | |
1132 | | [[nodiscard]] bool is_source() const override { return true; } |
1133 | | |
1134 | | Status get_block(RuntimeState* state, Block* block, bool* eos) override { |
1135 | | *eos = _eos; |
1136 | | return Status::OK(); |
1137 | | } |
1138 | | void set_low_memory_mode(RuntimeState* state) override { _low_memory_mode = true; } |
1139 | | Status terminate(RuntimeState* state) override { |
1140 | | _terminated = true; |
1141 | | return Status::OK(); |
1142 | | } |
1143 | | size_t revocable_mem_size(RuntimeState* state) const override { return _revocable_mem_size; } |
1144 | | size_t get_reserve_mem_size(RuntimeState* state) override { |
1145 | | return _disable_reserve_mem |
1146 | | ? 0 |
1147 | | : OperatorX<DummyOperatorLocalState>::get_reserve_mem_size(state); |
1148 | | } |
1149 | | Status revoke_memory(RuntimeState* state) override { |
1150 | | _revoke_called = true; |
1151 | | return Status::OK(); |
1152 | | } |
1153 | | |
1154 | | private: |
1155 | | friend class AssertNumRowsLocalState; |
1156 | | bool _eos = false; |
1157 | | bool _low_memory_mode = false; |
1158 | | bool _terminated = false; |
1159 | | size_t _revocable_mem_size = 0; |
1160 | | bool _disable_reserve_mem = false; |
1161 | | bool _revoke_called = false; |
1162 | | }; |
1163 | | |
1164 | | class DummySinkLocalState final : public PipelineXSinkLocalState<BasicSharedState> { |
1165 | | public: |
1166 | | using Base = PipelineXSinkLocalState<BasicSharedState>; |
1167 | | ENABLE_FACTORY_CREATOR(DummySinkLocalState); |
1168 | | DummySinkLocalState(DataSinkOperatorXBase* parent, RuntimeState* state) : Base(parent, state) { |
1169 | | _tmp_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), |
1170 | | "DummyOperatorDependency", true); |
1171 | | _finish_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), |
1172 | | "DummyOperatorDependency", true); |
1173 | | } |
1174 | | |
1175 | | std::vector<Dependency*> dependencies() const override { return {_tmp_dependency.get()}; } |
1176 | | Dependency* finishdependency() override { return _finish_dependency.get(); } |
1177 | | bool is_finished() const override { return _is_finished; } |
1178 | | |
1179 | | private: |
1180 | | std::shared_ptr<Dependency> _tmp_dependency; |
1181 | | std::shared_ptr<Dependency> _finish_dependency; |
1182 | | std::atomic_bool _is_finished = false; |
1183 | | }; |
1184 | | |
1185 | | class DummySinkOperatorX final : public DataSinkOperatorX<DummySinkLocalState> { |
1186 | | public: |
1187 | | DummySinkOperatorX(int op_id, int node_id, int dest_id) |
1188 | | : DataSinkOperatorX<DummySinkLocalState>(op_id, node_id, dest_id) {} |
1189 | | Status sink(RuntimeState* state, Block* in_block, bool eos) override { |
1190 | | return _return_eof ? Status::Error<ErrorCode::END_OF_FILE>("source have closed") |
1191 | | : Status::OK(); |
1192 | | } |
1193 | | void set_low_memory_mode(RuntimeState* state) override { _low_memory_mode = true; } |
1194 | | Status terminate(RuntimeState* state) override { |
1195 | | _terminated = true; |
1196 | | return Status::OK(); |
1197 | | } |
1198 | | size_t revocable_mem_size(RuntimeState* state) const override { return _revocable_mem_size; } |
1199 | | size_t get_reserve_mem_size(RuntimeState* state, bool eos) override { |
1200 | | return _disable_reserve_mem |
1201 | | ? 0 |
1202 | | : DataSinkOperatorX<DummySinkLocalState>::get_reserve_mem_size(state, eos); |
1203 | | } |
1204 | | Status revoke_memory(RuntimeState* state) override { |
1205 | | _revoke_called = true; |
1206 | | return Status::OK(); |
1207 | | } |
1208 | | |
1209 | | private: |
1210 | | bool _low_memory_mode = false; |
1211 | | bool _terminated = false; |
1212 | | std::atomic_bool _return_eof = false; |
1213 | | size_t _revocable_mem_size = 0; |
1214 | | bool _disable_reserve_mem = false; |
1215 | | bool _revoke_called = false; |
1216 | | }; |
1217 | | #endif |
1218 | | |
1219 | | } // namespace doris |