Coverage Report

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