Coverage Report

Created: 2026-03-20 12:30

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
206
        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
48
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
48
    if (_parent->nereids_id() == -1) {
120
40
        return fmt::format("(id={})", _parent->node_id());
121
40
    } else {
122
8
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
8
    }
124
48
}
_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
10
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
10
    if (_parent->nereids_id() == -1) {
120
10
        return fmt::format("(id={})", _parent->node_id());
121
10
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
10
}
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
192
        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
23
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
23
    if (_parent->nereids_id() == -1) {
129
23
        return fmt::format("(id={})", _parent->node_id());
130
23
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
23
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
15
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
15
    if (_parent->nereids_id() == -1) {
129
15
        return fmt::format("(id={})", _parent->node_id());
130
15
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
15
}
_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
53.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
53.9k
    fmt::memory_buffer debug_string_buffer;
157
53.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
53.9k
    return fmt::to_string(debug_string_buffer);
159
53.9k
}
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
53.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
53.9k
    fmt::memory_buffer debug_string_buffer;
157
53.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
53.9k
    return fmt::to_string(debug_string_buffer);
159
53.9k
}
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
53.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
53.9k
    fmt::memory_buffer debug_string_buffer;
164
53.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
53.9k
    return fmt::to_string(debug_string_buffer);
166
53.9k
}
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
53.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
53.9k
    fmt::memory_buffer debug_string_buffer;
164
53.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
53.9k
    return fmt::to_string(debug_string_buffer);
166
53.9k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
167
168
54.0k
std::string OperatorXBase::debug_string(int indentation_level) const {
169
54.0k
    fmt::memory_buffer debug_string_buffer;
170
54.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
171
54.0k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
172
54.0k
                   _is_serial_operator);
173
54.0k
    return fmt::to_string(debug_string_buffer);
174
54.0k
}
175
176
53.9k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
177
53.9k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
178
53.9k
}
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
        const size_t origin_columns_count = input_block.columns();
368
22
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
369
94
        for (int i = 0; i < mutable_columns.size(); ++i) {
370
72
            auto result_column_id = -1;
371
72
            ColumnPtr column_ptr;
372
72
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
373
72
            if (column_ptr->size() != rows) {
374
0
                return Status::InternalError(
375
0
                        "projection result column size {} not equal input rows {}, expr: {}",
376
0
                        column_ptr->size(), rows,
377
0
                        local_state->_projections[i]->root()->debug_string());
378
0
            }
379
72
            column_ptr = column_ptr->convert_to_full_column_if_const();
380
72
            if (result_column_id >= origin_columns_count) {
381
72
                bytes_usage += column_ptr->allocated_bytes();
382
72
            }
383
72
            insert_column_datas(mutable_columns[i], column_ptr, rows);
384
72
        }
385
22
        DCHECK(mutable_block.rows() == rows);
386
22
        output_block->set_columns(std::move(mutable_columns));
387
22
    }
388
389
22
    local_state->_estimate_memory_usage += bytes_usage;
390
391
22
    return Status::OK();
392
22
}
393
394
908k
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
395
908k
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
396
908k
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
397
908k
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
398
908k
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
399
908k
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
400
908k
            if (_debug_point_count++ % 2 == 0) {
401
908k
                return Status::OK();
402
908k
            }
403
908k
        }
404
908k
    });
405
406
908k
    Status status;
407
908k
    auto* local_state = state->get_local_state(operator_id());
408
908k
    Defer defer([&]() {
409
908k
        if (status.ok()) {
410
908k
            if (auto rows = block->rows()) {
411
34
                COUNTER_UPDATE(local_state->_rows_returned_counter, rows);
412
34
                COUNTER_UPDATE(local_state->_blocks_returned_counter, 1);
413
34
            }
414
908k
        }
415
908k
    });
416
908k
    if (_output_row_descriptor) {
417
35
        local_state->clear_origin_block();
418
35
        status = get_block(state, &local_state->_origin_block, eos);
419
35
        if (UNLIKELY(!status.ok())) {
420
0
            return status;
421
0
        }
422
35
        status = do_projections(state, &local_state->_origin_block, block);
423
35
        return status;
424
35
    }
425
908k
    status = get_block(state, block, eos);
426
908k
    RETURN_IF_ERROR(block->check_type_and_column());
427
908k
    return status;
428
908k
}
429
430
237
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
431
237
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
432
0
        block->set_num_rows(_parent->_limit - _num_rows_returned);
433
0
        *eos = true;
434
0
    }
435
436
237
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
437
237
        auto op_name = to_lower(_parent->_op_name);
438
237
        auto arg_op_name = dp->param<std::string>("op_name");
439
237
        arg_op_name = to_lower(arg_op_name);
440
441
237
        if (op_name == arg_op_name) {
442
237
            *eos = true;
443
237
        }
444
237
    });
445
446
237
    if (auto rows = block->rows()) {
447
188
        _num_rows_returned += rows;
448
188
    }
449
237
}
450
451
24.0k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
452
24.0k
    auto result = state->get_sink_local_state_result();
453
24.0k
    if (!result) {
454
0
        return result.error();
455
0
    }
456
24.0k
    return result.value()->terminate(state);
457
24.0k
}
458
459
53.9k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
460
53.9k
    fmt::memory_buffer debug_string_buffer;
461
462
53.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
463
53.9k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
464
53.9k
    return fmt::to_string(debug_string_buffer);
465
53.9k
}
466
467
53.9k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
468
53.9k
    return state->get_sink_local_state()->debug_string(indentation_level);
469
53.9k
}
470
471
3
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
472
3
    std::string op_name = "UNKNOWN_SINK";
473
3
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
474
475
3
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
476
3
        op_name = it->second;
477
3
    }
478
3
    _name = op_name + "_OPERATOR";
479
3
    return Status::OK();
480
3
}
481
482
72.1k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
483
72.1k
    std::string op_name = print_plan_node_type(tnode.node_type);
484
72.1k
    _nereids_id = tnode.nereids_id;
485
72.1k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
486
72.1k
    _name = substr + "_SINK_OPERATOR";
487
72.1k
    return Status::OK();
