Coverage Report

Created: 2026-04-10 04:05

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