Coverage Report

Created: 2026-03-20 23:53

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
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
#include "exec/operator/operator.h"
19
20
#include "common/status.h"
21
#include "exec/common/util.hpp"
22
#include "exec/exchange/local_exchange_sink_operator.h"
23
#include "exec/exchange/local_exchange_source_operator.h"
24
#include "exec/operator/aggregation_sink_operator.h"
25
#include "exec/operator/aggregation_source_operator.h"
26
#include "exec/operator/analytic_sink_operator.h"
27
#include "exec/operator/analytic_source_operator.h"
28
#include "exec/operator/assert_num_rows_operator.h"
29
#include "exec/operator/blackhole_sink_operator.h"
30
#include "exec/operator/cache_sink_operator.h"
31
#include "exec/operator/cache_source_operator.h"
32
#include "exec/operator/datagen_operator.h"
33
#include "exec/operator/dict_sink_operator.h"
34
#include "exec/operator/distinct_streaming_aggregation_operator.h"
35
#include "exec/operator/empty_set_operator.h"
36
#include "exec/operator/es_scan_operator.h"
37
#include "exec/operator/exchange_sink_operator.h"
38
#include "exec/operator/exchange_source_operator.h"
39
#include "exec/operator/file_scan_operator.h"
40
#include "exec/operator/group_commit_block_sink_operator.h"
41
#include "exec/operator/group_commit_scan_operator.h"
42
#include "exec/operator/hashjoin_build_sink.h"
43
#include "exec/operator/hashjoin_probe_operator.h"
44
#include "exec/operator/hive_table_sink_operator.h"
45
#include "exec/operator/iceberg_table_sink_operator.h"
46
#include "exec/operator/jdbc_scan_operator.h"
47
#include "exec/operator/jdbc_table_sink_operator.h"
48
#include "exec/operator/local_merge_sort_source_operator.h"
49
#include "exec/operator/materialization_opertor.h"
50
#include "exec/operator/maxcompute_table_sink_operator.h"
51
#include "exec/operator/memory_scratch_sink_operator.h"
52
#include "exec/operator/meta_scan_operator.h"
53
#include "exec/operator/mock_operator.h"
54
#include "exec/operator/mock_scan_operator.h"
55
#include "exec/operator/multi_cast_data_stream_sink.h"
56
#include "exec/operator/multi_cast_data_stream_source.h"
57
#include "exec/operator/nested_loop_join_build_operator.h"
58
#include "exec/operator/nested_loop_join_probe_operator.h"
59
#include "exec/operator/olap_scan_operator.h"
60
#include "exec/operator/olap_table_sink_operator.h"
61
#include "exec/operator/olap_table_sink_v2_operator.h"
62
#include "exec/operator/partition_sort_sink_operator.h"
63
#include "exec/operator/partition_sort_source_operator.h"
64
#include "exec/operator/partitioned_aggregation_sink_operator.h"
65
#include "exec/operator/partitioned_aggregation_source_operator.h"
66
#include "exec/operator/partitioned_hash_join_probe_operator.h"
67
#include "exec/operator/partitioned_hash_join_sink_operator.h"
68
#include "exec/operator/rec_cte_anchor_sink_operator.h"
69
#include "exec/operator/rec_cte_scan_operator.h"
70
#include "exec/operator/rec_cte_sink_operator.h"
71
#include "exec/operator/rec_cte_source_operator.h"
72
#include "exec/operator/repeat_operator.h"
73
#include "exec/operator/result_file_sink_operator.h"
74
#include "exec/operator/result_sink_operator.h"
75
#include "exec/operator/schema_scan_operator.h"
76
#include "exec/operator/select_operator.h"
77
#include "exec/operator/set_probe_sink_operator.h"
78
#include "exec/operator/set_sink_operator.h"
79
#include "exec/operator/set_source_operator.h"
80
#include "exec/operator/sort_sink_operator.h"
81
#include "exec/operator/sort_source_operator.h"
82
#include "exec/operator/spill_iceberg_table_sink_operator.h"
83
#include "exec/operator/spill_sort_sink_operator.h"
84
#include "exec/operator/spill_sort_source_operator.h"
85
#include "exec/operator/streaming_aggregation_operator.h"
86
#include "exec/operator/table_function_operator.h"
87
#include "exec/operator/tvf_table_sink_operator.h"
88
#include "exec/operator/union_sink_operator.h"
89
#include "exec/operator/union_source_operator.h"
90
#include "exec/pipeline/dependency.h"
91
#include "exec/pipeline/pipeline.h"
92
#include "exprs/vexpr.h"
93
#include "exprs/vexpr_context.h"
94
#include "runtime/runtime_profile.h"
95
#include "runtime/runtime_profile_counter_names.h"
96
#include "util/debug_util.h"
97
#include "util/string_util.h"
98
99
namespace doris {
100
#include "common/compile_check_begin.h"
101
class RowDescriptor;
102
class RuntimeState;
103
} // namespace doris
104
105
namespace doris {
106
107
0
Status OperatorBase::close(RuntimeState* state) {
108
0
    if (_is_closed) {
109
0
        return Status::OK();
110
0
    }
111
0
    _is_closed = true;
112
0
    return Status::OK();
113
0
}
114
115
template <typename SharedStateArg>
116
24.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
24.2k
    if (_parent->nereids_id() == -1) {
118
208
        return fmt::format("(id={})", _parent->node_id());
119
24.0k
    } else {
120
24.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
24.0k
    }
122
24.2k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
24.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
24.0k
    if (_parent->nereids_id() == -1) {
118
0
        return fmt::format("(id={})", _parent->node_id());
119
24.0k
    } else {
120
24.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
24.0k
    }
122
24.0k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
1
    if (_parent->nereids_id() == -1) {
118
1
        return fmt::format("(id={})", _parent->node_id());
119
1
    } else {
120
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
0
    }
122
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
23
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
23
    if (_parent->nereids_id() == -1) {
118
12
        return fmt::format("(id={})", _parent->node_id());
119
12
    } else {
120
11
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
11
    }
122
23
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
11
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
11
    if (_parent->nereids_id() == -1) {
118
0
        return fmt::format("(id={})", _parent->node_id());
119
11
    } else {
120
11
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
11
    }
122
11
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
9
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
9
    if (_parent->nereids_id() == -1) {
118
9
        return fmt::format("(id={})", _parent->node_id());
119
9
    } else {
120
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
0
    }
122
9
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
37
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
37
    if (_parent->nereids_id() == -1) {
118
27
        return fmt::format("(id={})", _parent->node_id());
119
27
    } else {
120
10
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
10
    }
122
37
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
10
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
10
    if (_parent->nereids_id() == -1) {
118
0
        return fmt::format("(id={})", _parent->node_id());
119
10
    } else {
120
10
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
10
    }
122
10
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
48
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
48
    if (_parent->nereids_id() == -1) {
118
40
        return fmt::format("(id={})", _parent->node_id());
119
40
    } else {
120
8
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
8
    }
122
48
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
2
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
2
    if (_parent->nereids_id() == -1) {
118
2
        return fmt::format("(id={})", _parent->node_id());
119
2
    } else {
120
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
0
    }
122
2
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
3
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
3
    if (_parent->nereids_id() == -1) {
118
3
        return fmt::format("(id={})", _parent->node_id());
119
3
    } else {
120
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
0
    }
122
3
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
102
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
102
    if (_parent->nereids_id() == -1) {
118
102
        return fmt::format("(id={})", _parent->node_id());
119
102
    } else {
120
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
0
    }
122
102
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
116
12
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
117
12
    if (_parent->nereids_id() == -1) {
118
12
        return fmt::format("(id={})", _parent->node_id());
119
12
    } else {
120
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
121
0
    }
122
12
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
123
124
template <typename SharedStateArg>
125
72.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
72.3k
    if (_parent->nereids_id() == -1) {
127
196
        return fmt::format("(id={})", _parent->node_id());
128
72.1k
    } else {
129
72.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
72.1k
    }
131
72.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
72.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
72.0k
    if (_parent->nereids_id() == -1) {
127
0
        return fmt::format("(id={})", _parent->node_id());
128
72.0k
    } else {
129
72.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
72.0k
    }
131
72.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
2
    if (_parent->nereids_id() == -1) {
127
1
        return fmt::format("(id={})", _parent->node_id());
128
1
    } else {
129
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
1
    }
131
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
26
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
26
    if (_parent->nereids_id() == -1) {
127
9
        return fmt::format("(id={})", _parent->node_id());
128
17
    } else {
129
17
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
17
    }
131
26
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
17
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
17
    if (_parent->nereids_id() == -1) {
127
0
        return fmt::format("(id={})", _parent->node_id());
128
17
    } else {
129
17
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
17
    }
131
17
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
9
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
9
    if (_parent->nereids_id() == -1) {
127
9
        return fmt::format("(id={})", _parent->node_id());
128
9
    } else {
129
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
0
    }
131
9
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
47
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
47
    if (_parent->nereids_id() == -1) {
127
27
        return fmt::format("(id={})", _parent->node_id());
128
27
    } else {
129
20
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
20
    }
131
47
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
20
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
20
    if (_parent->nereids_id() == -1) {
127
0
        return fmt::format("(id={})", _parent->node_id());
128
20
    } else {
129
20
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
20
    }
131
20
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
3
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
3
    if (_parent->nereids_id() == -1) {
127
3
        return fmt::format("(id={})", _parent->node_id());
128
3
    } else {
129
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
0
    }
131
3
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
102
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
102
    if (_parent->nereids_id() == -1) {
127
102
        return fmt::format("(id={})", _parent->node_id());
128
102
    } else {
129
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
0
    }
131
102
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
27
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
27
    if (_parent->nereids_id() == -1) {
127
27
        return fmt::format("(id={})", _parent->node_id());
128
27
    } else {
129
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
0
    }
131
27
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
15
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
15
    if (_parent->nereids_id() == -1) {
127
15
        return fmt::format("(id={})", _parent->node_id());
128
15
    } else {
129
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
0
    }
131
15
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
125
3
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
126
3
    if (_parent->nereids_id() == -1) {
127
3
        return fmt::format("(id={})", _parent->node_id());
128
3
    } else {
129
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
130
0
    }
131
3
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
132
133
template <typename SharedStateArg>
134
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
135
24.0k
    if (_terminated) {
136
0
        return Status::OK();
137
0
    }
138
24.0k
    _terminated = true;
139
24.0k
    return Status::OK();
140
24.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
134
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
135
24.0k
    if (_terminated) {
136
0
        return Status::OK();
137
0
    }
138
24.0k
    _terminated = true;
139
24.0k
    return Status::OK();
140
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
141
142
5
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
143
5
    return _child && _child->is_serial_operator() && !is_source()
144
5
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
145
5
                   : DataDistribution(ExchangeType::NOOP);
146
5
}
147
148
72.0k
const RowDescriptor& OperatorBase::row_desc() const {
149
72.0k
    return _child->row_desc();
150
72.0k
}
151
152
template <typename SharedStateArg>
153
54.3k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
154
54.3k
    fmt::memory_buffer debug_string_buffer;