488
72.1k
}
489
490
template <typename LocalStateType>
491
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
492
72.1k
                                                            LocalSinkStateInfo& info) {
493
72.1k
    auto local_state = LocalStateType::create_unique(this, state);
494
72.1k
    RETURN_IF_ERROR(local_state->init(state, info));
495
72.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
72.1k
    return Status::OK();
497
72.1k
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
72.0k
                                                            LocalSinkStateInfo& info) {
493
72.0k
    auto local_state = LocalStateType::create_unique(this, state);
494
72.0k
    RETURN_IF_ERROR(local_state->init(state, info));
495
72.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
72.0k
    return Status::OK();
497
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
492
17
                                                            LocalSinkStateInfo& info) {
493
17
    auto local_state = LocalStateType::create_unique(this, state);
494
17
    RETURN_IF_ERROR(local_state->init(state, info));
495
17
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
17
    return Status::OK();
497
17
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
17
                                                            LocalSinkStateInfo& info) {
493
17
    auto local_state = LocalStateType::create_unique(this, state);
494
17
    RETURN_IF_ERROR(local_state->init(state, info));
495
17
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
17
    return Status::OK();
497
17
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
20
                                                            LocalSinkStateInfo& info) {
493
20
    auto local_state = LocalStateType::create_unique(this, state);
494
20
    RETURN_IF_ERROR(local_state->init(state, info));
495
20
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
20
    return Status::OK();
497
20
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
20
                                                            LocalSinkStateInfo& info) {
493
20
    auto local_state = LocalStateType::create_unique(this, state);
494
20
    RETURN_IF_ERROR(local_state->init(state, info));
495
20
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
20
    return Status::OK();
497
20
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
492
3
                                                            LocalSinkStateInfo& info) {
493
3
    auto local_state = LocalStateType::create_unique(this, state);
494
3
    RETURN_IF_ERROR(local_state->init(state, info));
495
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
3
    return Status::OK();
497
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
492
1
                                                            LocalSinkStateInfo& info) {
493
1
    auto local_state = LocalStateType::create_unique(this, state);
494
1
    RETURN_IF_ERROR(local_state->init(state, info));
495
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
1
    return Status::OK();
497
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
492
15
                                                            LocalSinkStateInfo& info) {
493
15
    auto local_state = LocalStateType::create_unique(this, state);
494
15
    RETURN_IF_ERROR(local_state->init(state, info));
495
15
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
496
15
    return Status::OK();
497
15
}
498
499
template <typename LocalStateType>
500
72.3k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
0
                                 LocalExchangeSharedState>) {
503
0
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
0
                                        MultiCastSharedState>) {
506
0
        throw Exception(Status::FatalError("should not reach here!"));
507
72.3k
    } else {
508
72.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
509
72.3k
        ss->id = operator_id();
510
72.3k
        for (auto& dest : dests_id()) {
511
72.3k
            ss->related_op_ids.insert(dest);
512
72.3k
        }
513
72.3k
        return ss;
514
72.3k
    }
515
72.3k
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
72.0k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
72.0k
    } else {
508
72.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
509
72.0k
        ss->id = operator_id();
510
72.0k
        for (auto& dest : dests_id()) {
511
72.0k
            ss->related_op_ids.insert(dest);
512
72.0k
        }
513
72.0k
        return ss;
514
72.0k
    }
515
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
500
9
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
9
    } else {
508
9
        auto ss = LocalStateType::SharedStateType::create_shared();
509
9
        ss->id = operator_id();
510
9
        for (auto& dest : dests_id()) {
511
9
            ss->related_op_ids.insert(dest);
512
9
        }
513
9
        return ss;
514
9
    }
515
9
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
26
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
26
    } else {
508
26
        auto ss = LocalStateType::SharedStateType::create_shared();
509
26
        ss->id = operator_id();
510
26
        for (auto& dest : dests_id()) {
511
26
            ss->related_op_ids.insert(dest);
512
26
        }
513
26
        return ss;
514
26
    }
515
26
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
19
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
19
    } else {
508
19
        auto ss = LocalStateType::SharedStateType::create_shared();
509
19
        ss->id = operator_id();
510
19
        for (auto& dest : dests_id()) {
511
19
            ss->related_op_ids.insert(dest);
512
19
        }
513
19
        return ss;
514
19
    }
515
19
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
47
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
47
    } else {
508
47
        auto ss = LocalStateType::SharedStateType::create_shared();
509
47
        ss->id = operator_id();
510
47
        for (auto& dest : dests_id()) {
511
47
            ss->related_op_ids.insert(dest);
512
47
        }
513
47
        return ss;
514
47
    }
515
47
}
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
19
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
19
    } else {
508
19
        auto ss = LocalStateType::SharedStateType::create_shared();
509
19
        ss->id = operator_id();
510
19
        for (auto& dest : dests_id()) {
511
19
            ss->related_op_ids.insert(dest);
512
19
        }
513
19
        return ss;
514
19
    }
515
19
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
500
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
3
    } else {
508
3
        auto ss = LocalStateType::SharedStateType::create_shared();
509
3
        ss->id = operator_id();
510
3
        for (auto& dest : dests_id()) {
511
3
            ss->related_op_ids.insert(dest);
512
3
        }
513
3
        return ss;
514
3
    }
515
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
500
102
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
102
    } else {
508
102
        auto ss = LocalStateType::SharedStateType::create_shared();
509
102
        ss->id = operator_id();
510
102
        for (auto& dest : dests_id()) {
511
102
            ss->related_op_ids.insert(dest);
512
102
        }
513
102
        return ss;
514
102
    }
515
102
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
500
6
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
6
    } else {
508
6
        auto ss = LocalStateType::SharedStateType::create_shared();
509
6
        ss->id = operator_id();
510
6
        for (auto& dest : dests_id()) {
511
6
            ss->related_op_ids.insert(dest);
512
6
        }
513
6
        return ss;
514
6
    }
515
6
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
500
4
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
4
    } else {
508
4
        auto ss = LocalStateType::SharedStateType::create_shared();
509
4
        ss->id = operator_id();
510
4
        for (auto& dest : dests_id()) {
511
4
            ss->related_op_ids.insert(dest);
512
4
        }
513
4
        return ss;
514
4
    }
515
4
}
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
500
18
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
501
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                 LocalExchangeSharedState>) {
503
        return nullptr;
504
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
505
                                        MultiCastSharedState>) {
506
        throw Exception(Status::FatalError("should not reach here!"));
507
18
    } else {
508
18
        auto ss = LocalStateType::SharedStateType::create_shared();
509
18
        ss->id = operator_id();
510
18
        for (auto& dest : dests_id()) {
511
18
            ss->related_op_ids.insert(dest);
512
18
        }
513
18
        return ss;
514
18
    }
515
18
}
516
517
template <typename LocalStateType>
518
24.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
24.1k
    auto local_state = LocalStateType::create_unique(state, this);
520
24.1k
    RETURN_IF_ERROR(local_state->init(state, info));
521
24.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
24.1k
    return Status::OK();
523
24.1k
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
24.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
24.0k
    auto local_state = LocalStateType::create_unique(state, this);
520
24.0k
    RETURN_IF_ERROR(local_state->init(state, info));
521
24.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
522
24.0k
    return Status::OK();
523
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
518
11
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
11
    auto local_state = LocalStateType::create_unique(state, this);
520
11
    RETURN_IF_ERROR(local_state->init(state, info));
521
11
    state->emplace_local_state(operator_id(), std::move(local_state));
522
11
    return Status::OK();
523
11
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
11
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
11
    auto local_state = LocalStateType::create_unique(state, this);
520
11
    RETURN_IF_ERROR(local_state->init(state, info));
521
11
    state->emplace_local_state(operator_id(), std::move(local_state));
522
11
    return Status::OK();
523
11
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
10
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
10
    auto local_state = LocalStateType::create_unique(state, this);
520
10
    RETURN_IF_ERROR(local_state->init(state, info));
521
10
    state->emplace_local_state(operator_id(), std::move(local_state));
522
10
    return Status::OK();
523
10
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
10
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
10
    auto local_state = LocalStateType::create_unique(state, this);
520
10
    RETURN_IF_ERROR(local_state->init(state, info));
521
10
    state->emplace_local_state(operator_id(), std::move(local_state));
522
10
    return Status::OK();
523
10
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
2
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
2
    auto local_state = LocalStateType::create_unique(state, this);
520
2
    RETURN_IF_ERROR(local_state->init(state, info));
521
2
    state->emplace_local_state(operator_id(), std::move(local_state));
522
2
    return Status::OK();
523
2
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
5
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
5
    auto local_state = LocalStateType::create_unique(state, this);
520
5
    RETURN_IF_ERROR(local_state->init(state, info));
521
5
    state->emplace_local_state(operator_id(), std::move(local_state));
522
5
    return Status::OK();
523
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
518
3
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
3
    auto local_state = LocalStateType::create_unique(state, this);
520
3
    RETURN_IF_ERROR(local_state->init(state, info));
