Coverage Report

Created: 2026-05-09 13:49

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