155
54.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
156
54.3k
    return fmt::to_string(debug_string_buffer);
157
54.3k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
153
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
154
3
    fmt::memory_buffer debug_string_buffer;
155
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
156
3
    return fmt::to_string(debug_string_buffer);
157
3
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
153
54.3k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
154
54.3k
    fmt::memory_buffer debug_string_buffer;
155
54.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
156
54.3k
    return fmt::to_string(debug_string_buffer);
157
54.3k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
158
159
template <typename SharedStateArg>
160
54.3k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
161
54.3k
    fmt::memory_buffer debug_string_buffer;
162
54.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
163
54.3k
    return fmt::to_string(debug_string_buffer);
164
54.3k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
160
54.3k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
161
54.3k
    fmt::memory_buffer debug_string_buffer;
162
54.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
163
54.3k
    return fmt::to_string(debug_string_buffer);
164
54.3k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
165
166
54.3k
std::string OperatorXBase::debug_string(int indentation_level) const {
167
54.3k
    fmt::memory_buffer debug_string_buffer;
168
54.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
169
54.3k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
170
54.3k
                   _is_serial_operator);
171
54.3k
    return fmt::to_string(debug_string_buffer);
172
54.3k
}
173
174
54.3k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
175
54.3k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
176
54.3k
}
177
178
24.1k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
179
24.1k
    std::string node_name = print_plan_node_type(tnode.node_type);
180
24.1k
    _nereids_id = tnode.nereids_id;
181
24.1k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
182
0
        if (!tnode.__isset.output_tuple_id) {
183
0
            return Status::InternalError("no final output tuple id");
184
0
        }
185
0
        if (tnode.intermediate_output_tuple_id_list.size() !=
186
0
            tnode.intermediate_projections_list.size()) {
187
0
            return Status::InternalError(
188
0
                    "intermediate_output_tuple_id_list size:{} not match "
189
0
                    "intermediate_projections_list size:{}",
190
0
                    tnode.intermediate_output_tuple_id_list.size(),
191
0
                    tnode.intermediate_projections_list.size());
192
0
        }
193
0
    }
194
24.1k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
195
24.1k
    _op_name = substr + "_OPERATOR";
196
197
24.1k
    if (tnode.__isset.vconjunct) {
198
0
        return Status::InternalError("vconjunct is not supported yet");
199
24.1k
    } else if (tnode.__isset.conjuncts) {
200
4
        for (const auto& conjunct : tnode.conjuncts) {
201
1
            VExprContextSPtr context;
202
1
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
203
1
            _conjuncts.emplace_back(context);
204
1
        }
205
4
    }
206
207
    // create the projections expr
208
24.1k
    if (tnode.__isset.projections) {
209
24.0k
        DCHECK(tnode.__isset.output_tuple_id);
210
24.0k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
211
24.0k
    }
212
24.1k
    if (!tnode.intermediate_projections_list.empty()) {
213
0
        DCHECK(tnode.__isset.projections) << "no final projections";
214
0
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
215
0
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
216
0
            VExprContextSPtrs projections;
217
0
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
218
0
            _intermediate_projections.push_back(projections);
219
0
        }
220
0
    }
221
24.1k
    return Status::OK();
222
24.1k
}
223
224
48.1k
Status OperatorXBase::prepare(RuntimeState* state) {
225
48.1k
    for (auto& conjunct : _conjuncts) {
226
0
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
227
0
    }
228
48.1k
    if (state->enable_adjust_conjunct_order_by_cost()) {
229
0
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
230
0
            return a->execute_cost() < b->execute_cost();
231
0
        });
232
0
    };
233
234
48.1k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
235
0
        RETURN_IF_ERROR(
236
0
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
237
0
    }
238
48.1k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
239
240
48.1k
    if (has_output_row_desc()) {
241
24.0k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
242
24.0k
    }
243
244
48.1k
    for (auto& conjunct : _conjuncts) {
245
0
        RETURN_IF_ERROR(conjunct->open(state));
246
0
    }
247
48.1k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
248
48.1k
    for (auto& projections : _intermediate_projections) {
249
0
        RETURN_IF_ERROR(VExpr::open(projections, state));
250
0
    }
251
48.1k
    if (_child && !is_source()) {
252
24.0k
        RETURN_IF_ERROR(_child->prepare(state));
253
24.0k
    }
254
255
48.1k
    if (VExpr::contains_blockable_function(_conjuncts) ||
256
48.1k
        VExpr::contains_blockable_function(_projections)) {
257
0
        _blockable = true;
258
0
    }
259
260
48.1k
    return Status::OK();
261
48.1k
}
262
263
0
Status OperatorXBase::terminate(RuntimeState* state) {
264
0
    if (_child && !is_source()) {
265
0
        RETURN_IF_ERROR(_child->terminate(state));
266
0
    }
267
0
    auto result = state->get_local_state_result(operator_id());
268
0
    if (!result) {
269
0
        return result.error();
270
0
    }
271
0
    return result.value()->terminate(state);
272
0
}
273
274
24.0k
Status OperatorXBase::close(RuntimeState* state) {
275
24.0k
    if (_child && !is_source()) {
276
24.0k
        RETURN_IF_ERROR(_child->close(state));
277
24.0k
    }
278
24.0k
    auto result = state->get_local_state_result(operator_id());
279
24.0k
    if (!result) {
280
0
        return result.error();
281
0
    }
282
24.0k
    return result.value()->close(state);
283
24.0k
}
284
285
35
void PipelineXLocalStateBase::clear_origin_block() {
286
35
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
287
35
}
288
289
134
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
290
134
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
291
292
134
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
293
134
    return Status::OK();
294
134
}
295
296
0
bool PipelineXLocalStateBase::is_blockable() const {
297
0
    return std::any_of(_projections.begin(), _projections.end(),
298
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
299
0
}
300
301
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
302
35
                                     Block* output_block) const {
303
35
    auto* local_state = state->get_local_state(operator_id());
304
35
    SCOPED_TIMER(local_state->exec_time_counter());
305
35
    SCOPED_TIMER(local_state->_projection_timer);
306
35
    const size_t rows = origin_block->rows();
307
35
    if (rows == 0) {
308
13
        return Status::OK();
309
13
    }
310
22
    Block input_block = *origin_block;
311
312
22
    size_t bytes_usage = 0;
313
22
    ColumnsWithTypeAndName new_columns;
314
22
    for (const auto& projections : local_state->_intermediate_projections) {
315
0
        if (projections.empty()) {
316
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
317
0
                                         node_id());
318
0
        }
319
0
        new_columns.resize(projections.size());
320
0
        for (int i = 0; i < projections.size(); i++) {
321
0
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
322
0
            if (new_columns[i].column->size() != rows) {
323
0
                return Status::InternalError(
324
0
                        "intermediate projection result column size {} not equal input rows {}, "
325
0
                        "expr: {}",
326
0
                        new_columns[i].column->size(), rows,
327
0
                        projections[i]->root()->debug_string());
328
0
            }
329
0
        }
330
0
        Block tmp_block {new_columns};
331
0
        bytes_usage += tmp_block.allocated_bytes();
332
0
        input_block.swap(tmp_block);
333
0
    }
334
335
22
    if (input_block.rows() != rows) {
336
0
        return Status::InternalError(
337
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
338
0
                "input_block: {}",
339
0
                input_block.rows(), rows, input_block.dump_structure());
340
0
    }
341
72
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
342
72
        if (to->is_nullable() && !from->is_nullable()) {
343
0
            if (_keep_origin || !from->is_exclusive()) {
344
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
345
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
346
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
347
0
                bytes_usage += null_column.allocated_bytes();
348
0
            } else {
349
0
                to = make_nullable(from, false)->assume_mutable();
350
0
            }
351
72
        } else {
352
72
            if (_keep_origin || !from->is_exclusive()) {
353
72
                to->insert_range_from(*from, 0, rows);
354
72
                bytes_usage += from->allocated_bytes();
355
72
            } else {
356
0
                to = from->assume_mutable();
357
0
            }
358
72
        }
359
72
    };
360
361
22
    MutableBlock mutable_block =
362
22
            VectorizedUtils::build_mutable_mem_reuse_block(output_block, *_output_row_descriptor);