521
3
    state->emplace_local_state(operator_id(), std::move(local_state));
522
3
    return Status::OK();
523
3
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
518
1
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
1
    auto local_state = LocalStateType::create_unique(state, this);
520
1
    RETURN_IF_ERROR(local_state->init(state, info));
521
1
    state->emplace_local_state(operator_id(), std::move(local_state));
522
1
    return Status::OK();
523
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
518
3
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
3
    auto local_state = LocalStateType::create_unique(state, this);
520
3
    RETURN_IF_ERROR(local_state->init(state, info));
521
3
    state->emplace_local_state(operator_id(), std::move(local_state));
522
3
    return Status::OK();
523
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
518
15
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
519
15
    auto local_state = LocalStateType::create_unique(state, this);
520
15
    RETURN_IF_ERROR(local_state->init(state, info));
521
15
    state->emplace_local_state(operator_id(), std::move(local_state));
522
15
    return Status::OK();
523
15
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
524
525
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
526
                                                         RuntimeState* state)
527
72.3k
        : _parent(parent), _state(state) {}
528
529
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
530
24.4k
        : _num_rows_returned(0), _rows_returned_counter(nullptr), _parent(parent), _state(state) {}
531
532
template <typename SharedStateArg>
533
24.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
24.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
24.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
24.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
24.2k
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
24.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
24.2k
    _operator_profile->add_child(_common_profile.get(), true);
542
24.2k
    _operator_profile->add_child(_custom_profile.get(), true);
543
24.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
24.2k
    if constexpr (!is_fake_shared) {
545
24.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
24.2k
        } else if (info.shared_state) {
554
24.2k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
0
                DCHECK(false);
556
0
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
24.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
24.2k
            _dependency = _shared_state->create_source_dependency(
561
24.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
24.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
24.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
24.2k
        } else {
565
1
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
0
                DCHECK(false);
567
0
            }
568
1
        }
569
24.2k
    }
570
571
24.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
24.2k
    _rows_returned_counter =
576
24.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
24.2k
    _blocks_returned_counter =
578
24.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
24.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
24.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
24.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
24.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
24.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
24.2k
    _memory_used_counter =
585
24.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
24.2k
    _common_profile->add_info_string("IsColocate",
587
24.2k
                                     std::to_string(_parent->is_colocated_operator()));
588
24.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
24.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
24.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
24.2k
    return Status::OK();
592
24.2k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
24.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
24.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
24.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
24.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
24.0k
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
24.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
24.0k
    _operator_profile->add_child(_common_profile.get(), true);
542
24.0k
    _operator_profile->add_child(_custom_profile.get(), true);
543
24.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
24.0k
    if constexpr (!is_fake_shared) {
545
24.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
24.0k
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
24.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
24.0k
            _dependency = _shared_state->create_source_dependency(
561
24.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
24.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
24.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
24.0k
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
0
        }
569
24.0k
    }
570
571
24.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
24.0k
    _rows_returned_counter =
576
24.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
24.0k
    _blocks_returned_counter =
578
24.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
24.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
24.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
24.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
24.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
24.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
24.0k
    _memory_used_counter =
585
24.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
24.0k
    _common_profile->add_info_string("IsColocate",
587
24.0k
                                     std::to_string(_parent->is_colocated_operator()));
588
24.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
24.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
24.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
24.0k
    return Status::OK();
592
24.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
1
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
1
    _operator_profile->add_child(_common_profile.get(), true);
542
1
    _operator_profile->add_child(_custom_profile.get(), true);
543
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
1
    if constexpr (!is_fake_shared) {
545
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
1
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
1
            _dependency = _shared_state->create_source_dependency(
561
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
1
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
0
        }
569
1
    }
570
571
1
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
1
    _rows_returned_counter =
576
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
1
    _blocks_returned_counter =
578
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
1
    _memory_used_counter =
585
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
1
    _common_profile->add_info_string("IsColocate",
587
1
                                     std::to_string(_parent->is_colocated_operator()));
588
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
1
    return Status::OK();
592
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
23
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
23
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
23
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
23
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
23
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
23
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
23
    _operator_profile->add_child(_common_profile.get(), true);
542
23
    _operator_profile->add_child(_custom_profile.get(), true);
543
23
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
23
    if constexpr (!is_fake_shared) {
545
23
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
23
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
23
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
23
            _dependency = _shared_state->create_source_dependency(
561
23
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
23
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
23
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
23
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
0
        }
569
23
    }
570
571
23
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
23
    _rows_returned_counter =
576
23
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
23
    _blocks_returned_counter =
578
23
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
23
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
23
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
23
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
23
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
23
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
23
    _memory_used_counter =
585
23
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
23
    _common_profile->add_info_string("IsColocate",
587
23
                                     std::to_string(_parent->is_colocated_operator()));
588
23
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
23
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
23
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
23
    return Status::OK();
592
23
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
11
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
11
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
11
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
11
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
11
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
11
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
11
    _operator_profile->add_child(_common_profile.get(), true);
542
11
    _operator_profile->add_child(_custom_profile.get(), true);
543
11
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
11
    if constexpr (!is_fake_shared) {
545
11
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
11
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
11
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
11
            _dependency = _shared_state->create_source_dependency(
561
11
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
11
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
11
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
11
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
0
        }
569
11
    }
570
571
11
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
11
    _rows_returned_counter =
576
11
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
11
    _blocks_returned_counter =
578
11
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
11
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
11
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
11
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
11
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
11
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
11
    _memory_used_counter =
585
11
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
11
    _common_profile->add_info_string("IsColocate",
587
11
                                     std::to_string(_parent->is_colocated_operator()));
588
11
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
11
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
11
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
11
    return Status::OK();
592
11
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
9
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
9
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
9
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
9
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
9
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
9
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
9
    _operator_profile->add_child(_common_profile.get(), true);
542
9
    _operator_profile->add_child(_custom_profile.get(), true);
543
9
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
9
    if constexpr (!is_fake_shared) {
545
9
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
9
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
9
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
9
            _dependency = _shared_state->create_source_dependency(
561
9
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
9
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
9
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
9
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
0
        }
569
9
    }
570
571
9
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
9
    _rows_returned_counter =
576
9
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
9
    _blocks_returned_counter =
578
9
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
9
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
9
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
9
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
9
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
9
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
9
    _memory_used_counter =
585
9
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
9
    _common_profile->add_info_string("IsColocate",
587
9
                                     std::to_string(_parent->is_colocated_operator()));
588
9
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
9
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
9
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
9
    return Status::OK();
592
9
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
37
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
37
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
37
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
37
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
37
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
37
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
37
    _operator_profile->add_child(_common_profile.get(), true);
542
37
    _operator_profile->add_child(_custom_profile.get(), true);
543
37
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
37
    if constexpr (!is_fake_shared) {
545
37
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
37
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
37
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
37
            _dependency = _shared_state->create_source_dependency(
561
37
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
37
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
37
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
37
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
0
        }
569
37
    }
570
571
37
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
37
    _rows_returned_counter =
576
37
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
37
    _blocks_returned_counter =
578
37
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
37
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
37
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
37
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
37
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
37
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
37
    _memory_used_counter =
585
37
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
37
    _common_profile->add_info_string("IsColocate",
587
37
                                     std::to_string(_parent->is_colocated_operator()));
588
37
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
37
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
37
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
37
    return Status::OK();
592
37
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
10
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
10
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
10
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
10
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
10
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
10
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
10
    _operator_profile->add_child(_common_profile.get(), true);
542
10
    _operator_profile->add_child(_custom_profile.get(), true);
