Coverage Report

Created: 2026-04-01 03:37

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