363
22
    if (rows != 0) {
364
22
        auto& mutable_columns = mutable_block.mutable_columns();
365
22
        const size_t origin_columns_count = input_block.columns();
366
22
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
367
94
        for (int i = 0; i < mutable_columns.size(); ++i) {
368
72
            auto result_column_id = -1;
369
72
            ColumnPtr column_ptr;
370
72
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
371
72
            if (column_ptr->size() != rows) {
372
0
                return Status::InternalError(
373
0
                        "projection result column size {} not equal input rows {}, expr: {}",
374
0
                        column_ptr->size(), rows,
375
0
                        local_state->_projections[i]->root()->debug_string());
376
0
            }
377
72
            column_ptr = column_ptr->convert_to_full_column_if_const();
378
72
            if (result_column_id >= origin_columns_count) {
379
72
                bytes_usage += column_ptr->allocated_bytes();
380
72
            }
381
72
            insert_column_datas(mutable_columns[i], column_ptr, rows);
382
72
        }
383
22
        DCHECK(mutable_block.rows() == rows);
384
22
        output_block->set_columns(std::move(mutable_columns));
385
22
    }
386
387
22
    local_state->_estimate_memory_usage += bytes_usage;
388
389
22
    return Status::OK();
390
22
}
391
392
906k
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
393
906k
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
394
906k
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
395
906k
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
396
906k
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
397
906k
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
398
906k
            if (_debug_point_count++ % 2 == 0) {
399
906k
                return Status::OK();
400
906k
            }
401
906k
        }
402
906k
    });
403
404
906k
    Status status;
405
906k
    auto* local_state = state->get_local_state(operator_id());
406
906k
    Defer defer([&]() {
407
906k
        if (status.ok()) {
408
906k
            if (auto rows = block->rows()) {
409
34
                COUNTER_UPDATE(local_state->_rows_returned_counter, rows);
410
34
                COUNTER_UPDATE(local_state->_blocks_returned_counter, 1);
411
34
            }
412
906k
        }
413
906k
    });
414
906k
    if (_output_row_descriptor) {
415
35
        local_state->clear_origin_block();
416
35
        status = get_block(state, &local_state->_origin_block, eos);
417
35
        if (UNLIKELY(!status.ok())) {
418
0
            return status;
419
0
        }
420
35
        status = do_projections(state, &local_state->_origin_block, block);
421
35
        return status;
422
35
    }
423
906k
    status = get_block(state, block, eos);
424
906k
    RETURN_IF_ERROR(block->check_type_and_column());
425
906k
    return status;
426
906k
}
427
428
1.07k
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
429
1.07k
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
430
0
        block->set_num_rows(_parent->_limit - _num_rows_returned);
431
0
        *eos = true;
432
0
    }
433
434
1.07k
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
435
1.07k
        auto op_name = to_lower(_parent->_op_name);
436
1.07k
        auto arg_op_name = dp->param<std::string>("op_name");
437
1.07k
        arg_op_name = to_lower(arg_op_name);
438
439
1.07k
        if (op_name == arg_op_name) {
440
1.07k
            *eos = true;
441
1.07k
        }
442
1.07k
    });
443
444
1.07k
    if (auto rows = block->rows()) {
445
1.02k
        _num_rows_returned += rows;
446
1.02k
    }
447
1.07k
}
448
449
24.0k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
450
24.0k
    auto result = state->get_sink_local_state_result();
451
24.0k
    if (!result) {
452
0
        return result.error();
453
0
    }
454
24.0k
    return result.value()->terminate(state);
455
24.0k
}
456
457
54.3k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
458
54.3k
    fmt::memory_buffer debug_string_buffer;
459
460
54.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
461
54.3k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
462
54.3k
    return fmt::to_string(debug_string_buffer);
463
54.3k
}
464
465
54.3k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
466
54.3k
    return state->get_sink_local_state()->debug_string(indentation_level);
467
54.3k
}
468
469
3
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
470
3
    std::string op_name = "UNKNOWN_SINK";
471
3
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
472
473
3
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
474
3
        op_name = it->second;
475
3
    }
476
3
    _name = op_name + "_OPERATOR";
477
3
    return Status::OK();
478
3
}
479
480
72.1k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
481
72.1k
    std::string op_name = print_plan_node_type(tnode.node_type);
482
72.1k
    _nereids_id = tnode.nereids_id;
483
72.1k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
484
72.1k
    _name = substr + "_SINK_OPERATOR";
485
72.1k
    return Status::OK();
486
72.1k
}
487
488
template <typename LocalStateType>
489
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
490
72.1k
                                                            LocalSinkStateInfo& info) {
491
72.1k
    auto local_state = LocalStateType::create_unique(this, state);
492
72.1k
    RETURN_IF_ERROR(local_state->init(state, info));
493
72.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
72.1k
    return Status::OK();
495
72.1k
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
72.0k
                                                            LocalSinkStateInfo& info) {
491
72.0k
    auto local_state = LocalStateType::create_unique(this, state);
492
72.0k
    RETURN_IF_ERROR(local_state->init(state, info));
493
72.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
72.0k
    return Status::OK();
495
72.0k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
17
                                                            LocalSinkStateInfo& info) {
491
17
    auto local_state = LocalStateType::create_unique(this, state);
492
17
    RETURN_IF_ERROR(local_state->init(state, info));
493
17
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
17
    return Status::OK();
495
17
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
17
                                                            LocalSinkStateInfo& info) {
491
17
    auto local_state = LocalStateType::create_unique(this, state);
492
17
    RETURN_IF_ERROR(local_state->init(state, info));
493
17
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
17
    return Status::OK();
495
17
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
20
                                                            LocalSinkStateInfo& info) {
491
20
    auto local_state = LocalStateType::create_unique(this, state);
492
20
    RETURN_IF_ERROR(local_state->init(state, info));
493
20
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
20
    return Status::OK();
495
20
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
20
                                                            LocalSinkStateInfo& info) {
491
20
    auto local_state = LocalStateType::create_unique(this, state);
492
20
    RETURN_IF_ERROR(local_state->init(state, info));
493
20
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
20
    return Status::OK();
495
20
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
3
                                                            LocalSinkStateInfo& info) {
491
3
    auto local_state = LocalStateType::create_unique(this, state);
492
3
    RETURN_IF_ERROR(local_state->init(state, info));
493
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
3
    return Status::OK();
495
3
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
1
                                                            LocalSinkStateInfo& info) {
491
1
    auto local_state = LocalStateType::create_unique(this, state);
492
1
    RETURN_IF_ERROR(local_state->init(state, info));
493
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
1
    return Status::OK();
495
1
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_19DummySinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
490
15
                                                            LocalSinkStateInfo& info) {
491
15
    auto local_state = LocalStateType::create_unique(this, state);
492
15
    RETURN_IF_ERROR(local_state->init(state, info));
493
15
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
494
15
    return Status::OK();
495
15
}
496
497
template <typename LocalStateType>
498
72.3k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
0
                                 LocalExchangeSharedState>) {
501
0
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
0
                                        MultiCastSharedState>) {
504
0
        throw Exception(Status::FatalError("should not reach here!"));
505
72.3k
    } else {
506
72.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
507
72.3k
        ss->id = operator_id();
508
72.3k
        for (auto& dest : dests_id()) {
509
72.3k
            ss->related_op_ids.insert(dest);
510
72.3k
        }
511
72.3k
        return ss;
512
72.3k
    }
513
72.3k
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
72.0k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
72.0k
    } else {
506
72.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
507
72.0k
        ss->id = operator_id();
508
72.0k
        for (auto& dest : dests_id()) {
509
72.0k
            ss->related_op_ids.insert(dest);
510
72.0k
        }
511
72.0k
        return ss;
512
72.0k
    }
513
72.0k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
9
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
9
    } else {
506
9
        auto ss = LocalStateType::SharedStateType::create_shared();
507
9
        ss->id = operator_id();
508
9
        for (auto& dest : dests_id()) {
509
9
            ss->related_op_ids.insert(dest);
510
9
        }
511
9
        return ss;
512
9
    }
513
9
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
26
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
26
    } else {
506
26
        auto ss = LocalStateType::SharedStateType::create_shared();
507
26
        ss->id = operator_id();
508
26
        for (auto& dest : dests_id()) {
509
26
            ss->related_op_ids.insert(dest);
510
26
        }
511
26
        return ss;
512
26
    }
513
26
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
19
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
19
    } else {
506
19
        auto ss = LocalStateType::SharedStateType::create_shared();
507
19
        ss->id = operator_id();
508
19
        for (auto& dest : dests_id()) {
509
19
            ss->related_op_ids.insert(dest);
510
19
        }
511
19
        return ss;
512
19
    }
513
19
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
47
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
47
    } else {
506
47
        auto ss = LocalStateType::SharedStateType::create_shared();
507
47
        ss->id = operator_id();
508
47
        for (auto& dest : dests_id()) {
509
47
            ss->related_op_ids.insert(dest);
510
47
        }
511
47
        return ss;
512
47
    }
513
47
}
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
19
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
19
    } else {
506
19
        auto ss = LocalStateType::SharedStateType::create_shared();
507
19
        ss->id = operator_id();
508
19
        for (auto& dest : dests_id()) {
509
19
            ss->related_op_ids.insert(dest);
510
19
        }
511
19
        return ss;
512
19
    }
513
19
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
3
    } else {
506
3
        auto ss = LocalStateType::SharedStateType::create_shared();
507
3
        ss->id = operator_id();
508
3
        for (auto& dest : dests_id()) {
509
3
            ss->related_op_ids.insert(dest);
510
3
        }
511
3
        return ss;
512
3
    }