543
10
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
10
    if constexpr (!is_fake_shared) {
545
10
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
10
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
10
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
10
            _dependency = _shared_state->create_source_dependency(
561
10
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
10
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
10
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
10
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
0
        }
569
10
    }
570
571
10
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
10
    _rows_returned_counter =
576
10
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
10
    _blocks_returned_counter =
578
10
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
10
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
10
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
10
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
10
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
10
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
10
    _memory_used_counter =
585
10
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
10
    _common_profile->add_info_string("IsColocate",
587
10
                                     std::to_string(_parent->is_colocated_operator()));
588
10
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
10
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
10
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
10
    return Status::OK();
592
10
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
48
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
48
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
48
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
48
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
48
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
48
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
48
    _operator_profile->add_child(_common_profile.get(), true);
542
48
    _operator_profile->add_child(_custom_profile.get(), true);
543
48
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
    if constexpr (!is_fake_shared) {
545
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
                                    .first.get()
548
                                    ->template cast<SharedStateArg>();
549
550
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
            _dependency = _shared_state->create_source_dependency(
561
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
        }
569
    }
570
571
48
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
48
    _rows_returned_counter =
576
48
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
48
    _blocks_returned_counter =
578
48
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
48
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
48
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
48
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
48
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
48
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
48
    _memory_used_counter =
585
48
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
48
    _common_profile->add_info_string("IsColocate",
587
48
                                     std::to_string(_parent->is_colocated_operator()));
588
48
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
48
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
48
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
48
    return Status::OK();
592
48
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
2
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
2
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
2
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
2
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
2
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
2
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
2
    _operator_profile->add_child(_common_profile.get(), true);
542
2
    _operator_profile->add_child(_custom_profile.get(), true);
543
2
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
2
    if constexpr (!is_fake_shared) {
545
2
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
2
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
1
            _dependency = _shared_state->create_source_dependency(
561
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
1
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
1
        }
569
2
    }
570
571
2
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
2
    _rows_returned_counter =
576
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
2
    _blocks_returned_counter =
578
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
2
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
2
    _memory_used_counter =
585
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
2
    _common_profile->add_info_string("IsColocate",
587
2
                                     std::to_string(_parent->is_colocated_operator()));
588
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
2
    return Status::OK();
592
2
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
3
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
3
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
3
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
3
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
3
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
3
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
3
    _operator_profile->add_child(_common_profile.get(), true);
542
3
    _operator_profile->add_child(_custom_profile.get(), true);
543
3
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
3
    if constexpr (!is_fake_shared) {
545
3
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
3
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
3
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
3
            _dependency = _shared_state->create_source_dependency(
561
3
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
3
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
3
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
3
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
0
        }
569
3
    }
570
571
3
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
3
    _rows_returned_counter =
576
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
3
    _blocks_returned_counter =
578
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
3
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
3
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
3
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
3
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
3
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
3
    _memory_used_counter =
585
3
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
3
    _common_profile->add_info_string("IsColocate",
587
3
                                     std::to_string(_parent->is_colocated_operator()));
588
3
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
3
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
3
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
3
    return Status::OK();
592
3
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
102
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
102
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
102
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
102
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
102
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
102
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
102
    _operator_profile->add_child(_common_profile.get(), true);
542
102
    _operator_profile->add_child(_custom_profile.get(), true);
543
102
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
102
    if constexpr (!is_fake_shared) {
545
102
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
102
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
102
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
102
            _dependency = _shared_state->create_source_dependency(
561
102
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
102
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
102
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
102
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
0
        }
569
102
    }
570
571
102
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
102
    _rows_returned_counter =
576
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
102
    _blocks_returned_counter =
578
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
102
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
102
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
102
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
102
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
102
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
102
    _memory_used_counter =
585
102
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
102
    _common_profile->add_info_string("IsColocate",
587
102
                                     std::to_string(_parent->is_colocated_operator()));
588
102
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
102
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
102
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
102
    return Status::OK();
592
102
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
533
10
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
534
10
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
535
10
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
536
10
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
537
10
    _operator_profile->set_metadata(_parent->node_id());
538
    // indent is false so that source operator will have same
539
    // indentation_level with its parent operator.
540
10
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
541
10
    _operator_profile->add_child(_common_profile.get(), true);
542
10
    _operator_profile->add_child(_custom_profile.get(), true);
543
10
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
544
10
    if constexpr (!is_fake_shared) {
545
10
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
546
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
547
0
                                    .first.get()
548
0
                                    ->template cast<SharedStateArg>();
549
550
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
551
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
552
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
553
10
        } else if (info.shared_state) {
554
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
555
                DCHECK(false);
556
            }
557
            // For UnionSourceOperator without children, there is no shared state.
558
10
            _shared_state = info.shared_state->template cast<SharedStateArg>();
559
560
10
            _dependency = _shared_state->create_source_dependency(
561
10
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
562
10
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
10
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
10
        } else {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
0
        }
569
10
    }
570
571
10
    if (must_set_shared_state() && _shared_state == nullptr) {
572
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
573
0
    }
574
575
10
    _rows_returned_counter =
576
10
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
577
10
    _blocks_returned_counter =
578
10
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
579
10
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
580
10
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
581
10
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
582
10
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
583
10
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
584
10
    _memory_used_counter =
585
10
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
586
10
    _common_profile->add_info_string("IsColocate",
587
10
                                     std::to_string(_parent->is_colocated_operator()));
588
10
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
589
10
    _common_profile->add_info_string("FollowedByShuffledOperator",
590
10
                                     std::to_string(_parent->followed_by_shuffled_operator()));
591
10
    return Status::OK();
592
10
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
593
594
template <typename SharedStateArg>
595
24.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
24.2k
    _conjuncts.resize(_parent->_conjuncts.size());
597
24.2k
    _projections.resize(_parent->_projections.size());
598
24.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
90.2k
    for (size_t i = 0; i < _projections.size(); i++) {
602
65.9k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
65.9k
    }
604
24.2k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
24.2k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
24.2k
    return Status::OK();
613
24.2k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
24.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
24.0k
    _conjuncts.resize(_parent->_conjuncts.size());
597
24.0k
    _projections.resize(_parent->_projections.size());
598
24.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
89.9k
    for (size_t i = 0; i < _projections.size(); i++) {
602
65.9k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
65.9k
    }
604
24.0k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
24.0k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
24.0k
    return Status::OK();
613
24.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
3
    _conjuncts.resize(_parent->_conjuncts.size());
597
3
    _projections.resize(_parent->_projections.size());
598
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
3
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
3
    return Status::OK();
613
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
20
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
20
    _conjuncts.resize(_parent->_conjuncts.size());
597
20
    _projections.resize(_parent->_projections.size());
598
20
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
20
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
20
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
20
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
20
    return Status::OK();
613
20
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
11
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
11
    _conjuncts.resize(_parent->_conjuncts.size());
597
11
    _projections.resize(_parent->_projections.size());
598
11
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
11
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
11
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
11
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
11
    return Status::OK();
613
11
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
9
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
9
    _conjuncts.resize(_parent->_conjuncts.size());
597
9
    _projections.resize(_parent->_projections.size());
598
9
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
9
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
9
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
9
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
9
    return Status::OK();
613
9
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
37
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
37
    _conjuncts.resize(_parent->_conjuncts.size());
597
37
    _projections.resize(_parent->_projections.size());
598
37
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
37
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
37
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
37
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
37
    return Status::OK();
613
37
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
14
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
14
    _conjuncts.resize(_parent->_conjuncts.size());
