Coverage Report

Created: 2026-03-17 16:40

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