513
3
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
102
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
102
    } else {
506
102
        auto ss = LocalStateType::SharedStateType::create_shared();
507
102
        ss->id = operator_id();
508
102
        for (auto& dest : dests_id()) {
509
102
            ss->related_op_ids.insert(dest);
510
102
        }
511
102
        return ss;
512
102
    }
513
102
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
498
7
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
7
    } else {
506
7
        auto ss = LocalStateType::SharedStateType::create_shared();
507
7
        ss->id = operator_id();
508
7
        for (auto& dest : dests_id()) {
509
7
            ss->related_op_ids.insert(dest);
510
7
        }
511
7
        return ss;
512
7
    }
513
7
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
498
5
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
5
    } else {
506
5
        auto ss = LocalStateType::SharedStateType::create_shared();
507
5
        ss->id = operator_id();
508
5
        for (auto& dest : dests_id()) {
509
5
            ss->related_op_ids.insert(dest);
510
5
        }
511
5
        return ss;
512
5
    }
513
5
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_19DummySinkLocalStateEE19create_shared_stateEv
Line
Count
Source
498
18
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
499
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
500
                                 LocalExchangeSharedState>) {
501
        return nullptr;
502
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                        MultiCastSharedState>) {
504
        throw Exception(Status::FatalError("should not reach here!"));
505
18
    } else {
506
18
        auto ss = LocalStateType::SharedStateType::create_shared();
507
18
        ss->id = operator_id();
508
18
        for (auto& dest : dests_id()) {
509
18
            ss->related_op_ids.insert(dest);
510
18
        }
511
18
        return ss;
512
18
    }
513
18
}
514
515
template <typename LocalStateType>
516
24.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
24.1k
    auto local_state = LocalStateType::create_unique(state, this);
518
24.1k
    RETURN_IF_ERROR(local_state->init(state, info));
519
24.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
24.1k
    return Status::OK();
521
24.1k
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
24.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
24.0k
    auto local_state = LocalStateType::create_unique(state, this);
518
24.0k
    RETURN_IF_ERROR(local_state->init(state, info));
519
24.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
520
24.0k
    return Status::OK();
521
24.0k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_16EsScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
11
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
11
    auto local_state = LocalStateType::create_unique(state, this);
518
11
    RETURN_IF_ERROR(local_state->init(state, info));
519
11
    state->emplace_local_state(operator_id(), std::move(local_state));
520
11
    return Status::OK();
521
11
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
11
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
11
    auto local_state = LocalStateType::create_unique(state, this);
518
11
    RETURN_IF_ERROR(local_state->init(state, info));
519
11
    state->emplace_local_state(operator_id(), std::move(local_state));
520
11
    return Status::OK();
521
11
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
10
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
10
    auto local_state = LocalStateType::create_unique(state, this);
518
10
    RETURN_IF_ERROR(local_state->init(state, info));
519
10
    state->emplace_local_state(operator_id(), std::move(local_state));
520
10
    return Status::OK();
521
10
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
10
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
10
    auto local_state = LocalStateType::create_unique(state, this);
518
10
    RETURN_IF_ERROR(local_state->init(state, info));
519
10
    state->emplace_local_state(operator_id(), std::move(local_state));
520
10
    return Status::OK();
521
10
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
2
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
2
    auto local_state = LocalStateType::create_unique(state, this);
518
2
    RETURN_IF_ERROR(local_state->init(state, info));
519
2
    state->emplace_local_state(operator_id(), std::move(local_state));
520
2
    return Status::OK();
521
2
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
5
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
5
    auto local_state = LocalStateType::create_unique(state, this);
518
5
    RETURN_IF_ERROR(local_state->init(state, info));
519
5
    state->emplace_local_state(operator_id(), std::move(local_state));
520
5
    return Status::OK();
521
5
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
3
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
3
    auto local_state = LocalStateType::create_unique(state, this);
518
3
    RETURN_IF_ERROR(local_state->init(state, info));
519
3
    state->emplace_local_state(operator_id(), std::move(local_state));
520
3
    return Status::OK();
521
3
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
1
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
1
    auto local_state = LocalStateType::create_unique(state, this);
518
1
    RETURN_IF_ERROR(local_state->init(state, info));
519
1
    state->emplace_local_state(operator_id(), std::move(local_state));
520
1
    return Status::OK();
521
1
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
3
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
3
    auto local_state = LocalStateType::create_unique(state, this);
518
3
    RETURN_IF_ERROR(local_state->init(state, info));
519
3
    state->emplace_local_state(operator_id(), std::move(local_state));
520
3
    return Status::OK();
521
3
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_14MockLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_18MockScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_23DummyOperatorLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
516
15
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
517
15
    auto local_state = LocalStateType::create_unique(state, this);
518
15
    RETURN_IF_ERROR(local_state->init(state, info));
519
15
    state->emplace_local_state(operator_id(), std::move(local_state));
520
15
    return Status::OK();
521
15
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
522
523
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
524
                                                         RuntimeState* state)
525
72.3k
        : _parent(parent), _state(state) {}
526
527
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
528
24.4k
        : _num_rows_returned(0), _rows_returned_counter(nullptr), _parent(parent), _state(state) {}
529
530
template <typename SharedStateArg>
531
24.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
24.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
24.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
24.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
24.2k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
24.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
24.2k
    _operator_profile->add_child(_common_profile.get(), true);
540
24.2k
    _operator_profile->add_child(_custom_profile.get(), true);
541
24.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
24.2k
    if constexpr (!is_fake_shared) {
543
24.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
24.2k
        } else if (info.shared_state) {
552
24.2k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
0
                DCHECK(false);
554
0
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
24.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
24.2k
            _dependency = _shared_state->create_source_dependency(
559
24.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
24.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
24.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
24.2k
        } else {
563
1
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
0
                DCHECK(false);
565
0
            }
566
1
        }
567
24.2k
    }
568
569
24.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
24.2k
    _rows_returned_counter =
574
24.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
24.2k
    _blocks_returned_counter =
576
24.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
24.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
24.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
24.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
24.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
24.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
24.2k
    _memory_used_counter =
583
24.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
24.2k
    _common_profile->add_info_string("IsColocate",
585
24.2k
                                     std::to_string(_parent->is_colocated_operator()));
586
24.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
24.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
24.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
24.2k
    return Status::OK();
590
24.2k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
24.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
24.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
24.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
24.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
24.0k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
24.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
24.0k
    _operator_profile->add_child(_common_profile.get(), true);
540
24.0k
    _operator_profile->add_child(_custom_profile.get(), true);
