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