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