541
24.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
24.0k
    if constexpr (!is_fake_shared) {
543
24.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
24.0k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
24.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
24.0k
            _dependency = _shared_state->create_source_dependency(
559
24.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
24.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
24.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
24.0k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
24.0k
    }
568
569
24.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
24.0k
    _rows_returned_counter =
574
24.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
24.0k
    _blocks_returned_counter =
576
24.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
24.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
24.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
24.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
24.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
24.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
24.0k
    _memory_used_counter =
583
24.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
24.0k
    _common_profile->add_info_string("IsColocate",
585
24.0k
                                     std::to_string(_parent->is_colocated_operator()));
586
24.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
24.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
24.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
24.0k
    return Status::OK();
590
24.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
1
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
1
    _operator_profile->add_child(_common_profile.get(), true);
540
1
    _operator_profile->add_child(_custom_profile.get(), true);
541
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
1
    if constexpr (!is_fake_shared) {
543
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
1
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
1
            _dependency = _shared_state->create_source_dependency(
559
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
1
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
1
    }
568
569
1
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
1
    _rows_returned_counter =
574
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
1
    _blocks_returned_counter =
576
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
1
    _memory_used_counter =
583
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
1
    _common_profile->add_info_string("IsColocate",
585
1
                                     std::to_string(_parent->is_colocated_operator()));
586
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
1
    return Status::OK();
590
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
23
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
23
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
23
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
23
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
23
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
23
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
23
    _operator_profile->add_child(_common_profile.get(), true);
540
23
    _operator_profile->add_child(_custom_profile.get(), true);
541
23
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
23
    if constexpr (!is_fake_shared) {
543
23
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
23
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
23
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
23
            _dependency = _shared_state->create_source_dependency(
559
23
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
23
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
23
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
23
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
23
    }
568
569
23
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
23
    _rows_returned_counter =
574
23
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
23
    _blocks_returned_counter =
576
23
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
23
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
23
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
23
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
23
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
23
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
23
    _memory_used_counter =
583
23
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
23
    _common_profile->add_info_string("IsColocate",
585
23
                                     std::to_string(_parent->is_colocated_operator()));
586
23
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
23
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
23
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
23
    return Status::OK();
590
23
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
11
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
11
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
11
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
11
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
11
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
11
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
11
    _operator_profile->add_child(_common_profile.get(), true);
540
11
    _operator_profile->add_child(_custom_profile.get(), true);
541
11
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
11
    if constexpr (!is_fake_shared) {
543
11
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
11
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
11
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
11
            _dependency = _shared_state->create_source_dependency(
559
11
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
11
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
11
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
11
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
11
    }
568
569
11
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
11
    _rows_returned_counter =
574
11
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
11
    _blocks_returned_counter =
576
11
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
11
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
11
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
11
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
11
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
11
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
11
    _memory_used_counter =
583
11
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
11
    _common_profile->add_info_string("IsColocate",
585
11
                                     std::to_string(_parent->is_colocated_operator()));
586
11
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
11
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
11
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
11
    return Status::OK();
590
11
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
9
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
9
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
9
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
9
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
9
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
9
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
9
    _operator_profile->add_child(_common_profile.get(), true);
540
9
    _operator_profile->add_child(_custom_profile.get(), true);
541
9
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
9
    if constexpr (!is_fake_shared) {
543
9
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
9
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
9
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
9
            _dependency = _shared_state->create_source_dependency(
559
9
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
9
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
9
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
9
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
9
    }
568
569
9
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
9
    _rows_returned_counter =
574
9
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
9
    _blocks_returned_counter =
576
9
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
9
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
9
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
9
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
9
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
9
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
9
    _memory_used_counter =
583
9
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
9
    _common_profile->add_info_string("IsColocate",
585
9
                                     std::to_string(_parent->is_colocated_operator()));
586
9
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
9
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
9
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
9
    return Status::OK();
590
9
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
37
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
37
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
37
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
37
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
37
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
37
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
37
    _operator_profile->add_child(_common_profile.get(), true);
540
37
    _operator_profile->add_child(_custom_profile.get(), true);
541
37
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
37
    if constexpr (!is_fake_shared) {
543
37
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
37
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
37
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
37
            _dependency = _shared_state->create_source_dependency(
559
37
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
37
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
37
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
37
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
37
    }
568
569
37
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
37
    _rows_returned_counter =
574
37
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
37
    _blocks_returned_counter =
576
37
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
37
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
37
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
37
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
37
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
37
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
37
    _memory_used_counter =
583
37
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
37
    _common_profile->add_info_string("IsColocate",
585
37
                                     std::to_string(_parent->is_colocated_operator()));
586
37
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
37
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
37
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
37
    return Status::OK();
590
37
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
10
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
10
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
10
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
10
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
10
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
10
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
10
    _operator_profile->add_child(_common_profile.get(), true);
540
10
    _operator_profile->add_child(_custom_profile.get(), true);
541
10
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
10
    if constexpr (!is_fake_shared) {
543
10
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
10
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
10
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
10
            _dependency = _shared_state->create_source_dependency(
559
10
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
10
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
10
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
10
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
10
    }
568
569
10
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
10
    _rows_returned_counter =
574
10
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
10
    _blocks_returned_counter =
576
10
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
10
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
10
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
10
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
10
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
10
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
10
    _memory_used_counter =
583
10
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
10
    _common_profile->add_info_string("IsColocate",
585
10
                                     std::to_string(_parent->is_colocated_operator()));
586
10
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
10
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
10
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
10
    return Status::OK();
590
10
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
48
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
48
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
48
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
48
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
48
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
48
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
48
    _operator_profile->add_child(_common_profile.get(), true);
540
48
    _operator_profile->add_child(_custom_profile.get(), true);
541
48
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
    if constexpr (!is_fake_shared) {
543
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
                                    .first.get()
546
                                    ->template cast<SharedStateArg>();
547
548
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
            _dependency = _shared_state->create_source_dependency(
559
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
        }
567
    }
568
569
48
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
48
    _rows_returned_counter =
574
48
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
48
    _blocks_returned_counter =
576
48
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
48
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
48
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
48
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
48
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
48
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
48
    _memory_used_counter =
583
48
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
48
    _common_profile->add_info_string("IsColocate",
585
48
                                     std::to_string(_parent->is_colocated_operator()));
586
48
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
48
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
48
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
48
    return Status::OK();
590
48
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
2
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
2
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
2
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
2
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
2
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
2
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
2
    _operator_profile->add_child(_common_profile.get(), true);
540
2
    _operator_profile->add_child(_custom_profile.get(), true);
541
2
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
2
    if constexpr (!is_fake_shared) {
543
2
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
2
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
1
            _dependency = _shared_state->create_source_dependency(
559
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
1
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
1
        }
567
2
    }
568
569
2
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
2
    _rows_returned_counter =
574
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
2
    _blocks_returned_counter =
576
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
2
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
2
    _memory_used_counter =
583
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
2
    _common_profile->add_info_string("IsColocate",
585
2
                                     std::to_string(_parent->is_colocated_operator()));
586
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
2
    return Status::OK();
590
2
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
3
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
3
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
3
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
3
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
3
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
3
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
3
    _operator_profile->add_child(_common_profile.get(), true);
540
3
    _operator_profile->add_child(_custom_profile.get(), true);
541
3
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
3
    if constexpr (!is_fake_shared) {
543
3
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
3
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
3
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
3
            _dependency = _shared_state->create_source_dependency(
559
3
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
3
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
3
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
3
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
3
    }
568
569
3
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
3
    _rows_returned_counter =
574
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
3
    _blocks_returned_counter =
576
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
3
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
3
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
3
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
3
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
3
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
3
    _memory_used_counter =
583
3
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
3
    _common_profile->add_info_string("IsColocate",
585
3
                                     std::to_string(_parent->is_colocated_operator()));
586
3
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
3
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
3
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
3
    return Status::OK();
590
3
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
102
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
102
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
102
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
102
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
102
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
102
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
102
    _operator_profile->add_child(_common_profile.get(), true);
540
102
    _operator_profile->add_child(_custom_profile.get(), true);
541
102
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
102
    if constexpr (!is_fake_shared) {
543
102
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
102
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
102
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
102
            _dependency = _shared_state->create_source_dependency(
559
102
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
102
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
102
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
102
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
102
    }
568
569
102
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
102
    _rows_returned_counter =
574
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
102
    _blocks_returned_counter =
576
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
102
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
102
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
102
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
102
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
102
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
102
    _memory_used_counter =
583
102
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
102
    _common_profile->add_info_string("IsColocate",
585
102
                                     std::to_string(_parent->is_colocated_operator()));
586
102
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
102
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
102
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
102
    return Status::OK();
590
102
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
12
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
12
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
12
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
12
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
12
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
12
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
12
    _operator_profile->add_child(_common_profile.get(), true);
540
12
    _operator_profile->add_child(_custom_profile.get(), true);
541
12
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
12
    if constexpr (!is_fake_shared) {
543
12
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
12
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
12
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
12
            _dependency = _shared_state->create_source_dependency(
559
12
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
12
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
12
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
12
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
12
    }
568
569
12
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
12
    _rows_returned_counter =
574
12
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
12
    _blocks_returned_counter =
576
12
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
12
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
578
12
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
579
12
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
580
12
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
581
12
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
582
12
    _memory_used_counter =
583
12
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
584
12
    _common_profile->add_info_string("IsColocate",
585
12
                                     std::to_string(_parent->is_colocated_operator()));
586
12
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
587
12
    _common_profile->add_info_string("FollowedByShuffledOperator",
588
12
                                     std::to_string(_parent->followed_by_shuffled_operator()));
589
12
    return Status::OK();
590
12
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
591
592
template <typename SharedStateArg>
593
24.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
24.2k
    _conjuncts.resize(_parent->_conjuncts.size());
595
24.2k
    _projections.resize(_parent->_projections.size());
596
24.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
90.2k
    for (size_t i = 0; i < _projections.size(); i++) {
600
65.9k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
65.9k
    }
602
24.2k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
24.2k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
24.2k
    return Status::OK();
611
24.2k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
24.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
24.0k
    _conjuncts.resize(_parent->_conjuncts.size());
595
24.0k
    _projections.resize(_parent->_projections.size());
596
24.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
89.9k
    for (size_t i = 0; i < _projections.size(); i++) {
600
65.9k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
65.9k
    }
602
24.0k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
24.0k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
24.0k
    return Status::OK();
611
24.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
3
    _conjuncts.resize(_parent->_conjuncts.size());
595
3
    _projections.resize(_parent->_projections.size());
596
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
3
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
3
    return Status::OK();
611
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
20
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
20
    _conjuncts.resize(_parent->_conjuncts.size());
595
20
    _projections.resize(_parent->_projections.size());
596
20
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
20
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
20
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
20
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
20
    return Status::OK();
611
20
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
11
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
11
    _conjuncts.resize(_parent->_conjuncts.size());
595
11
    _projections.resize(_parent->_projections.size());
596
11
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
11
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
11
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
11
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
11
    return Status::OK();
611
11
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
9
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
9
    _conjuncts.resize(_parent->_conjuncts.size());
595
9
    _projections.resize(_parent->_projections.size());
596
9
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
9
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
9
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
9
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
9
    return Status::OK();
611
9
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
37
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
37
    _conjuncts.resize(_parent->_conjuncts.size());
595
37
    _projections.resize(_parent->_projections.size());
596
37
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
37
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
37
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
37
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
37
    return Status::OK();
611
37
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
14
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
14
    _conjuncts.resize(_parent->_conjuncts.size());
595
14
    _projections.resize(_parent->_projections.size());
596
14
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
14
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
14
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
14
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
14
    return Status::OK();
611
14
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
31
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
31
    _conjuncts.resize(_parent->_conjuncts.size());
595
31
    _projections.resize(_parent->_projections.size());
596
31
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
31
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
31
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
31
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
31
    return Status::OK();
611
31
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
2
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
2
    _conjuncts.resize(_parent->_conjuncts.size());
595
2
    _projections.resize(_parent->_projections.size());
596
2
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
2
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
2
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
2
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
2
    return Status::OK();
611
2
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
3
    _conjuncts.resize(_parent->_conjuncts.size());
595
3
    _projections.resize(_parent->_projections.size());
596
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
3
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
3
    return Status::OK();
611
3
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
102
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
102
    _conjuncts.resize(_parent->_conjuncts.size());
595
102
    _projections.resize(_parent->_projections.size());
596
102
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
102
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
102
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
102
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
102
    return Status::OK();
611
102
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
593
12
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
594
12
    _conjuncts.resize(_parent->_conjuncts.size());
595
12
    _projections.resize(_parent->_projections.size());
596
12
    for (size_t i = 0; i < _conjuncts.size(); i++) {
597
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
598
0
    }
599
12
    for (size_t i = 0; i < _projections.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
601
0
    }
602
12
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
603
12
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
604
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
605
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
606
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
607
0
                    state, _intermediate_projections[i][j]));
608
0
        }
609
0
    }
610
12
    return Status::OK();
611
12
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
612
613
template <typename SharedStateArg>
614
0
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
615
0
    if (_terminated) {
616
0
        return Status::OK();
617
0
    }
618
0
    _terminated = true;
619
0
    return Status::OK();
620
0
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
621
622
template <typename SharedStateArg>
623
24.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
24.0k
    if (_closed) {
625
1
        return Status::OK();
626
1
    }
627
24.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
24.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
24.0k
    }
630
24.0k
    _closed = true;
631
24.0k
    return Status::OK();
632
24.0k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
24.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
24.0k
    if (_closed) {
625
0
        return Status::OK();
626
0
    }
627
24.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
24.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
24.0k
    }
630
24.0k
    _closed = true;
631
24.0k
    return Status::OK();
632
24.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
3
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
3
    if (_closed) {
625
0
        return Status::OK();
626
0
    }
627
3
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
3
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
3
    }
630
3
    _closed = true;
631
3
    return Status::OK();
632
3
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
11
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
11
    if (_closed) {
625
0
        return Status::OK();
626
0
    }
627
11
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
11
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
11
    }
630
11
    _closed = true;
631
11
    return Status::OK();
632
11
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
1
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
1
    if (_closed) {
625
0
        return Status::OK();
626
0
    }
627
1
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
1
    }
630
1
    _closed = true;
631
1
    return Status::OK();
632
1
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
9
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
9
    if (_closed) {
625
0
        return Status::OK();
626
0
    }
627
9
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
9
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
9
    }