597
14
    _projections.resize(_parent->_projections.size());
598
14
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
14
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
14
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
14
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
14
    return Status::OK();
613
14
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
31
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
31
    _conjuncts.resize(_parent->_conjuncts.size());
597
31
    _projections.resize(_parent->_projections.size());
598
31
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
31
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
31
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
31
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
31
    return Status::OK();
613
31
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
2
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
2
    _conjuncts.resize(_parent->_conjuncts.size());
597
2
    _projections.resize(_parent->_projections.size());
598
2
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
2
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
2
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
2
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
2
    return Status::OK();
613
2
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
3
    _conjuncts.resize(_parent->_conjuncts.size());
597
3
    _projections.resize(_parent->_projections.size());
598
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
3
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
3
    return Status::OK();
613
3
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
102
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
102
    _conjuncts.resize(_parent->_conjuncts.size());
597
102
    _projections.resize(_parent->_projections.size());
598
102
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
102
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
102
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
102
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
102
    return Status::OK();
613
102
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
595
10
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
596
10
    _conjuncts.resize(_parent->_conjuncts.size());
597
10
    _projections.resize(_parent->_projections.size());
598
10
    for (size_t i = 0; i < _conjuncts.size(); i++) {
599
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
600
0
    }
601
10
    for (size_t i = 0; i < _projections.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
603
0
    }
604
10
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
605
10
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
606
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
607
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
608
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
609
0
                    state, _intermediate_projections[i][j]));
610
0
        }
611
0
    }
612
10
    return Status::OK();
613
10
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
614
615
template <typename SharedStateArg>
616
0
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
617
0
    if (_terminated) {
618
0
        return Status::OK();
619
0
    }
620
0
    _terminated = true;
621
0
    return Status::OK();
622
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
623
624
template <typename SharedStateArg>
625
24.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
24.0k
    if (_closed) {
627
1
        return Status::OK();
628
1
    }
629
24.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
24.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
24.0k
    }
632
24.0k
    _closed = true;
633
24.0k
    return Status::OK();
634
24.0k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
24.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
24.0k
    if (_closed) {
627
0
        return Status::OK();
628
0
    }
629
24.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
24.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
24.0k
    }
632
24.0k
    _closed = true;
633
24.0k
    return Status::OK();
634
24.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
3
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
3
    if (_closed) {
627
0
        return Status::OK();
628
0
    }
629
3
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
3
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
3
    }
632
3
    _closed = true;
633
3
    return Status::OK();
634
3
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
11
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
11
    if (_closed) {
627
0
        return Status::OK();
628
0
    }
629
11
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
11
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
11
    }
632
11
    _closed = true;
633
11
    return Status::OK();
634
11
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
1
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
1
    if (_closed) {
627
0
        return Status::OK();
628
0
    }
629
1
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
1
    }
632
1
    _closed = true;
633
1
    return Status::OK();
634
1
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
9
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
9
    if (_closed) {
627
0
        return Status::OK();
628
0
    }
629
9
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
9
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
9
    }
632
9
    _closed = true;
633
9
    return Status::OK();
634
9
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
625
20
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
626
20
    if (_closed) {
627
1
        return Status::OK();
628
1
    }
629
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
630
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
631
    }
632
19
    _closed = true;
633
19
    return Status::OK();
634
20
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
635
636
template <typename SharedState>
637
72.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
72.3k
    _operator_profile =
640
72.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
72.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
72.3k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
72.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
72.3k
    _operator_profile->add_child(_common_profile, true);
649
72.3k
    _operator_profile->add_child(_custom_profile, true);
650
651
72.3k
    _operator_profile->set_metadata(_parent->node_id());
652
72.3k
    _wait_for_finish_dependency_timer =
653
72.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
72.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
72.3k
    if constexpr (!is_fake_shared) {
656
72.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
72.3k
            info.shared_state_map.end()) {
658
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
0
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
0
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
72.3k
        } else {
668
72.3k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
0
                DCHECK(false);
670
0
            }
671
72.3k
            _shared_state = info.shared_state->template cast<SharedState>();
672
72.3k
            _dependency = _shared_state->create_sink_dependency(
673
72.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
72.3k
        }
675
72.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
72.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
72.3k
    }
678
679
72.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
72.3k
    _rows_input_counter =
684
72.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
72.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
72.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
72.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
72.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
72.3k
    _memory_used_counter =
690
72.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
72.3k
    _common_profile->add_info_string("IsColocate",
692
72.3k
                                     std::to_string(_parent->is_colocated_operator()));
693
72.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
72.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
72.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
72.3k
    return Status::OK();
697
72.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
72.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
72.0k
    _operator_profile =
640
72.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
72.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
72.0k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
72.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
72.0k
    _operator_profile->add_child(_common_profile, true);
649
72.0k
    _operator_profile->add_child(_custom_profile, true);
650
651
72.0k
    _operator_profile->set_metadata(_parent->node_id());
652
72.0k
    _wait_for_finish_dependency_timer =
653
72.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
72.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
72.0k
    if constexpr (!is_fake_shared) {
656
72.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
72.0k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
72.0k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
72.0k
            _shared_state = info.shared_state->template cast<SharedState>();
672
72.0k
            _dependency = _shared_state->create_sink_dependency(
673
72.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
72.0k
        }
675
72.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
72.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
72.0k
    }
678
679
72.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
72.0k
    _rows_input_counter =
684
72.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
72.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
72.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
72.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
72.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
72.0k
    _memory_used_counter =
690
72.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
72.0k
    _common_profile->add_info_string("IsColocate",
692
72.0k
                                     std::to_string(_parent->is_colocated_operator()));
693
72.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
72.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
72.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
72.0k
    return Status::OK();
697
72.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
2
    _operator_profile =
640
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
2
    _operator_profile->add_child(_common_profile, true);
649
2
    _operator_profile->add_child(_custom_profile, true);
650
651
2
    _operator_profile->set_metadata(_parent->node_id());
652
2
    _wait_for_finish_dependency_timer =
653
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
2
    if constexpr (!is_fake_shared) {
656
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
2
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
2
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
2
            _shared_state = info.shared_state->template cast<SharedState>();
672
2
            _dependency = _shared_state->create_sink_dependency(
673
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
2
        }
675
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
2
    }
678
679
2
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
2
    _rows_input_counter =
684
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
2
    _memory_used_counter =
690
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
2
    _common_profile->add_info_string("IsColocate",
692
2
                                     std::to_string(_parent->is_colocated_operator()));
693
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
2
    return Status::OK();
697
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
26
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
26
    _operator_profile =
640
26
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
26
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
26
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
26
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
26
    _operator_profile->add_child(_common_profile, true);
649
26
    _operator_profile->add_child(_custom_profile, true);
650
651
26
    _operator_profile->set_metadata(_parent->node_id());
652
26
    _wait_for_finish_dependency_timer =
653
26
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
26
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
26
    if constexpr (!is_fake_shared) {
656
26
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
26
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
26
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
26
            _shared_state = info.shared_state->template cast<SharedState>();
672
26
            _dependency = _shared_state->create_sink_dependency(
673
26
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
26
        }
675
26
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
26
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
26
    }
678
679
26
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
26
    _rows_input_counter =
684
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
26
    _memory_used_counter =
690
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
26
    _common_profile->add_info_string("IsColocate",
692
26
                                     std::to_string(_parent->is_colocated_operator()));
693
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
26
    return Status::OK();
697
26
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
17
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
17
    _operator_profile =
640
17
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
17
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
17
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
17
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
17
    _operator_profile->add_child(_common_profile, true);
