Coverage Report

Created: 2026-08-01 19:58

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