630
9
    _closed = true;
631
9
    return Status::OK();
632
9
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
623
20
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
624
20
    if (_closed) {
625
1
        return Status::OK();
626
1
    }
627
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
628
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
629
    }
630
19
    _closed = true;
631
19
    return Status::OK();
632
20
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
633
634
template <typename SharedState>
635
72.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
72.3k
    _operator_profile =
638
72.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
72.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
72.3k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
72.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
72.3k
    _operator_profile->add_child(_common_profile, true);
647
72.3k
    _operator_profile->add_child(_custom_profile, true);
648
649
72.3k
    _operator_profile->set_metadata(_parent->node_id());
650
72.3k
    _wait_for_finish_dependency_timer =
651
72.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
72.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
72.3k
    if constexpr (!is_fake_shared) {
654
72.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
72.3k
            info.shared_state_map.end()) {
656
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
0
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
0
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
72.3k
        } else {
666
72.3k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
0
                DCHECK(false);
668
0
            }
669
72.3k
            _shared_state = info.shared_state->template cast<SharedState>();
670
72.3k
            _dependency = _shared_state->create_sink_dependency(
671
72.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
72.3k
        }
673
72.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
72.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
72.3k
    }
676
677
72.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
72.3k
    _rows_input_counter =
682
72.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
72.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
72.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
72.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
72.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
72.3k
    _memory_used_counter =
688
72.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
72.3k
    _common_profile->add_info_string("IsColocate",
690
72.3k
                                     std::to_string(_parent->is_colocated_operator()));
691
72.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
72.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
72.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
72.3k
    return Status::OK();
695
72.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
72.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
72.0k
    _operator_profile =
638
72.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
72.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
72.0k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
72.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
72.0k
    _operator_profile->add_child(_common_profile, true);
647
72.0k
    _operator_profile->add_child(_custom_profile, true);
648
649
72.0k
    _operator_profile->set_metadata(_parent->node_id());
650
72.0k
    _wait_for_finish_dependency_timer =
651
72.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
72.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
72.0k
    if constexpr (!is_fake_shared) {
654
72.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
72.0k
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
72.0k
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
72.0k
            _shared_state = info.shared_state->template cast<SharedState>();
670
72.0k
            _dependency = _shared_state->create_sink_dependency(
671
72.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
72.0k
        }
673
72.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
72.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
72.0k
    }
676
677
72.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
72.0k
    _rows_input_counter =
682
72.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
72.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
72.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
72.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
72.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
72.0k
    _memory_used_counter =
688
72.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
72.0k
    _common_profile->add_info_string("IsColocate",
690
72.0k
                                     std::to_string(_parent->is_colocated_operator()));
691
72.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
72.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
72.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
72.0k
    return Status::OK();
695
72.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
2
    _operator_profile =
638
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
2
    _operator_profile->add_child(_common_profile, true);
647
2
    _operator_profile->add_child(_custom_profile, true);
648
649
2
    _operator_profile->set_metadata(_parent->node_id());
650
2
    _wait_for_finish_dependency_timer =
651
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
2
    if constexpr (!is_fake_shared) {
654
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
2
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
2
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
2
            _shared_state = info.shared_state->template cast<SharedState>();
670
2
            _dependency = _shared_state->create_sink_dependency(
671
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
2
        }
673
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
2
    }
676
677
2
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
2
    _rows_input_counter =
682
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
2
    _memory_used_counter =
688
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
2
    _common_profile->add_info_string("IsColocate",
690
2
                                     std::to_string(_parent->is_colocated_operator()));
691
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
2
    return Status::OK();
695
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
26
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
26
    _operator_profile =
638
26
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
26
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
26
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
26
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
26
    _operator_profile->add_child(_common_profile, true);
647
26
    _operator_profile->add_child(_custom_profile, true);
648
649
26
    _operator_profile->set_metadata(_parent->node_id());
650
26
    _wait_for_finish_dependency_timer =
651
26
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
26
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
26
    if constexpr (!is_fake_shared) {
654
26
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
26
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
26
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
26
            _shared_state = info.shared_state->template cast<SharedState>();
670
26
            _dependency = _shared_state->create_sink_dependency(
671
26
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
26
        }
673
26
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
26
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
26
    }
676
677
26
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
26
    _rows_input_counter =
682
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
26
    _memory_used_counter =
688
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
26
    _common_profile->add_info_string("IsColocate",
690
26
                                     std::to_string(_parent->is_colocated_operator()));
691
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
26
    return Status::OK();
695
26
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
17
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
17
    _operator_profile =
638
17
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
17
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
17
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
17
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
17
    _operator_profile->add_child(_common_profile, true);
647
17
    _operator_profile->add_child(_custom_profile, true);
648
649
17
    _operator_profile->set_metadata(_parent->node_id());
650
17
    _wait_for_finish_dependency_timer =
651
17
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
17
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
17
    if constexpr (!is_fake_shared) {
654
17
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
17
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
17
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
17
            _shared_state = info.shared_state->template cast<SharedState>();
670
17
            _dependency = _shared_state->create_sink_dependency(
671
17
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
17
        }
673
17
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
17
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
17
    }
676
677
17
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
17
    _rows_input_counter =
682
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
17
    _memory_used_counter =
688
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
17
    _common_profile->add_info_string("IsColocate",
690
17
                                     std::to_string(_parent->is_colocated_operator()));
691
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
17
    return Status::OK();
695
17
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
9
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
9
    _operator_profile =
638
9
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
9
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
9
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
9
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
9
    _operator_profile->add_child(_common_profile, true);
647
9
    _operator_profile->add_child(_custom_profile, true);
648
649
9
    _operator_profile->set_metadata(_parent->node_id());
650
9
    _wait_for_finish_dependency_timer =
651
9
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
9
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
9
    if constexpr (!is_fake_shared) {
654
9
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
9
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
9
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
9
            _shared_state = info.shared_state->template cast<SharedState>();
670
9
            _dependency = _shared_state->create_sink_dependency(
671
9
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
9
        }
673
9
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
9
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
9
    }
676
677
9
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
9
    _rows_input_counter =
682
9
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
9
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
9
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
9
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
9
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
9
    _memory_used_counter =
688
9
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
9
    _common_profile->add_info_string("IsColocate",
690
9
                                     std::to_string(_parent->is_colocated_operator()));
691
9
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
9
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
9
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
9
    return Status::OK();
695
9
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
47
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
47
    _operator_profile =
638
47
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
47
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
47
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
47
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
47
    _operator_profile->add_child(_common_profile, true);
647
47
    _operator_profile->add_child(_custom_profile, true);
648
649
47
    _operator_profile->set_metadata(_parent->node_id());
650
47
    _wait_for_finish_dependency_timer =
651
47
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
47
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
47
    if constexpr (!is_fake_shared) {
654
47
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
47
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
47
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
47
            _shared_state = info.shared_state->template cast<SharedState>();
670
47
            _dependency = _shared_state->create_sink_dependency(
671
47
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
47
        }
673
47
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
47
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
47
    }
676
677
47
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
47
    _rows_input_counter =
682
47
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
47
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
47
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
47
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
47
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
47
    _memory_used_counter =
688
47
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
47
    _common_profile->add_info_string("IsColocate",
690
47
                                     std::to_string(_parent->is_colocated_operator()));
691
47
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
47
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
47
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
47
    return Status::OK();
695
47
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
20
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
20
    _operator_profile =
638
20
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
20
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
20
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
20
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
20
    _operator_profile->add_child(_common_profile, true);
647
20
    _operator_profile->add_child(_custom_profile, true);
648
649
20
    _operator_profile->set_metadata(_parent->node_id());
650
20
    _wait_for_finish_dependency_timer =
651
20
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
20
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
20
    if constexpr (!is_fake_shared) {
654
20
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
20
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
20
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
20
            _shared_state = info.shared_state->template cast<SharedState>();
670
20
            _dependency = _shared_state->create_sink_dependency(
671
20
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
20
        }
673
20
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
20
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
20
    }
676
677
20
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
20
    _rows_input_counter =
682
20
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
20
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
20
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
20
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
20
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
20
    _memory_used_counter =