649
17
    _operator_profile->add_child(_custom_profile, true);
650
651
17
    _operator_profile->set_metadata(_parent->node_id());
652
17
    _wait_for_finish_dependency_timer =
653
17
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
17
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
17
    if constexpr (!is_fake_shared) {
656
17
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
17
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
17
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
17
            _shared_state = info.shared_state->template cast<SharedState>();
672
17
            _dependency = _shared_state->create_sink_dependency(
673
17
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
17
        }
675
17
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
17
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
17
    }
678
679
17
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
17
    _rows_input_counter =
684
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
17
    _memory_used_counter =
690
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
17
    _common_profile->add_info_string("IsColocate",
692
17
                                     std::to_string(_parent->is_colocated_operator()));
693
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
17
    return Status::OK();
697
17
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
9
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
9
    _operator_profile =
640
9
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
9
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
9
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
9
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
9
    _operator_profile->add_child(_common_profile, true);
649
9
    _operator_profile->add_child(_custom_profile, true);
650
651
9
    _operator_profile->set_metadata(_parent->node_id());
652
9
    _wait_for_finish_dependency_timer =
653
9
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
9
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
9
    if constexpr (!is_fake_shared) {
656
9
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
9
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
9
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
9
            _shared_state = info.shared_state->template cast<SharedState>();
672
9
            _dependency = _shared_state->create_sink_dependency(
673
9
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
9
        }
675
9
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
9
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
9
    }
678
679
9
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
9
    _rows_input_counter =
684
9
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
9
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
9
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
9
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
9
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
9
    _memory_used_counter =
690
9
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
9
    _common_profile->add_info_string("IsColocate",
692
9
                                     std::to_string(_parent->is_colocated_operator()));
693
9
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
9
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
9
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
9
    return Status::OK();
697
9
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
47
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
47
    _operator_profile =
640
47
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
47
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
47
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
47
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
47
    _operator_profile->add_child(_common_profile, true);
649
47
    _operator_profile->add_child(_custom_profile, true);
650
651
47
    _operator_profile->set_metadata(_parent->node_id());
652
47
    _wait_for_finish_dependency_timer =
653
47
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
47
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
47
    if constexpr (!is_fake_shared) {
656
47
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
47
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
47
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
47
            _shared_state = info.shared_state->template cast<SharedState>();
672
47
            _dependency = _shared_state->create_sink_dependency(
673
47
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
47
        }
675
47
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
47
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
47
    }
678
679
47
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
47
    _rows_input_counter =
684
47
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
47
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
47
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
47
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
47
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
47
    _memory_used_counter =
690
47
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
47
    _common_profile->add_info_string("IsColocate",
692
47
                                     std::to_string(_parent->is_colocated_operator()));
693
47
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
47
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
47
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
47
    return Status::OK();
697
47
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
20
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
20
    _operator_profile =
640
20
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
20
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
20
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
20
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
20
    _operator_profile->add_child(_common_profile, true);
649
20
    _operator_profile->add_child(_custom_profile, true);
650
651
20
    _operator_profile->set_metadata(_parent->node_id());
652
20
    _wait_for_finish_dependency_timer =
653
20
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
20
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
20
    if constexpr (!is_fake_shared) {
656
20
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
20
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
20
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
20
            _shared_state = info.shared_state->template cast<SharedState>();
672
20
            _dependency = _shared_state->create_sink_dependency(
673
20
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
20
        }
675
20
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
20
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
20
    }
678
679
20
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
20
    _rows_input_counter =
684
20
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
20
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
20
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
20
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
20
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
20
    _memory_used_counter =
690
20
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
20
    _common_profile->add_info_string("IsColocate",
692
20
                                     std::to_string(_parent->is_colocated_operator()));
693
20
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
20
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
20
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
20
    return Status::OK();
697
20
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
7
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
7
    _operator_profile =
640
7
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
7
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
7
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
7
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
7
    _operator_profile->add_child(_common_profile, true);
649
7
    _operator_profile->add_child(_custom_profile, true);
650
651
7
    _operator_profile->set_metadata(_parent->node_id());
652
7
    _wait_for_finish_dependency_timer =
653
7
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
7
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
    if constexpr (!is_fake_shared) {
656
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
                                                  ? 0
664
                                                  : info.task_idx]
665
                                  .get();
666
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
            _shared_state = info.shared_state->template cast<SharedState>();
672
            _dependency = _shared_state->create_sink_dependency(
673
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
        }
675
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
    }
678
679
7
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
7
    _rows_input_counter =
684
7
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
7
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
7
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
7
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
7
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
7
    _memory_used_counter =
690
7
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
7
    _common_profile->add_info_string("IsColocate",
692
7
                                     std::to_string(_parent->is_colocated_operator()));
693
7
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
7
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
7
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
7
    return Status::OK();
697
7
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
3
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
3
    _operator_profile =
640
3
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
3
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
3
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
3
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
3
    _operator_profile->add_child(_common_profile, true);
649
3
    _operator_profile->add_child(_custom_profile, true);
650
651
3
    _operator_profile->set_metadata(_parent->node_id());
652
3
    _wait_for_finish_dependency_timer =
653
3
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
3
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
3
    if constexpr (!is_fake_shared) {
656
3
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
3
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
3
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
3
            _shared_state = info.shared_state->template cast<SharedState>();
672
3
            _dependency = _shared_state->create_sink_dependency(
673
3
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
3
        }
675
3
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
3
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
3
    }
678
679
3
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
3
    _rows_input_counter =
684
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
3
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
3
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
3
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
3
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
3
    _memory_used_counter =
690
3
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
3
    _common_profile->add_info_string("IsColocate",
692
3
                                     std::to_string(_parent->is_colocated_operator()));
693
3
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
3
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
3
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
3
    return Status::OK();
697
3
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
102
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
102
    _operator_profile =
640
102
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
102
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
102
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
102
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
102
    _operator_profile->add_child(_common_profile, true);
649
102
    _operator_profile->add_child(_custom_profile, true);
650
651
102
    _operator_profile->set_metadata(_parent->node_id());
652
102
    _wait_for_finish_dependency_timer =
653
102
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
102
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
102
    if constexpr (!is_fake_shared) {
656
102
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
102
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
102
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
102
            _shared_state = info.shared_state->template cast<SharedState>();
672
102
            _dependency = _shared_state->create_sink_dependency(
673
102
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
102
        }
675
102
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
102
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
102
    }
678
679
102
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
102
    _rows_input_counter =
684
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
102
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
102
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
102
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
102
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
102
    _memory_used_counter =
690
102
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
102
    _common_profile->add_info_string("IsColocate",
692
102
                                     std::to_string(_parent->is_colocated_operator()));
693
102
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
102
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
102
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
102
    return Status::OK();
697
102
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
23
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
23
    _operator_profile =
640
23
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
23
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
23
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
23
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
23
    _operator_profile->add_child(_common_profile, true);
649
23
    _operator_profile->add_child(_custom_profile, true);
650
651
23
    _operator_profile->set_metadata(_parent->node_id());
652
23
    _wait_for_finish_dependency_timer =
653
23
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
23
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
23
    if constexpr (!is_fake_shared) {
656
23
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
23
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
23
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
23
            _shared_state = info.shared_state->template cast<SharedState>();
672
23
            _dependency = _shared_state->create_sink_dependency(
673
23
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
23
        }
675
23
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
23
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
23
    }
678
679
23
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
23
    _rows_input_counter =
684
23
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
23
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
23
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
23
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
23
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
23
    _memory_used_counter =
