Coverage Report

Created: 2026-05-17 18:25

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