688
20
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
20
    _common_profile->add_info_string("IsColocate",
690
20
                                     std::to_string(_parent->is_colocated_operator()));
691
20
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
20
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
20
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
20
    return Status::OK();
695
20
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
7
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
7
    _operator_profile =
638
7
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
7
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
7
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
7
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
7
    _operator_profile->add_child(_common_profile, true);
647
7
    _operator_profile->add_child(_custom_profile, true);
648
649
7
    _operator_profile->set_metadata(_parent->node_id());
650
7
    _wait_for_finish_dependency_timer =
651
7
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
7
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
    if constexpr (!is_fake_shared) {
654
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
                                                  ? 0
662
                                                  : info.task_idx]
663
                                  .get();
664
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
            _shared_state = info.shared_state->template cast<SharedState>();
670
            _dependency = _shared_state->create_sink_dependency(
671
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
        }
673
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
    }
676
677
7
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
7
    _rows_input_counter =
682
7
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
7
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
7
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
7
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
7
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
7
    _memory_used_counter =
688
7
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
7
    _common_profile->add_info_string("IsColocate",
690
7
                                     std::to_string(_parent->is_colocated_operator()));
691
7
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
7
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
7
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
7
    return Status::OK();
695
7
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
3
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
3
    _operator_profile =
638
3
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
3
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
3
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
3
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
3
    _operator_profile->add_child(_common_profile, true);
647
3
    _operator_profile->add_child(_custom_profile, true);
648
649
3
    _operator_profile->set_metadata(_parent->node_id());
650
3
    _wait_for_finish_dependency_timer =
651
3
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
3
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
3
    if constexpr (!is_fake_shared) {
654
3
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
3
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
3
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
3
            _shared_state = info.shared_state->template cast<SharedState>();
670
3
            _dependency = _shared_state->create_sink_dependency(
671
3
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
3
        }
673
3
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
3
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
3
    }
676
677
3
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
3
    _rows_input_counter =
682
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
3
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
3
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
3
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
3
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
3
    _memory_used_counter =
688
3
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
3
    _common_profile->add_info_string("IsColocate",
690
3
                                     std::to_string(_parent->is_colocated_operator()));
691
3
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
3
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
3
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
3
    return Status::OK();
695
3
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
102
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
102
    _operator_profile =
638
102
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
102
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
102
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
102
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
102
    _operator_profile->add_child(_common_profile, true);
647
102
    _operator_profile->add_child(_custom_profile, true);
648
649
102
    _operator_profile->set_metadata(_parent->node_id());
650
102
    _wait_for_finish_dependency_timer =
651
102
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
102
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
102
    if constexpr (!is_fake_shared) {
654
102
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
102
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
102
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
102
            _shared_state = info.shared_state->template cast<SharedState>();
670
102
            _dependency = _shared_state->create_sink_dependency(
671
102
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
102
        }
673
102
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
102
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
102
    }
676
677
102
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
102
    _rows_input_counter =
682
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
102
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
102
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
102
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
102
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
102
    _memory_used_counter =
688
102
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
102
    _common_profile->add_info_string("IsColocate",
690
102
                                     std::to_string(_parent->is_colocated_operator()));
691
102
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
102
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
102
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
102
    return Status::OK();
695
102
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
27
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
27
    _operator_profile =
638
27
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
27
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
27
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
27
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
27
    _operator_profile->add_child(_common_profile, true);
647
27
    _operator_profile->add_child(_custom_profile, true);
648
649
27
    _operator_profile->set_metadata(_parent->node_id());
650
27
    _wait_for_finish_dependency_timer =
651
27
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
27
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
27
    if constexpr (!is_fake_shared) {
654
27
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
27
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
27
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
27
            _shared_state = info.shared_state->template cast<SharedState>();
670
27
            _dependency = _shared_state->create_sink_dependency(
671
27
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
27
        }
673
27
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
27
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
27
    }
676
677
27
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
27
    _rows_input_counter =
682
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
27
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
27
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
27
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
27
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
27
    _memory_used_counter =
688
27
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
27
    _common_profile->add_info_string("IsColocate",
690
27
                                     std::to_string(_parent->is_colocated_operator()));
691
27
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
27
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
27
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
27
    return Status::OK();
695
27
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
15
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
15
    _operator_profile =
638
15
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
15
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
15
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
15
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
15
    _operator_profile->add_child(_common_profile, true);
647
15
    _operator_profile->add_child(_custom_profile, true);
648
649
15
    _operator_profile->set_metadata(_parent->node_id());
650
15
    _wait_for_finish_dependency_timer =
651
15
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
15
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
15
    if constexpr (!is_fake_shared) {
654
15
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
15
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
15
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
15
            _shared_state = info.shared_state->template cast<SharedState>();
670
15
            _dependency = _shared_state->create_sink_dependency(
671
15
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
15
        }
673
15
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
15
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
15
    }
676
677
15
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
15
    _rows_input_counter =
682
15
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
15
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
15
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
15
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
15
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
15
    _memory_used_counter =
688
15
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
15
    _common_profile->add_info_string("IsColocate",
690
15
                                     std::to_string(_parent->is_colocated_operator()));
691
15
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
15
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
15
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
15
    return Status::OK();
695
15
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
635
3
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
636
    // create profile
637
3
    _operator_profile =
638
3
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
639
3
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
640
3
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
641
642
    // indentation is true
643
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
644
    // So we should set the indentation to true.
645
3
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
646
3
    _operator_profile->add_child(_common_profile, true);
647
3
    _operator_profile->add_child(_custom_profile, true);
648
649
3
    _operator_profile->set_metadata(_parent->node_id());
650
3
    _wait_for_finish_dependency_timer =
651
3
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
652
3
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
653
3
    if constexpr (!is_fake_shared) {
654
3
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
655
3
            info.shared_state_map.end()) {
656
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
657
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
658
            }
659
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
660
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
661
0
                                                  ? 0
662
0
                                                  : info.task_idx]
663
0
                                  .get();
664
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
665
3
        } else {
666
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
667
                DCHECK(false);
668
            }
669
3
            _shared_state = info.shared_state->template cast<SharedState>();
670
3
            _dependency = _shared_state->create_sink_dependency(
671
3
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
672
3
        }
673
3
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
674
3
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
675
3
    }
676
677
3
    if (must_set_shared_state() && _shared_state == nullptr) {
678
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
679
0
    }
680
681
3
    _rows_input_counter =
682
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
683
3
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
684
3
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
685
3
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
686
3
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
687
3
    _memory_used_counter =
688
3
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
689
3
    _common_profile->add_info_string("IsColocate",
690
3
                                     std::to_string(_parent->is_colocated_operator()));
691
3
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
692
3
    _common_profile->add_info_string("FollowedByShuffledOperator",
693
3
                                     std::to_string(_parent->followed_by_shuffled_operator()));
694
3
    return Status::OK();
695
3
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
696
697
template <typename SharedState>
698
72.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
72.0k
    if (_closed) {
700
2
        return Status::OK();
701
2
    }
702
72.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
72.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
72.0k
    }
705
72.0k
    _closed = true;
706
72.0k
    return Status::OK();
707
72.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
72.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
72.0k
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
72.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
72.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
72.0k
    }
705
72.0k
    _closed = true;
706
72.0k
    return Status::OK();
707
72.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
1
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
1
    }
705
1
    _closed = true;
706
1
    return Status::OK();
707
1
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
9
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
9
    if (_closed) {
700
2
        return Status::OK();
701
2
    }
702
7
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
7
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
7
    }
705
7
    _closed = true;
706
7
    return Status::OK();
707
9
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
1
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
1
    }
705
1
    _closed = true;
706
1
    return Status::OK();
707
1
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
9
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
9
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
9
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
9
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
9
    }
705
9
    _closed = true;
706
9
    return Status::OK();
707
9
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
3
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
3
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
    }
705
3
    _closed = true;
706
3
    return Status::OK();
707
3
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
698
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
699
1
    if (_closed) {
700
0
        return Status::OK();
701
0
    }
702
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
703
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
704
1
    }
705
1
    _closed = true;
706
1
    return Status::OK();
707
1
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
708
709
template <typename LocalStateType>
710
4
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
711
4
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
712
4
    return pull(state, block, eos);
713
4
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
710
4
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
711
4
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
712
4
    return pull(state, block, eos);
713
4
}
Unexecuted instantiation: _ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
714
715
template <typename LocalStateType>
716
62
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
62
    auto& local_state = get_local_state(state);
718
62
    if (need_more_input_data(state)) {
719
56
        local_state._child_block->clear_column_data(
720
56
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
721
56
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
722
56
                state, local_state._child_block.get(), &local_state._child_eos));
723
56
        *eos = local_state._child_eos;
724
56
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
725
2
            return Status::OK();
726
2
        }
727
54
        {
728
54
            SCOPED_TIMER(local_state.exec_time_counter());
729
54
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
730
54
        }
731
54
    }
732
733
60
    if (!need_more_input_data(state)) {
734
60
        SCOPED_TIMER(local_state.exec_time_counter());
735
60
        bool new_eos = false;
736
60
        RETURN_IF_ERROR(pull(state, block, &new_eos));
737
60
        if (new_eos) {
738
35
            *eos = true;
739
35
        } else if (!need_more_input_data(state)) {
740
0
            *eos = false;
741
0
        }
742
60
    }
743
60
    return Status::OK();
744
60
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
716
60
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
60
    auto& local_state = get_local_state(state);
718
60
    if (need_more_input_data(state)) {
719
54
        local_state._child_block->clear_column_data(
720
54
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
721
54
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
722
54
                state, local_state._child_block.get(), &local_state._child_eos));
723
54
        *eos = local_state._child_eos;
724
54
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
725
2
            return Status::OK();
726
2
        }