690
23
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
23
    _common_profile->add_info_string("IsColocate",
692
23
                                     std::to_string(_parent->is_colocated_operator()));
693
23
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
23
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
23
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
23
    return Status::OK();
697
23
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
15
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
15
    _operator_profile =
640
15
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
15
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
15
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
15
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
15
    _operator_profile->add_child(_common_profile, true);
649
15
    _operator_profile->add_child(_custom_profile, true);
650
651
15
    _operator_profile->set_metadata(_parent->node_id());
652
15
    _wait_for_finish_dependency_timer =
653
15
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
15
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
15
    if constexpr (!is_fake_shared) {
656
15
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
15
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
15
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
15
            _shared_state = info.shared_state->template cast<SharedState>();
672
15
            _dependency = _shared_state->create_sink_dependency(
673
15
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
15
        }
675
15
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
15
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
15
    }
678
679
15
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
15
    _rows_input_counter =
684
15
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
15
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
15
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
15
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
15
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
15
    _memory_used_counter =
690
15
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
15
    _common_profile->add_info_string("IsColocate",
692
15
                                     std::to_string(_parent->is_colocated_operator()));
693
15
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
15
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
15
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
15
    return Status::OK();
697
15
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
637
3
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
638
    // create profile
639
3
    _operator_profile =
640
3
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
641
3
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
642
3
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
643
644
    // indentation is true
645
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
646
    // So we should set the indentation to true.
647
3
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
648
3
    _operator_profile->add_child(_common_profile, true);
649
3
    _operator_profile->add_child(_custom_profile, true);
650
651
3
    _operator_profile->set_metadata(_parent->node_id());
652
3
    _wait_for_finish_dependency_timer =
653
3
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
654
3
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
3
    if constexpr (!is_fake_shared) {
656
3
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
3
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
3
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
3
            _shared_state = info.shared_state->template cast<SharedState>();
672
3
            _dependency = _shared_state->create_sink_dependency(
673
3
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
3
        }
675
3
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
3
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
3
    }
678
679
3
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
3
    _rows_input_counter =
684
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
685
3
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
686
3
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
687
3
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
688
3
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
689
3
    _memory_used_counter =
690
3
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
691
3
    _common_profile->add_info_string("IsColocate",
692
3
                                     std::to_string(_parent->is_colocated_operator()));
693
3
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
694
3
    _common_profile->add_info_string("FollowedByShuffledOperator",
695
3
                                     std::to_string(_parent->followed_by_shuffled_operator()));
696
3
    return Status::OK();
697
3
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
698
699
template <typename SharedState>
700
72.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
72.0k
    if (_closed) {
702
2
        return Status::OK();
703
2
    }
704
72.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
72.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
72.0k
    }
707
72.0k
    _closed = true;
708
72.0k
    return Status::OK();
709
72.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
72.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
72.0k
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
72.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
72.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
72.0k
    }
707
72.0k
    _closed = true;
708
72.0k
    return Status::OK();
709
72.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
1
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
1
    }
707
1
    _closed = true;
708
1
    return Status::OK();
709
1
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
9
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
9
    if (_closed) {
702
2
        return Status::OK();
703
2
    }
704
7
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
7
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
7
    }
707
7
    _closed = true;
708
7
    return Status::OK();
709
9
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
1
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
1
    }
707
1
    _closed = true;
708
1
    return Status::OK();
709
1
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
9
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
9
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
9
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
9
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
9
    }
707
9
    _closed = true;
708
9
    return Status::OK();
709
9
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
700
3
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
3
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
    }
707
3
    _closed = true;
708
3
    return Status::OK();
709
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
700
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
701
1
    if (_closed) {
702
0
        return Status::OK();
703
0
    }
704
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
705
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
706
1
    }
707
1
    _closed = true;
708
1
    return Status::OK();
709
1
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
710
711
template <typename LocalStateType>
712
4
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
713
4
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
714
4
    return pull(state, block, eos);
715
4
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
712
4
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
713
4
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
714
4
    return pull(state, block, eos);
715
4
}
Unexecuted instantiation: _ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
716
717
template <typename LocalStateType>
718
62
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
719
62
    auto& local_state = get_local_state(state);
720
62
    if (need_more_input_data(state)) {
721
56
        local_state._child_block->clear_column_data(
722
56
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
723
56
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
724
56
                state, local_state._child_block.get(), &local_state._child_eos));
725
56
        *eos = local_state._child_eos;
726
56
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
727
2
            return Status::OK();
728
2
        }
729
54
        {
730
54
            SCOPED_TIMER(local_state.exec_time_counter());
731
54
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
732
54
        }
733
54
    }
734
735
60
    if (!need_more_input_data(state)) {
736
60
        SCOPED_TIMER(local_state.exec_time_counter());
737
60
        bool new_eos = false;
738
60
        RETURN_IF_ERROR(pull(state, block, &new_eos));
739
60
        if (new_eos) {
740
35
            *eos = true;
741
35
        } else if (!need_more_input_data(state)) {
742
0
            *eos = false;
743
0
        }
744
60
    }
745
60
    return Status::OK();
746
60
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
718
60
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
719
60
    auto& local_state = get_local_state(state);
720
60
    if (need_more_input_data(state)) {
721
54
        local_state._child_block->clear_column_data(
722
54
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
723
54
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
724
54
                state, local_state._child_block.get(), &local_state._child_eos));
725
54
        *eos = local_state._child_eos;
726
54
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
727
2
            return Status::OK();
728
2
        }
729
52
        {
730
52
            SCOPED_TIMER(local_state.exec_time_counter());
731
52
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
732
52
        }
733
52
    }
734
735
58
    if (!need_more_input_data(state)) {
736
58
        SCOPED_TIMER(local_state.exec_time_counter());
737
58
        bool new_eos = false;
738
58
        RETURN_IF_ERROR(pull(state, block, &new_eos));
739
58
        if (new_eos) {
740
33
            *eos = true;
741
33
        } else if (!need_more_input_data(state)) {
742
0
            *eos = false;
743
0
        }
744
58
    }
745
58
    return Status::OK();
746
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
718
2
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
719
2
    auto& local_state = get_local_state(state);
720
2
    if (need_more_input_data(state)) {
721
2
        local_state._child_block->clear_column_data(
722
2
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
723
2
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
724
2
                state, local_state._child_block.get(), &local_state._child_eos));
725
2
        *eos = local_state._child_eos;
726
2
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
727
0
            return Status::OK();
728
0
        }
729
2
        {
730
2
            SCOPED_TIMER(local_state.exec_time_counter());
731
2
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
732
2
        }
733
2
    }
734
735
2
    if (!need_more_input_data(state)) {
736
2
        SCOPED_TIMER(local_state.exec_time_counter());
737
2
        bool new_eos = false;
738
2
        RETURN_IF_ERROR(pull(state, block, &new_eos));
739
2
        if (new_eos) {
740
2
            *eos = true;
741
2
        } else if (!need_more_input_data(state)) {
742
0
            *eos = false;
743
0
        }
744
2
    }
745
2
    return Status::OK();
746
2
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
747
748
template <typename Writer, typename Parent>
749
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
750
0
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
751
0
    RETURN_IF_ERROR(Base::init(state, info));
752
0
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
753
0
                                                         "AsyncWriterDependency", true);
754
0
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
755
0
                             _finish_dependency));
756
757
0
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
758
0
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
759
0
    return Status::OK();
760
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
761
762
template <typename Writer, typename Parent>
763
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
764
0
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
765
0
    RETURN_IF_ERROR(Base::open(state));
