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