727
52
        {
728
52
            SCOPED_TIMER(local_state.exec_time_counter());
729
52
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
730
52
        }
731
52
    }
732
733
58
    if (!need_more_input_data(state)) {
734
58
        SCOPED_TIMER(local_state.exec_time_counter());
735
58
        bool new_eos = false;
736
58
        RETURN_IF_ERROR(pull(state, block, &new_eos));
737
58
        if (new_eos) {
738
33
            *eos = true;
739
33
        } else if (!need_more_input_data(state)) {
740
0
            *eos = false;
741
0
        }
742
58
    }
743
58
    return Status::OK();
744
58
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
716
2
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
2
    auto& local_state = get_local_state(state);
718
2
    if (need_more_input_data(state)) {
719
2
        local_state._child_block->clear_column_data(
720
2
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
721
2
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
722
2
                state, local_state._child_block.get(), &local_state._child_eos));
723
2
        *eos = local_state._child_eos;
724
2
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
725
0
            return Status::OK();
726
0
        }
727
2
        {
728
2
            SCOPED_TIMER(local_state.exec_time_counter());
729
2
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
730
2
        }
731
2
    }
732
733
2
    if (!need_more_input_data(state)) {
734
2
        SCOPED_TIMER(local_state.exec_time_counter());
735
2
        bool new_eos = false;
736
2
        RETURN_IF_ERROR(pull(state, block, &new_eos));
737
2
        if (new_eos) {
738
2
            *eos = true;
739
2
        } else if (!need_more_input_data(state)) {
740
0
            *eos = false;
741
0
        }
742
2
    }
743
2
    return Status::OK();
744
2
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
745
746
template <typename Writer, typename Parent>
747
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
748
0
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
749
0
    RETURN_IF_ERROR(Base::init(state, info));
750
0
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
751
0
                                                         "AsyncWriterDependency", true);
752
0
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
753
0
                             _finish_dependency));
754
755
0
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
756
0
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
757
0
    return Status::OK();
758
0
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
759
760
template <typename Writer, typename Parent>
761
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
762
0
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
763
0
    RETURN_IF_ERROR(Base::open(state));
764
0
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
765
0
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
766
0
        RETURN_IF_ERROR(
767
0
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
768
0
    }
769
0
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
770
0
    return Status::OK();
771
0
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
772
773
template <typename Writer, typename Parent>
774
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
775
0
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
776
0
    return _writer->sink(block, eos);
777
0
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
778
779
template <typename Writer, typename Parent>
780
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
781
0
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
782
0
    if (_closed) {
783
0
        return Status::OK();
784
0
    }
785
0
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
786
0
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
787
    // if the init failed, the _writer may be nullptr. so here need check
788
0
    if (_writer) {
789
0
        Status st = _writer->get_writer_status();
790
0
        if (exec_status.ok()) {
791
0
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
792
0
                                                       : Status::Cancelled("force close"));
793
0
        } else {
794
0
            _writer->force_close(exec_status);
795
0
        }
796
        // If there is an error in process_block thread, then we should get the writer
797
        // status before call force_close. For example, the thread may failed in commit
798
        // transaction.
799
0
        RETURN_IF_ERROR(st);
800
0
    }
801
0
    return Base::close(state, exec_status);
802
0
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
803
804
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
805
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
806
DECLARE_OPERATOR(ResultSinkLocalState)
807
DECLARE_OPERATOR(JdbcTableSinkLocalState)
808
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
809
DECLARE_OPERATOR(ResultFileSinkLocalState)
810
DECLARE_OPERATOR(OlapTableSinkLocalState)
811
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
812
DECLARE_OPERATOR(HiveTableSinkLocalState)
813
DECLARE_OPERATOR(TVFTableSinkLocalState)
814
DECLARE_OPERATOR(IcebergTableSinkLocalState)
815
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
816
DECLARE_OPERATOR(MCTableSinkLocalState)
817
DECLARE_OPERATOR(AnalyticSinkLocalState)
818
DECLARE_OPERATOR(BlackholeSinkLocalState)
819
DECLARE_OPERATOR(SortSinkLocalState)
820
DECLARE_OPERATOR(SpillSortSinkLocalState)
821
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
822
DECLARE_OPERATOR(AggSinkLocalState)
823
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
824
DECLARE_OPERATOR(ExchangeSinkLocalState)
825
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
826
DECLARE_OPERATOR(UnionSinkLocalState)
827
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
828
DECLARE_OPERATOR(PartitionSortSinkLocalState)
829
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
830
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
831
DECLARE_OPERATOR(SetSinkLocalState<true>)
832
DECLARE_OPERATOR(SetSinkLocalState<false>)
833
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
834
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
835
DECLARE_OPERATOR(CacheSinkLocalState)
836
DECLARE_OPERATOR(DictSinkLocalState)
837
DECLARE_OPERATOR(RecCTESinkLocalState)
838
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
839
840
#undef DECLARE_OPERATOR
841
842
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
843
DECLARE_OPERATOR(HashJoinProbeLocalState)
844
DECLARE_OPERATOR(OlapScanLocalState)
845
DECLARE_OPERATOR(GroupCommitLocalState)
846
DECLARE_OPERATOR(JDBCScanLocalState)
847
DECLARE_OPERATOR(FileScanLocalState)
848
DECLARE_OPERATOR(EsScanLocalState)
849
DECLARE_OPERATOR(AnalyticLocalState)
850
DECLARE_OPERATOR(SortLocalState)
851
DECLARE_OPERATOR(SpillSortLocalState)
852
DECLARE_OPERATOR(LocalMergeSortLocalState)
853
DECLARE_OPERATOR(AggLocalState)
854
DECLARE_OPERATOR(PartitionedAggLocalState)
855
DECLARE_OPERATOR(TableFunctionLocalState)
856
DECLARE_OPERATOR(ExchangeLocalState)
857
DECLARE_OPERATOR(RepeatLocalState)
858
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
859
DECLARE_OPERATOR(AssertNumRowsLocalState)
860
DECLARE_OPERATOR(EmptySetLocalState)
861
DECLARE_OPERATOR(UnionSourceLocalState)
862
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
863
DECLARE_OPERATOR(PartitionSortSourceLocalState)
864
DECLARE_OPERATOR(SetSourceLocalState<true>)
865
DECLARE_OPERATOR(SetSourceLocalState<false>)
866
DECLARE_OPERATOR(DataGenLocalState)
867
DECLARE_OPERATOR(SchemaScanLocalState)
868
DECLARE_OPERATOR(MetaScanLocalState)
869
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
870
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
871
DECLARE_OPERATOR(CacheSourceLocalState)
872
DECLARE_OPERATOR(RecCTESourceLocalState)
873
DECLARE_OPERATOR(RecCTEScanLocalState)
874
875
#ifdef BE_TEST
876
DECLARE_OPERATOR(MockLocalState)
877
DECLARE_OPERATOR(MockScanLocalState)
878
#endif
879
#undef DECLARE_OPERATOR
880
881
template class StreamingOperatorX<AssertNumRowsLocalState>;
882
template class StreamingOperatorX<SelectLocalState>;
883
884
template class StatefulOperatorX<HashJoinProbeLocalState>;
885
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
886
template class StatefulOperatorX<RepeatLocalState>;
887
template class StatefulOperatorX<MaterializationLocalState>;
888
template class StatefulOperatorX<StreamingAggLocalState>;
889
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
890
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
891
template class StatefulOperatorX<TableFunctionLocalState>;
892
893
template class PipelineXSinkLocalState<HashJoinSharedState>;
894
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
895
template class PipelineXSinkLocalState<SortSharedState>;
896
template class PipelineXSinkLocalState<SpillSortSharedState>;
897
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
898
template class PipelineXSinkLocalState<AnalyticSharedState>;
899
template class PipelineXSinkLocalState<AggSharedState>;
900
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
901
template class PipelineXSinkLocalState<FakeSharedState>;
902
template class PipelineXSinkLocalState<UnionSharedState>;
903
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
904
template class PipelineXSinkLocalState<MultiCastSharedState>;
905
template class PipelineXSinkLocalState<SetSharedState>;
906
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
907
template class PipelineXSinkLocalState<BasicSharedState>;
908
template class PipelineXSinkLocalState<DataQueueSharedState>;
909
template class PipelineXSinkLocalState<RecCTESharedState>;
910
911
template class PipelineXLocalState<HashJoinSharedState>;
912
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
913
template class PipelineXLocalState<SortSharedState>;
914
template class PipelineXLocalState<SpillSortSharedState>;
915
template class PipelineXLocalState<NestedLoopJoinSharedState>;
916
template class PipelineXLocalState<AnalyticSharedState>;
917
template class PipelineXLocalState<AggSharedState>;
918
template class PipelineXLocalState<PartitionedAggSharedState>;
919
template class PipelineXLocalState<FakeSharedState>;
920
template class PipelineXLocalState<UnionSharedState>;
921
template class PipelineXLocalState<DataQueueSharedState>;
922
template class PipelineXLocalState<MultiCastSharedState>;
923
template class PipelineXLocalState<PartitionSortNodeSharedState>;
924
template class PipelineXLocalState<SetSharedState>;
925
template class PipelineXLocalState<LocalExchangeSharedState>;
926
template class PipelineXLocalState<BasicSharedState>;
927
template class PipelineXLocalState<RecCTESharedState>;
928
929
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
930
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
931
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
932
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
933
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
934
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
935
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
936
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
937
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
938
939
#ifdef BE_TEST
940
template class OperatorX<DummyOperatorLocalState>;
941
template class DataSinkOperatorX<DummySinkLocalState>;
942
#endif
943
944
#include "common/compile_check_end.h"
945
} // namespace doris