766
0
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
767
0
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
768
0
        RETURN_IF_ERROR(
769
0
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
770
0
    }
771
0
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
772
0
    return Status::OK();
773
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
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
0
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
778
0
    return _writer->sink(block, eos);
779
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
780
781
template <typename Writer, typename Parent>
782
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
783
0
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
784
0
    if (_closed) {
785
0
        return Status::OK();
786
0
    }
787
0
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
788
0
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
789
    // if the init failed, the _writer may be nullptr. so here need check
790
0
    if (_writer) {
791
0
        Status st = _writer->get_writer_status();
792
0
        if (exec_status.ok()) {
793
0
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
794
0
                                                       : Status::Cancelled("force close"));
795
0
        } else {
796
0
            _writer->force_close(exec_status);
797
0
        }
798
        // If there is an error in process_block thread, then we should get the writer
799
        // status before call force_close. For example, the thread may failed in commit
800
        // transaction.
801
0
        RETURN_IF_ERROR(st);
802
0
    }
803
0
    return Base::close(state, exec_status);
804
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
805
806
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
807
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
808
DECLARE_OPERATOR(ResultSinkLocalState)
809
DECLARE_OPERATOR(JdbcTableSinkLocalState)
810
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
811
DECLARE_OPERATOR(ResultFileSinkLocalState)
812
DECLARE_OPERATOR(OlapTableSinkLocalState)
813
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
814
DECLARE_OPERATOR(HiveTableSinkLocalState)
815
DECLARE_OPERATOR(TVFTableSinkLocalState)
816
DECLARE_OPERATOR(IcebergTableSinkLocalState)
817
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
818
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
819
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
820
DECLARE_OPERATOR(MCTableSinkLocalState)
821
DECLARE_OPERATOR(AnalyticSinkLocalState)
822
DECLARE_OPERATOR(BlackholeSinkLocalState)
823
DECLARE_OPERATOR(SortSinkLocalState)
824
DECLARE_OPERATOR(SpillSortSinkLocalState)
825
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
826
DECLARE_OPERATOR(AggSinkLocalState)
827
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
828
DECLARE_OPERATOR(ExchangeSinkLocalState)
829
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
830
DECLARE_OPERATOR(UnionSinkLocalState)
831
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
832
DECLARE_OPERATOR(PartitionSortSinkLocalState)
833
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
834
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
835
DECLARE_OPERATOR(SetSinkLocalState<true>)
836
DECLARE_OPERATOR(SetSinkLocalState<false>)
837
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
838
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
839
DECLARE_OPERATOR(CacheSinkLocalState)
840
DECLARE_OPERATOR(DictSinkLocalState)
841
DECLARE_OPERATOR(RecCTESinkLocalState)
842
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
843
844
#undef DECLARE_OPERATOR
845
846
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
847
DECLARE_OPERATOR(HashJoinProbeLocalState)
848
DECLARE_OPERATOR(OlapScanLocalState)
849
DECLARE_OPERATOR(GroupCommitLocalState)
850
DECLARE_OPERATOR(JDBCScanLocalState)
851
DECLARE_OPERATOR(FileScanLocalState)
852
DECLARE_OPERATOR(EsScanLocalState)
853
DECLARE_OPERATOR(AnalyticLocalState)
854
DECLARE_OPERATOR(SortLocalState)
855
DECLARE_OPERATOR(SpillSortLocalState)
856
DECLARE_OPERATOR(LocalMergeSortLocalState)
857
DECLARE_OPERATOR(AggLocalState)
858
DECLARE_OPERATOR(PartitionedAggLocalState)
859
DECLARE_OPERATOR(TableFunctionLocalState)
860
DECLARE_OPERATOR(ExchangeLocalState)
861
DECLARE_OPERATOR(RepeatLocalState)
862
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
863
DECLARE_OPERATOR(AssertNumRowsLocalState)
864
DECLARE_OPERATOR(EmptySetLocalState)
865
DECLARE_OPERATOR(UnionSourceLocalState)
866
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
867
DECLARE_OPERATOR(PartitionSortSourceLocalState)
868
DECLARE_OPERATOR(SetSourceLocalState<true>)
869
DECLARE_OPERATOR(SetSourceLocalState<false>)
870
DECLARE_OPERATOR(DataGenLocalState)
871
DECLARE_OPERATOR(SchemaScanLocalState)
872
DECLARE_OPERATOR(MetaScanLocalState)
873
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
874
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
875
DECLARE_OPERATOR(CacheSourceLocalState)
876
DECLARE_OPERATOR(RecCTESourceLocalState)
877
DECLARE_OPERATOR(RecCTEScanLocalState)
878
879
#ifdef BE_TEST
880
DECLARE_OPERATOR(MockLocalState)
881
DECLARE_OPERATOR(MockScanLocalState)
882
#endif
883
#undef DECLARE_OPERATOR
884
885
template class StreamingOperatorX<AssertNumRowsLocalState>;
886
template class StreamingOperatorX<SelectLocalState>;
887
888
template class StatefulOperatorX<HashJoinProbeLocalState>;
889
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
890
template class StatefulOperatorX<RepeatLocalState>;
891
template class StatefulOperatorX<MaterializationLocalState>;
892
template class StatefulOperatorX<StreamingAggLocalState>;
893
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
894
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
895
template class StatefulOperatorX<TableFunctionLocalState>;
896
897
template class PipelineXSinkLocalState<HashJoinSharedState>;
898
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
899
template class PipelineXSinkLocalState<SortSharedState>;
900
template class PipelineXSinkLocalState<SpillSortSharedState>;
901
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
902
template class PipelineXSinkLocalState<AnalyticSharedState>;
903
template class PipelineXSinkLocalState<AggSharedState>;
904
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
905
template class PipelineXSinkLocalState<FakeSharedState>;
906
template class PipelineXSinkLocalState<UnionSharedState>;
907
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
908
template class PipelineXSinkLocalState<MultiCastSharedState>;
909
template class PipelineXSinkLocalState<SetSharedState>;
910
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
911
template class PipelineXSinkLocalState<BasicSharedState>;
912
template class PipelineXSinkLocalState<DataQueueSharedState>;
913
template class PipelineXSinkLocalState<RecCTESharedState>;
914
915
template class PipelineXLocalState<HashJoinSharedState>;
916
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
917
template class PipelineXLocalState<SortSharedState>;
918
template class PipelineXLocalState<SpillSortSharedState>;
919
template class PipelineXLocalState<NestedLoopJoinSharedState>;
920
template class PipelineXLocalState<AnalyticSharedState>;
921
template class PipelineXLocalState<AggSharedState>;
922
template class PipelineXLocalState<PartitionedAggSharedState>;
923
template class PipelineXLocalState<FakeSharedState>;
924
template class PipelineXLocalState<UnionSharedState>;
925
template class PipelineXLocalState<DataQueueSharedState>;
926
template class PipelineXLocalState<MultiCastSharedState>;
927
template class PipelineXLocalState<PartitionSortNodeSharedState>;
928
template class PipelineXLocalState<SetSharedState>;
929
template class PipelineXLocalState<LocalExchangeSharedState>;
930
template class PipelineXLocalState<BasicSharedState>;
931
template class PipelineXLocalState<RecCTESharedState>;
932
933
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
934
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
935
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
936
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
937
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
938
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
939
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
940
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
941
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
942
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
943
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
944
945
#ifdef BE_TEST
946
template class OperatorX<DummyOperatorLocalState>;
947
template class DataSinkOperatorX<DummySinkLocalState>;
948
#endif
949
950
#include "common/compile_check_end.h"
951
} // namespace doris