Coverage Report

Created: 2026-09-30 08:37

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include <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
27.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
27.9k
    if (_parent->nereids_id() == -1) {
122
2.10k
        return fmt::format("(id={})", _parent->node_id());
123
25.8k
    } else {
124
25.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
25.8k
    }
126
27.9k
}
_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
199
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
199
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
187
    } else {
124
187
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
187
    }
126
199
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
15
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
15
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
15
    } else {
124
15
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
15
    }
126
15
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
316
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
316
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
316
    } else {
124
316
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
316
    }
126
316
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
16
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
16
    if (_parent->nereids_id() == -1) {
122
16
        return fmt::format("(id={})", _parent->node_id());
123
16
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
16
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
923
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
923
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
894
    } else {
124
894
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
894
    }
126
923
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
138
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
138
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
138
    } else {
124
138
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
138
    }
126
138
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
1.52k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.52k
    if (_parent->nereids_id() == -1) {
122
1.34k
        return fmt::format("(id={})", _parent->node_id());
123
1.34k
    } else {
124
185
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
185
    }
126
1.52k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
36
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
36
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
34
    } else {
124
34
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
34
    }
126
36
}
_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
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
474
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
474
    if (_parent->nereids_id() == -1) {
122
474
        return fmt::format("(id={})", _parent->node_id());
123
474
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
474
}
_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
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
106
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
106
    if (_parent->nereids_id() == -1) {
122
106
        return fmt::format("(id={})", _parent->node_id());
123
106
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
106
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
127
128
template <typename SharedStateArg>
129
74.7k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
74.7k
    if (_parent->nereids_id() == -1) {
131
1.10k
        return fmt::format("(id={})", _parent->node_id());
132
73.6k
    } else {
133
73.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
73.6k
    }
135
74.7k
}
_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
203
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
203
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
194
    } else {
133
194
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
194
    }
135
203
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
22
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
22
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
22
    } else {
133
22
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
22
    }
135
22
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
317
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
317
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
317
    } else {
133
317
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
317
    }
135
317
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
16
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
16
    if (_parent->nereids_id() == -1) {
131
16
        return fmt::format("(id={})", _parent->node_id());
132
16
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
16
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
933
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
933
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
904
    } else {
133
904
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
904
    }
135
933
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
148
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
148
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
148
    } else {
133
148
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
148
    }
135
148
}
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
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
14
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
14
    if (_parent->nereids_id() == -1) {
131
14
        return fmt::format("(id={})", _parent->node_id());
132
14
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
14
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
888
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
888
    if (_parent->nereids_id() == -1) {
131
888
        return fmt::format("(id={})", _parent->node_id());
132
888
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
888
}
_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
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2
    _terminated = true;
143
2
    return Status::OK();
144
2
}
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
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2
    _terminated = true;
143
2
    return Status::OK();
144
2
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
78
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
78
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
78
    _terminated = true;
143
78
    return Status::OK();
144
78
}
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
4.16k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
4.16k
    return _child && _child->is_serial_operator() && !is_source()
148
4.16k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
4.16k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
4.16k
}
151
152
478
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
478
    if (!_child) {
154
158
        return false;
155
158
    }
156
320
    if (_child->is_serial_operator()) {
157
80
        return true;
158
80
    }
159
240
    const auto child_distribution = _child->required_data_distribution(state);
160
240
    return child_distribution.need_local_exchange() &&
161
240
           !is_shuffled_exchange(child_distribution.distribution_type);
162
320
}
163
164
template <typename SharedStateArg>
165
14.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
14.9k
    fmt::memory_buffer debug_string_buffer;
167
14.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
14.9k
    return fmt::to_string(debug_string_buffer);
169
14.9k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
3
    fmt::memory_buffer debug_string_buffer;
167
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
3
    return fmt::to_string(debug_string_buffer);
169
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
165
14.8k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
14.8k
    fmt::memory_buffer debug_string_buffer;
167
14.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
14.8k
    return fmt::to_string(debug_string_buffer);
169
14.8k
}
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
170
171
template <typename SharedStateArg>
172
14.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
14.8k
    fmt::memory_buffer debug_string_buffer;
174
14.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
14.8k
    return fmt::to_string(debug_string_buffer);
176
14.8k
}
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
172
14.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
14.8k
    fmt::memory_buffer debug_string_buffer;
174
14.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
14.8k
    return fmt::to_string(debug_string_buffer);
176
14.8k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
14.9k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
14.9k
    fmt::memory_buffer debug_string_buffer;
180
14.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
14.9k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
14.9k
                   _is_serial_operator);
183
14.9k
    return fmt::to_string(debug_string_buffer);
184
14.9k
}
185
186
14.8k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
14.8k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
14.8k
}
189
190
28.0k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
28.0k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
28.0k
    _nereids_id = tnode.nereids_id;
193
28.0k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
26
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
26
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
26
            tnode.intermediate_projections_list.size()) {
199
0
            return Status::InternalError(
200
0
                    "intermediate_output_tuple_id_list size:{} not match "
201
0
                    "intermediate_projections_list size:{}",
202
0
                    tnode.intermediate_output_tuple_id_list.size(),
203
0
                    tnode.intermediate_projections_list.size());
204
0
        }
205
26
    }
206
28.0k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
28.0k
    _op_name = substr + "_OPERATOR";
208
209
28.0k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
28.0k
    } else if (tnode.__isset.conjuncts) {
212
1.42k
        for (const auto& conjunct : tnode.conjuncts) {
213
1.42k
            VExprContextSPtr context;
214
1.42k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
215
1.42k
            _conjuncts.emplace_back(context);
216
1.42k
        }
217
414
    }
218
219
    // create the projections expr
220
28.0k
    if (tnode.__isset.projections) {
221
25.9k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
25.9k
    }
223
28.0k
    if (!tnode.intermediate_projections_list.empty()) {
224
26
        DCHECK(has_projection()) << "no final projections";
225
26
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
130
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
130
            VExprContextSPtrs projections;
228
130
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
130
            _projection->intermediate_projections.push_back(projections);
230
130
        }
231
26
    }
232
28.0k
    return Status::OK();
233
28.0k
}
234
235
52.5k
Status OperatorXBase::prepare(RuntimeState* state) {
236
52.5k
    for (auto& conjunct : _conjuncts) {
237
1.42k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
1.42k
    }
239
52.5k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
4.31k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
1.97k
            return a->execute_cost() < b->execute_cost();
242
1.97k
        });
243
4.31k
    };
244
245
52.5k
    if (has_projection()) {
246
25.9k
        auto& projection = *_projection;
247
26.1k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
248
130
            const auto& input_row_desc =
249
130
                    i == 0 ? operator_row_desc_before_projection()
250
130
                           : projection.intermediate_output_row_descriptors[i - 1];
251
130
            RETURN_IF_ERROR(
252
130
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
253
130
        }
254
25.9k
        const auto& final_projection_input_row_desc =
255
25.9k
                projection.intermediate_output_row_descriptors.empty()
256
25.9k
                        ? operator_row_desc_before_projection()
257
25.9k
                        : projection.intermediate_output_row_descriptors.back();
258
25.9k
        RETURN_IF_ERROR(
259
25.9k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
260
25.9k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
261
25.9k
                                                      projection.output_row_descriptor));
262
25.9k
    }
263
264
52.5k
    for (auto& conjunct : _conjuncts) {
265
1.42k
        RETURN_IF_ERROR(conjunct->open(state));
266
1.42k
    }
267
52.5k
    if (has_projection()) {
268
25.9k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
25.9k
        for (auto& projections : _projection->intermediate_projections) {
270
130
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
130
        }
272
25.9k
    }
273
52.5k
    if (_child && !is_source()) {
274
24.5k
        RETURN_IF_ERROR(_child->prepare(state));
275
24.5k
    }
276
277
52.5k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
52.5k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
52.5k
    return Status::OK();
283
52.5k
}
284
285
160
Status OperatorXBase::terminate(RuntimeState* state) {
286
160
    if (_child && !is_source()) {
287
78
        RETURN_IF_ERROR(_child->terminate(state));
288
78
    }
289
160
    auto result = state->get_local_state_result(operator_id());
290
160
    if (!result) {
291
0
        return result.error();
292
0
    }
293
160
    return result.value()->terminate(state);
294
160
}
295
296
34.1k
Status OperatorXBase::close(RuntimeState* state) {
297
34.1k
    if (_child && !is_source()) {
298
24.9k
        RETURN_IF_ERROR(_child->close(state));
299
24.9k
    }
300
34.1k
    auto result = state->get_local_state_result(operator_id());
301
34.1k
    if (!result) {
302
0
        return result.error();
303
0
    }
304
34.1k
    return result.value()->close(state);
305
34.1k
}
306
307
1.40k
void PipelineXLocalStateBase::clear_origin_block() {
308
1.40k
    _origin_block.clear_column_data(
309
1.40k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
1.40k
}
311
312
5.87k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
5.87k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
5.87k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
5.87k
    return Status::OK();
317
5.87k
}
318
319
0
bool PipelineXLocalStateBase::is_blockable() const {
320
0
    return std::any_of(_projections.begin(), _projections.end(),
321
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
322
0
}
323
324
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
325
1.40k
                                     Block* output_block) const {
326
1.40k
    auto* local_state = state->get_local_state(operator_id());
327
1.40k
    SCOPED_TIMER(local_state->exec_time_counter());
328
1.40k
    SCOPED_TIMER(local_state->_projection_timer);
329
1.40k
    const size_t rows = origin_block->rows();
330
1.40k
    if (rows == 0) {
331
345
        return Status::OK();
332
345
    }
333
1.05k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
1.05k
    {
336
1.05k
        Block input_block = *origin_block;
337
338
1.05k
        ColumnsWithTypeAndName new_columns;
339
1.05k
        for (const auto& projections : local_state->_intermediate_projections) {
340
0
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
0
            new_columns.resize(projections.size());
345
0
            for (int i = 0; i < projections.size(); i++) {
346
0
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
0
                if (new_columns[i].column->size() != rows) {
348
0
                    return Status::InternalError(
349
0
                            "intermediate projection result column size {} not equal input rows "
350
0
                            "{}, expr: {}",
351
0
                            new_columns[i].column->size(), rows,
352
0
                            projections[i]->root()->debug_string());
353
0
                }
354
0
            }
355
0
            Block tmp_block {new_columns};
356
0
            input_block.swap(tmp_block);
357
0
        }
358
359
1.05k
        if (input_block.rows() != rows) {
360
0
            return Status::InternalError(
361
0
                    "after intermediate projections input block rows {} not equal origin rows {}, "
362
0
                    "input_block: {}",
363
0
                    input_block.rows(), rows, input_block.dump_structure());
364
0
        }
365
366
1.05k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
1.05k
                output_block, _projection->output_row_descriptor);
368
1.05k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
1.05k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
1.05k
        Columns shared_columns(mutable_columns.size());
371
372
7.32k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
6.26k
            ColumnPtr column_ptr;
374
6.26k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
6.26k
            if (column_ptr->size() != rows) {
376
0
                return Status::InternalError(
377
0
                        "projection result column size {} not equal input rows {}, expr: {}",
378
0
                        column_ptr->size(), rows,
379
0
                        local_state->_projections[i]->root()->debug_string());
380
0
            }
381
6.26k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
6.26k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
6.26k
            if (column_ptr->is_exclusive()) {
386
2.84k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
3.42k
            } else {
388
3.42k
                shared_columns[i] = std::move(column_ptr);
389
3.42k
            }
390
6.26k
        }
391
392
1.05k
        scoped_mutable_block.restore();
393
7.32k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
6.26k
            if (shared_columns[i]) {
395
3.42k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
3.42k
            }
397
6.26k
        }
398
1.05k
    }
399
400
0
    origin_block->clear_column_data(
401
1.05k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
1.05k
    DCHECK_EQ(output_block->rows(), rows);
403
404
1.05k
    return Status::OK();
405
1.05k
}
406
407
1.24M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
1.24M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
1.24M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
1.24M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
1.24M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
1.24M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
1.24M
            if (_debug_point_count++ % 2 == 0) {
414
1.24M
                return Status::OK();
415
1.24M
            }
416
1.24M
        }
417
1.24M
    });
418
419
1.24M
    Status status;
420
1.24M
    auto* local_state = state->get_local_state(operator_id());
421
1.24M
    Defer defer([&]() {
422
1.24M
        if (status.ok()) {
423
1.24M
            local_state->update_output_block_counters(*block);
424
1.24M
        }
425
1.24M
    });
426
1.24M
    if (has_projection()) {
427
1.40k
        local_state->clear_origin_block();
428
1.40k
        status = get_block(state, &local_state->_origin_block, eos);
429
1.40k
        if (UNLIKELY(!status.ok())) {
430
0
            return status;
431
0
        }
432
1.40k
        status = do_projections(state, &local_state->_origin_block, block);
433
1.40k
        return status;
434
1.40k
    }
435
1.24M
    status = get_block(state, block, eos);
436
1.24M
    RETURN_IF_ERROR(block->check_type_and_column());
437
1.24M
    return status;
438
1.24M
}
439
440
26.7k
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
26.7k
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
44
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
44
        *eos = true;
444
44
    }
445
446
26.7k
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
26.7k
        auto op_name = to_lower(_parent->_op_name);
448
26.7k
        auto arg_op_name = dp->param<std::string>("op_name");
449
26.7k
        arg_op_name = to_lower(arg_op_name);
450
451
26.7k
        if (op_name == arg_op_name) {
452
26.7k
            *eos = true;
453
26.7k
        }
454
26.7k
    });
455
456
26.7k
    if (auto rows = block->rows()) {
457
7.86k
        _num_rows_returned += rows;
458
7.86k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
7.86k
    }
460
26.7k
}
461
462
24.0k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
24.0k
    auto result = state->get_sink_local_state_result();
464
24.0k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
24.0k
    return result.value()->terminate(state);
468
24.0k
}
469
470
14.9k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
14.9k
    fmt::memory_buffer debug_string_buffer;
472
473
14.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
14.9k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
14.9k
    return fmt::to_string(debug_string_buffer);
476
14.9k
}
477
478
14.8k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
14.8k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
14.8k
}
481
482
2.31k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
2.31k
    std::string op_name = "UNKNOWN_SINK";
484
2.31k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
2.31k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
2.31k
        op_name = it->second;
488
2.31k
    }
489
2.31k
    _name = op_name + "_OPERATOR";
490
2.31k
    return Status::OK();
491
2.31k
}
492
493
73.6k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
73.6k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
73.6k
    _nereids_id = tnode.nereids_id;
496
73.6k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
73.6k
    _name = substr + "_SINK_OPERATOR";
498
73.6k
    return Status::OK();
499
73.6k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
76.1k
                                                            LocalSinkStateInfo& info) {
504
76.1k
    auto local_state = LocalStateType::create_unique(this, state);
505
76.1k
    RETURN_IF_ERROR(local_state->init(state, info));
506
76.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
76.1k
    return Status::OK();
508
76.1k
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
72.0k
                                                            LocalSinkStateInfo& info) {
504
72.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
72.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
72.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
72.0k
    return Status::OK();
508
72.0k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
762
                                                            LocalSinkStateInfo& info) {
504
762
    auto local_state = LocalStateType::create_unique(this, state);
505
762
    RETURN_IF_ERROR(local_state->init(state, info));
506
762
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
762
    return Status::OK();
508
762
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
16
                                                            LocalSinkStateInfo& info) {
504
16
    auto local_state = LocalStateType::create_unique(this, state);
505
16
    RETURN_IF_ERROR(local_state->init(state, info));
506
16
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
16
    return Status::OK();
508
16
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
34
                                                            LocalSinkStateInfo& info) {
504
34
    auto local_state = LocalStateType::create_unique(this, state);
505
34
    RETURN_IF_ERROR(local_state->init(state, info));
506
34
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
34
    return Status::OK();
508
34
}
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
503
194
                                                            LocalSinkStateInfo& info) {
504
194
    auto local_state = LocalStateType::create_unique(this, state);
505
194
    RETURN_IF_ERROR(local_state->init(state, info));
506
194
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
194
    return Status::OK();
508
194
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
22
                                                            LocalSinkStateInfo& info) {
504
22
    auto local_state = LocalStateType::create_unique(this, state);
505
22
    RETURN_IF_ERROR(local_state->init(state, info));
506
22
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
22
    return Status::OK();
508
22
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
904
                                                            LocalSinkStateInfo& info) {
504
904
    auto local_state = LocalStateType::create_unique(this, state);
505
904
    RETURN_IF_ERROR(local_state->init(state, info));
506
904
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
904
    return Status::OK();
508
904
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
148
                                                            LocalSinkStateInfo& info) {
504
148
    auto local_state = LocalStateType::create_unique(this, state);
505
148
    RETURN_IF_ERROR(local_state->init(state, info));
506
148
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
148
    return Status::OK();
508
148
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.52k
                                                            LocalSinkStateInfo& info) {
504
1.52k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.52k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.52k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.52k
    return Status::OK();
508
1.52k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
317
                                                            LocalSinkStateInfo& info) {
504
317
    auto local_state = LocalStateType::create_unique(this, state);
505
317
    RETURN_IF_ERROR(local_state->init(state, info));
506
317
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
317
    return Status::OK();
508
317
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
158
                                                            LocalSinkStateInfo& info) {
504
158
    auto local_state = LocalStateType::create_unique(this, state);
505
158
    RETURN_IF_ERROR(local_state->init(state, info));
506
158
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
158
    return Status::OK();
508
158
}
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
503
1
                                                            LocalSinkStateInfo& info) {
504
1
    auto local_state = LocalStateType::create_unique(this, state);
505
1
    RETURN_IF_ERROR(local_state->init(state, info));
506
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1
    return Status::OK();
508
1
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
56
                                                            LocalSinkStateInfo& info) {
504
56
    auto local_state = LocalStateType::create_unique(this, state);
505
56
    RETURN_IF_ERROR(local_state->init(state, info));
506
56
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
56
    return Status::OK();
508
56
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
509
510
template <typename LocalStateType>
511
76.2k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
0
                                 LocalExchangeSharedState>) {
514
0
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
0
                                        MultiCastSharedState>) {
517
0
        throw Exception(Status::FatalError("should not reach here!"));
518
76.2k
    } else {
519
76.2k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
76.2k
        ss->id = operator_id();
521
76.2k
        for (auto& dest : dests_id()) {
522
76.2k
            ss->related_op_ids.insert(dest);
523
76.2k
        }
524
76.2k
        return ss;
525
76.2k
    }
526
76.2k
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
72.0k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
72.0k
    } else {
519
72.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
72.0k
        ss->id = operator_id();
521
72.0k
        for (auto& dest : dests_id()) {
522
72.0k
            ss->related_op_ids.insert(dest);
523
72.0k
        }
524
72.0k
        return ss;
525
72.0k
    }
526
72.0k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
762
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
762
    } else {
519
762
        auto ss = LocalStateType::SharedStateType::create_shared();
520
762
        ss->id = operator_id();
521
762
        for (auto& dest : dests_id()) {
522
760
            ss->related_op_ids.insert(dest);
523
760
        }
524
762
        return ss;
525
762
    }
526
762
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
16
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
16
    } else {
519
16
        auto ss = LocalStateType::SharedStateType::create_shared();
520
16
        ss->id = operator_id();
521
16
        for (auto& dest : dests_id()) {
522
16
            ss->related_op_ids.insert(dest);
523
16
        }
524
16
        return ss;
525
16
    }
526
16
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
34
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
34
    } else {
519
34
        auto ss = LocalStateType::SharedStateType::create_shared();
520
34
        ss->id = operator_id();
521
34
        for (auto& dest : dests_id()) {
522
34
            ss->related_op_ids.insert(dest);
523
34
        }
524
34
        return ss;
525
34
    }
526
34
}
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
511
16
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
16
    } else {
519
16
        auto ss = LocalStateType::SharedStateType::create_shared();
520
16
        ss->id = operator_id();
521
16
        for (auto& dest : dests_id()) {
522
16
            ss->related_op_ids.insert(dest);
523
16
        }
524
16
        return ss;
525
16
    }
526
16
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
203
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
203
    } else {
519
203
        auto ss = LocalStateType::SharedStateType::create_shared();
520
203
        ss->id = operator_id();
521
203
        for (auto& dest : dests_id()) {
522
203
            ss->related_op_ids.insert(dest);
523
203
        }
524
203
        return ss;
525
203
    }
526
203
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
24
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
24
    } else {
519
24
        auto ss = LocalStateType::SharedStateType::create_shared();
520
24
        ss->id = operator_id();
521
24
        for (auto& dest : dests_id()) {
522
24
            ss->related_op_ids.insert(dest);
523
24
        }
524
24
        return ss;
525
24
    }
526
24
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
933
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
933
    } else {
519
933
        auto ss = LocalStateType::SharedStateType::create_shared();
520
933
        ss->id = operator_id();
521
933
        for (auto& dest : dests_id()) {
522
933
            ss->related_op_ids.insert(dest);
523
933
        }
524
933
        return ss;
525
933
    }
526
933
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
147
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
147
    } else {
519
147
        auto ss = LocalStateType::SharedStateType::create_shared();
520
147
        ss->id = operator_id();
521
147
        for (auto& dest : dests_id()) {
522
147
            ss->related_op_ids.insert(dest);
523
147
        }
524
147
        return ss;
525
147
    }
526
147
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
1.52k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
1.52k
    } else {
519
1.52k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.52k
        ss->id = operator_id();
521
1.52k
        for (auto& dest : dests_id()) {
522
1.52k
            ss->related_op_ids.insert(dest);
523
1.52k
        }
524
1.52k
        return ss;
525
1.52k
    }
526
1.52k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
317
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
317
    } else {
519
317
        auto ss = LocalStateType::SharedStateType::create_shared();
520
317
        ss->id = operator_id();
521
317
        for (auto& dest : dests_id()) {
522
317
            ss->related_op_ids.insert(dest);
523
317
        }
524
317
        return ss;
525
317
    }
526
317
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
102
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
102
    } else {
519
102
        auto ss = LocalStateType::SharedStateType::create_shared();
520
102
        ss->id = operator_id();
521
102
        for (auto& dest : dests_id()) {
522
102
            ss->related_op_ids.insert(dest);
523
102
        }
524
102
        return ss;
525
102
    }
526
102
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
7
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
7
    } else {
519
7
        auto ss = LocalStateType::SharedStateType::create_shared();
520
7
        ss->id = operator_id();
521
7
        for (auto& dest : dests_id()) {
522
7
            ss->related_op_ids.insert(dest);
523
7
        }
524
7
        return ss;
525
7
    }
526
7
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
6
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
6
    } else {
519
6
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6
        ss->id = operator_id();
521
6
        for (auto& dest : dests_id()) {
522
6
            ss->related_op_ids.insert(dest);
523
6
        }
524
6
        return ss;
525
6
    }
526
6
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
56
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
56
    } else {
519
56
        auto ss = LocalStateType::SharedStateType::create_shared();
520
56
        ss->id = operator_id();
521
56
        for (auto& dest : dests_id()) {
522
56
            ss->related_op_ids.insert(dest);
523
56
        }
524
56
        return ss;
525
56
    }
526
56
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
28.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
28.6k
    auto local_state = LocalStateType::create_unique(state, this);
531
28.6k
    RETURN_IF_ERROR(local_state->init(state, info));
532
28.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
28.6k
    return Status::OK();
534
28.6k
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
24.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
24.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
24.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
24.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
24.0k
    return Status::OK();
534
24.0k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
978
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
978
    auto local_state = LocalStateType::create_unique(state, this);
531
978
    RETURN_IF_ERROR(local_state->init(state, info));
532
978
    state->emplace_local_state(operator_id(), std::move(local_state));
533
978
    return Status::OK();
534
978
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6
    auto local_state = LocalStateType::create_unique(state, this);
531
6
    RETURN_IF_ERROR(local_state->init(state, info));
532
6
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6
    return Status::OK();
534
6
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
15
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
15
    auto local_state = LocalStateType::create_unique(state, this);
531
15
    RETURN_IF_ERROR(local_state->init(state, info));
532
15
    state->emplace_local_state(operator_id(), std::move(local_state));
533
15
    return Status::OK();
534
15
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
15
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
15
    auto local_state = LocalStateType::create_unique(state, this);
531
15
    RETURN_IF_ERROR(local_state->init(state, info));
532
15
    state->emplace_local_state(operator_id(), std::move(local_state));
533
15
    return Status::OK();
534
15
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
172
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
172
    auto local_state = LocalStateType::create_unique(state, this);
531
172
    RETURN_IF_ERROR(local_state->init(state, info));
532
172
    state->emplace_local_state(operator_id(), std::move(local_state));
533
172
    return Status::OK();
534
172
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
894
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
894
    auto local_state = LocalStateType::create_unique(state, this);
531
894
    RETURN_IF_ERROR(local_state->init(state, info));
532
894
    state->emplace_local_state(operator_id(), std::move(local_state));
533
894
    return Status::OK();
534
894
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
138
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
138
    auto local_state = LocalStateType::create_unique(state, this);
531
138
    RETURN_IF_ERROR(local_state->init(state, info));
532
138
    state->emplace_local_state(operator_id(), std::move(local_state));
533
138
    return Status::OK();
534
138
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5
    auto local_state = LocalStateType::create_unique(state, this);
531
5
    RETURN_IF_ERROR(local_state->init(state, info));
532
5
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5
    return Status::OK();
534
5
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.28k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.28k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.28k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.28k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.28k
    return Status::OK();
534
1.28k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
316
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
316
    auto local_state = LocalStateType::create_unique(state, this);
531
316
    RETURN_IF_ERROR(local_state->init(state, info));
532
316
    state->emplace_local_state(operator_id(), std::move(local_state));
533
316
    return Status::OK();
534
316
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3
    auto local_state = LocalStateType::create_unique(state, this);
531
3
    RETURN_IF_ERROR(local_state->init(state, info));
532
3
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3
    return Status::OK();
534
3
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1
    auto local_state = LocalStateType::create_unique(state, this);
531
1
    RETURN_IF_ERROR(local_state->init(state, info));
532
1
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1
    return Status::OK();
534
1
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
34
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
34
    auto local_state = LocalStateType::create_unique(state, this);
531
34
    RETURN_IF_ERROR(local_state->init(state, info));
532
34
    state->emplace_local_state(operator_id(), std::move(local_state));
533
34
    return Status::OK();
534
34
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
474
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
474
    auto local_state = LocalStateType::create_unique(state, this);
531
474
    RETURN_IF_ERROR(local_state->init(state, info));
532
474
    state->emplace_local_state(operator_id(), std::move(local_state));
533
474
    return Status::OK();
534
474
}
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
529
4
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4
    auto local_state = LocalStateType::create_unique(state, this);
531
4
    RETURN_IF_ERROR(local_state->init(state, info));
532
4
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4
    return Status::OK();
534
4
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
106
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
106
    auto local_state = LocalStateType::create_unique(state, this);
531
106
    RETURN_IF_ERROR(local_state->init(state, info));
532
106
    state->emplace_local_state(operator_id(), std::move(local_state));
533
106
    return Status::OK();
534
106
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
174
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
174
    auto local_state = LocalStateType::create_unique(state, this);
531
174
    RETURN_IF_ERROR(local_state->init(state, info));
532
174
    state->emplace_local_state(operator_id(), std::move(local_state));
533
174
    return Status::OK();
534
174
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
76.4k
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
29.1k
        : _num_rows_returned(0),
542
29.1k
          _rows_returned_counter(nullptr),
543
29.1k
          _parent(parent),
544
29.1k
          _state(state),
545
29.1k
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
28.8k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
28.8k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
28.8k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
28.8k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
28.8k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
28.8k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
28.8k
    _operator_profile->add_child(_common_profile.get(), true);
557
28.8k
    _operator_profile->add_child(_custom_profile.get(), true);
558
28.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
28.8k
    if constexpr (!is_fake_shared) {
560
26.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
106
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
106
                                    .first.get()
563
106
                                    ->template cast<SharedStateArg>();
564
565
106
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
106
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
106
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26.2k
        } else if (info.shared_state) {
569
26.2k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26.2k
            _dependency = _shared_state->create_source_dependency(
576
26.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26.2k
        } else {
580
35
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
0
                DCHECK(false);
582
0
            }
583
35
        }
584
26.3k
    }
585
586
28.8k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
28.8k
    _rows_returned_counter =
591
28.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
28.8k
    _blocks_returned_counter =
593
28.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
28.8k
    _output_block_bytes_counter =
595
28.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
28.8k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
28.8k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
28.8k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
28.8k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
28.8k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
28.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
28.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
28.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
28.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
28.8k
    _memory_used_counter =
606
28.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
28.8k
    _common_profile->add_info_string("IsColocate",
608
28.8k
                                     std::to_string(_parent->is_colocated_operator()));
609
28.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
28.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
28.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
28.8k
    return Status::OK();
613
28.8k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
24.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
24.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
24.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
24.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
24.0k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
24.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
24.0k
    _operator_profile->add_child(_common_profile.get(), true);
557
24.0k
    _operator_profile->add_child(_custom_profile.get(), true);
558
24.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
24.0k
    if constexpr (!is_fake_shared) {
560
24.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
24.0k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
24.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
24.0k
            _dependency = _shared_state->create_source_dependency(
576
24.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
24.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
24.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
24.0k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
24.0k
    }
585
586
24.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
24.0k
    _rows_returned_counter =
591
24.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
24.0k
    _blocks_returned_counter =
593
24.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
24.0k
    _output_block_bytes_counter =
595
24.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
24.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
24.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
24.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
24.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
24.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
24.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
24.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
24.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
24.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
24.0k
    _memory_used_counter =
606
24.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
24.0k
    _common_profile->add_info_string("IsColocate",
608
24.0k
                                     std::to_string(_parent->is_colocated_operator()));
609
24.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
24.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
24.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
24.0k
    return Status::OK();
613
24.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1
    _operator_profile->add_child(_common_profile.get(), true);
557
1
    _operator_profile->add_child(_custom_profile.get(), true);
558
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1
    if constexpr (!is_fake_shared) {
560
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
1
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
1
            _dependency = _shared_state->create_source_dependency(
576
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
1
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
1
    }
585
586
1
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
1
    _rows_returned_counter =
591
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1
    _blocks_returned_counter =
593
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1
    _output_block_bytes_counter =
595
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1
    _memory_used_counter =
606
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1
    _common_profile->add_info_string("IsColocate",
608
1
                                     std::to_string(_parent->is_colocated_operator()));
609
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1
    return Status::OK();
613
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
199
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
199
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
199
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
199
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
199
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
199
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
199
    _operator_profile->add_child(_common_profile.get(), true);
557
199
    _operator_profile->add_child(_custom_profile.get(), true);
558
199
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
199
    if constexpr (!is_fake_shared) {
560
199
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
199
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
199
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
199
            _dependency = _shared_state->create_source_dependency(
576
199
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
199
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
199
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
199
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
199
    }
585
586
199
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
199
    _rows_returned_counter =
591
199
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
199
    _blocks_returned_counter =
593
199
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
199
    _output_block_bytes_counter =
595
199
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
199
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
199
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
199
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
199
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
199
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
199
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
199
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
199
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
199
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
199
    _memory_used_counter =
606
199
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
199
    _common_profile->add_info_string("IsColocate",
608
199
                                     std::to_string(_parent->is_colocated_operator()));
609
199
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
199
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
199
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
199
    return Status::OK();
613
199
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
15
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
15
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
15
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
15
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
15
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
15
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
15
    _operator_profile->add_child(_common_profile.get(), true);
557
15
    _operator_profile->add_child(_custom_profile.get(), true);
558
15
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
15
    if constexpr (!is_fake_shared) {
560
15
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
15
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
15
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
15
            _dependency = _shared_state->create_source_dependency(
576
15
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
15
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
15
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
15
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
15
    }
585
586
15
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
15
    _rows_returned_counter =
591
15
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
15
    _blocks_returned_counter =
593
15
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
15
    _output_block_bytes_counter =
595
15
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
15
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
15
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
15
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
15
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
15
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
15
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
15
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
15
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
15
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
15
    _memory_used_counter =
606
15
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
15
    _common_profile->add_info_string("IsColocate",
608
15
                                     std::to_string(_parent->is_colocated_operator()));
609
15
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
15
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
15
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
15
    return Status::OK();
613
15
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
316
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
316
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
316
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
316
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
316
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
316
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
316
    _operator_profile->add_child(_common_profile.get(), true);
557
316
    _operator_profile->add_child(_custom_profile.get(), true);
558
316
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
316
    if constexpr (!is_fake_shared) {
560
316
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
316
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
316
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
316
            _dependency = _shared_state->create_source_dependency(
576
316
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
316
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
316
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
316
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
316
    }
585
586
316
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
316
    _rows_returned_counter =
591
316
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
316
    _blocks_returned_counter =
593
316
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
316
    _output_block_bytes_counter =
595
316
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
316
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
316
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
316
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
316
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
316
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
316
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
316
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
316
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
316
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
316
    _memory_used_counter =
606
316
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
316
    _common_profile->add_info_string("IsColocate",
608
316
                                     std::to_string(_parent->is_colocated_operator()));
609
316
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
316
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
316
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
316
    return Status::OK();
613
316
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
16
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
16
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
16
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
16
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
16
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
16
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
16
    _operator_profile->add_child(_common_profile.get(), true);
557
16
    _operator_profile->add_child(_custom_profile.get(), true);
558
16
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
16
    if constexpr (!is_fake_shared) {
560
16
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
16
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
16
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
16
            _dependency = _shared_state->create_source_dependency(
576
16
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
16
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
16
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
16
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
16
    }
585
586
16
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
16
    _rows_returned_counter =
591
16
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
16
    _blocks_returned_counter =
593
16
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
16
    _output_block_bytes_counter =
595
16
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
16
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
16
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
16
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
16
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
16
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
16
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
16
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
16
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
16
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
16
    _memory_used_counter =
606
16
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
16
    _common_profile->add_info_string("IsColocate",
608
16
                                     std::to_string(_parent->is_colocated_operator()));
609
16
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
16
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
16
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
16
    return Status::OK();
613
16
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
923
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
923
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
923
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
923
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
923
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
923
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
923
    _operator_profile->add_child(_common_profile.get(), true);
557
923
    _operator_profile->add_child(_custom_profile.get(), true);
558
923
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
923
    if constexpr (!is_fake_shared) {
560
923
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
923
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
923
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
923
            _dependency = _shared_state->create_source_dependency(
576
923
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
923
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
923
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
923
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
923
    }
585
586
923
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
923
    _rows_returned_counter =
591
923
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
923
    _blocks_returned_counter =
593
923
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
923
    _output_block_bytes_counter =
595
923
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
923
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
923
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
923
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
923
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
923
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
923
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
923
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
923
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
923
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
923
    _memory_used_counter =
606
923
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
923
    _common_profile->add_info_string("IsColocate",
608
923
                                     std::to_string(_parent->is_colocated_operator()));
609
923
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
923
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
923
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
923
    return Status::OK();
613
923
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
138
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
138
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
138
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
138
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
138
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
138
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
138
    _operator_profile->add_child(_common_profile.get(), true);
557
138
    _operator_profile->add_child(_custom_profile.get(), true);
558
138
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
138
    if constexpr (!is_fake_shared) {
560
138
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
138
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
138
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
138
            _dependency = _shared_state->create_source_dependency(
576
138
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
138
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
138
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
138
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
138
    }
585
586
138
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
138
    _rows_returned_counter =
591
138
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
138
    _blocks_returned_counter =
593
138
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
138
    _output_block_bytes_counter =
595
138
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
138
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
138
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
138
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
138
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
138
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
138
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
138
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
138
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
138
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
138
    _memory_used_counter =
606
138
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
138
    _common_profile->add_info_string("IsColocate",
608
138
                                     std::to_string(_parent->is_colocated_operator()));
609
138
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
138
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
138
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
138
    return Status::OK();
613
138
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
2.51k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.51k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.51k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.51k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.51k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
2.51k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.51k
    _operator_profile->add_child(_common_profile.get(), true);
557
2.51k
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.51k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
    if constexpr (!is_fake_shared) {
560
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
                                    .first.get()
563
                                    ->template cast<SharedStateArg>();
564
565
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
            _dependency = _shared_state->create_source_dependency(
576
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
        }
584
    }
585
586
2.51k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
2.51k
    _rows_returned_counter =
591
2.51k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.51k
    _blocks_returned_counter =
593
2.51k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.51k
    _output_block_bytes_counter =
595
2.51k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.51k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.51k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.51k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.51k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.51k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.51k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.51k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.51k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.51k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.51k
    _memory_used_counter =
606
2.51k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.51k
    _common_profile->add_info_string("IsColocate",
608
2.51k
                                     std::to_string(_parent->is_colocated_operator()));
609
2.51k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.51k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.51k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.51k
    return Status::OK();
613
2.51k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
36
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
36
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
36
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
36
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
36
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
36
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
36
    _operator_profile->add_child(_common_profile.get(), true);
557
36
    _operator_profile->add_child(_custom_profile.get(), true);
558
36
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
36
    if constexpr (!is_fake_shared) {
560
36
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
36
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
1
            _dependency = _shared_state->create_source_dependency(
576
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
35
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
35
        }
584
36
    }
585
586
36
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
36
    _rows_returned_counter =
591
36
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
36
    _blocks_returned_counter =
593
36
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
36
    _output_block_bytes_counter =
595
36
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
36
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
36
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
36
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
36
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
36
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
36
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
36
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
36
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
36
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
36
    _memory_used_counter =
606
36
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
36
    _common_profile->add_info_string("IsColocate",
608
36
                                     std::to_string(_parent->is_colocated_operator()));
609
36
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
36
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
36
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
36
    return Status::OK();
613
36
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
12
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
12
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
12
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
12
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
12
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
12
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
12
    _operator_profile->add_child(_common_profile.get(), true);
557
12
    _operator_profile->add_child(_custom_profile.get(), true);
558
12
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
12
    if constexpr (!is_fake_shared) {
560
12
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
12
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
12
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
12
            _dependency = _shared_state->create_source_dependency(
576
12
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
12
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
12
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
12
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
12
    }
585
586
12
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
12
    _rows_returned_counter =
591
12
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
12
    _blocks_returned_counter =
593
12
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
12
    _output_block_bytes_counter =
595
12
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
12
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
12
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
12
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
12
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
12
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
12
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
12
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
12
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
12
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
12
    _memory_used_counter =
606
12
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
12
    _common_profile->add_info_string("IsColocate",
608
12
                                     std::to_string(_parent->is_colocated_operator()));
609
12
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
12
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
12
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
12
    return Status::OK();
613
12
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
474
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
474
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
474
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
474
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
474
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
474
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
474
    _operator_profile->add_child(_common_profile.get(), true);
557
474
    _operator_profile->add_child(_custom_profile.get(), true);
558
474
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
474
    if constexpr (!is_fake_shared) {
560
474
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
474
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
474
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
474
            _dependency = _shared_state->create_source_dependency(
576
474
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
474
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
474
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
474
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
474
    }
585
586
474
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
474
    _rows_returned_counter =
591
474
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
474
    _blocks_returned_counter =
593
474
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
474
    _output_block_bytes_counter =
595
474
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
474
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
474
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
474
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
474
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
474
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
474
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
474
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
474
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
474
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
474
    _memory_used_counter =
606
474
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
474
    _common_profile->add_info_string("IsColocate",
608
474
                                     std::to_string(_parent->is_colocated_operator()));
609
474
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
474
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
474
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
474
    return Status::OK();
613
474
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
102
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
102
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
102
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
102
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
102
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
102
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
102
    _operator_profile->add_child(_common_profile.get(), true);
557
102
    _operator_profile->add_child(_custom_profile.get(), true);
558
102
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
102
    if constexpr (!is_fake_shared) {
560
102
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
102
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
102
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
102
            _dependency = _shared_state->create_source_dependency(
576
102
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
102
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
102
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
102
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
102
    }
585
586
102
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
102
    _rows_returned_counter =
591
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
102
    _blocks_returned_counter =
593
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
102
    _output_block_bytes_counter =
595
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
102
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
102
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
102
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
102
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
102
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
102
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
102
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
102
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
102
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
102
    _memory_used_counter =
606
102
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
102
    _common_profile->add_info_string("IsColocate",
608
102
                                     std::to_string(_parent->is_colocated_operator()));
609
102
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
102
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
102
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
102
    return Status::OK();
613
102
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
13
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
13
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
13
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
13
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
13
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
13
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
13
    _operator_profile->add_child(_common_profile.get(), true);
557
13
    _operator_profile->add_child(_custom_profile.get(), true);
558
13
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
13
    if constexpr (!is_fake_shared) {
560
13
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
13
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
13
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
13
            _dependency = _shared_state->create_source_dependency(
576
13
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
13
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
13
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
13
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
13
    }
585
586
13
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
13
    _rows_returned_counter =
591
13
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
13
    _blocks_returned_counter =
593
13
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
13
    _output_block_bytes_counter =
595
13
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
13
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
13
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
13
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
13
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
13
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
13
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
13
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
13
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
13
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
13
    _memory_used_counter =
606
13
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
13
    _common_profile->add_info_string("IsColocate",
608
13
                                     std::to_string(_parent->is_colocated_operator()));
609
13
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
13
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
13
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
13
    return Status::OK();
613
13
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
106
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
106
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
106
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
106
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
106
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
106
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
106
    _operator_profile->add_child(_common_profile.get(), true);
557
106
    _operator_profile->add_child(_custom_profile.get(), true);
558
106
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
106
    if constexpr (!is_fake_shared) {
560
106
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
106
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
106
                                    .first.get()
563
106
                                    ->template cast<SharedStateArg>();
564
565
106
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
106
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
106
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
106
        } else if (info.shared_state) {
569
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
0
        } else {
580
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
0
                DCHECK(false);
582
0
            }
583
0
        }
584
106
    }
585
586
106
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
106
    _rows_returned_counter =
591
106
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
106
    _blocks_returned_counter =
593
106
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
106
    _output_block_bytes_counter =
595
106
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
106
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
106
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
106
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
106
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
106
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
106
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
106
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
106
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
106
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
106
    _memory_used_counter =
606
106
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
106
    _common_profile->add_info_string("IsColocate",
608
106
                                     std::to_string(_parent->is_colocated_operator()));
609
106
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
106
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
106
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
106
    return Status::OK();
613
106
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
614
615
template <typename SharedStateArg>
616
28.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
28.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
30.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.65k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.65k
    }
621
28.8k
    if (_parent->has_projection()) {
622
26.1k
        const auto& projection = *_parent->_projection;
623
26.1k
        _projections.resize(projection.projections.size());
624
104k
        for (size_t i = 0; i < _projections.size(); i++) {
625
78.7k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
78.7k
        }
627
26.1k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
26.2k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
130
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
780
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
650
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
650
                        state, _intermediate_projections[i][j]));
633
650
            }
634
130
        }
635
26.1k
    }
636
28.8k
    return Status::OK();
637
28.8k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
24.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
24.0k
    _conjuncts.resize(_parent->_conjuncts.size());
618
24.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
24.0k
    if (_parent->has_projection()) {
622
24.0k
        const auto& projection = *_parent->_projection;
623
24.0k
        _projections.resize(projection.projections.size());
624
89.9k
        for (size_t i = 0; i < _projections.size(); i++) {
625
65.9k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
65.9k
        }
627
24.0k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
24.0k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
24.0k
    }
636
24.0k
    return Status::OK();
637
24.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
3
    _conjuncts.resize(_parent->_conjuncts.size());
618
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
3
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
3
    return Status::OK();
637
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
196
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
196
    _conjuncts.resize(_parent->_conjuncts.size());
618
196
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
196
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
196
    return Status::OK();
637
196
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
15
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
15
    _conjuncts.resize(_parent->_conjuncts.size());
618
15
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
15
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
15
    return Status::OK();
637
15
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
316
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
316
    _conjuncts.resize(_parent->_conjuncts.size());
618
316
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
316
    if (_parent->has_projection()) {
622
316
        const auto& projection = *_parent->_projection;
623
316
        _projections.resize(projection.projections.size());
624
2.84k
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.52k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.52k
        }
627
316
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
316
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
316
    }
636
316
    return Status::OK();
637
316
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
16
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
16
    _conjuncts.resize(_parent->_conjuncts.size());
618
16
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
16
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
16
    return Status::OK();
637
16
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
923
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
923
    _conjuncts.resize(_parent->_conjuncts.size());
618
923
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
923
    if (_parent->has_projection()) {
622
632
        const auto& projection = *_parent->_projection;
623
632
        _projections.resize(projection.projections.size());
624
3.63k
        for (size_t i = 0; i < _projections.size(); i++) {
625
3.00k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
3.00k
        }
627
632
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
632
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
632
    }
636
923
    return Status::OK();
637
923
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
142
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
142
    _conjuncts.resize(_parent->_conjuncts.size());
618
142
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
142
    if (_parent->has_projection()) {
622
128
        const auto& projection = *_parent->_projection;
623
128
        _projections.resize(projection.projections.size());
624
384
        for (size_t i = 0; i < _projections.size(); i++) {
625
256
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
256
        }
627
128
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
128
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
128
    }
636
142
    return Status::OK();
637
142
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
2.48k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.48k
    _conjuncts.resize(_parent->_conjuncts.size());
618
3.91k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.42k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.42k
    }
621
2.48k
    if (_parent->has_projection()) {
622
1.00k
        const auto& projection = *_parent->_projection;
623
1.00k
        _projections.resize(projection.projections.size());
624
7.50k
        for (size_t i = 0; i < _projections.size(); i++) {
625
6.50k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
6.50k
        }
627
1.00k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
1.13k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
130
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
780
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
650
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
650
                        state, _intermediate_projections[i][j]));
633
650
            }
634
130
        }
635
1.00k
    }
636
2.48k
    return Status::OK();
637
2.48k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
36
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
36
    _conjuncts.resize(_parent->_conjuncts.size());
618
36
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
36
    if (_parent->has_projection()) {
622
30
        const auto& projection = *_parent->_projection;
623
30
        _projections.resize(projection.projections.size());
624
540
        for (size_t i = 0; i < _projections.size(); i++) {
625
510
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
510
        }
627
30
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
30
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
30
    }
636
36
    return Status::OK();
637
36
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
11
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
11
    _conjuncts.resize(_parent->_conjuncts.size());
618
11
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
11
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
11
    return Status::OK();
637
11
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
474
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
474
    _conjuncts.resize(_parent->_conjuncts.size());
618
698
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
224
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
224
    }
621
474
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
474
    return Status::OK();
637
474
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
102
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
102
    _conjuncts.resize(_parent->_conjuncts.size());
618
102
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
102
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
102
    return Status::OK();
637
102
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
13
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
13
    _conjuncts.resize(_parent->_conjuncts.size());
618
13
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
13
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
13
    return Status::OK();
637
13
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
106
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
106
    _conjuncts.resize(_parent->_conjuncts.size());
618
106
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
106
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
106
    return Status::OK();
637
106
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
638
639
template <typename SharedStateArg>
640
160
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
160
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
160
    _terminated = true;
645
160
    return Status::OK();
646
160
}
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
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
160
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
160
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
160
    _terminated = true;
645
160
    return Status::OK();
646
160
}
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
647
648
template <typename SharedStateArg>
649
28.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28.8k
    if (_closed) {
651
347
        return Status::OK();
652
347
    }
653
28.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
26.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
26.0k
    }
656
28.4k
    _closed = true;
657
28.4k
    return Status::OK();
658
28.8k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
24.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
24.0k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
24.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
24.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
24.0k
    }
656
24.0k
    _closed = true;
657
24.0k
    return Status::OK();
658
24.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4
    }
656
4
    _closed = true;
657
4
    return Status::OK();
658
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
344
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
344
    if (_closed) {
651
172
        return Status::OK();
652
172
    }
653
172
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
172
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
172
    }
656
172
    _closed = true;
657
172
    return Status::OK();
658
344
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
15
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
15
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
15
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
15
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
15
    }
656
15
    _closed = true;
657
15
    return Status::OK();
658
15
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
316
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
316
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
316
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
316
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
316
    }
656
316
    _closed = true;
657
316
    return Status::OK();
658
316
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
1
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1
    }
656
1
    _closed = true;
657
1
    return Status::OK();
658
1
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
756
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
756
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
756
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
756
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
756
    }
656
756
    _closed = true;
657
756
    return Status::OK();
658
756
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
137
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
137
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
137
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
137
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
137
    }
656
137
    _closed = true;
657
137
    return Status::OK();
658
137
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
2.64k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.64k
    if (_closed) {
651
175
        return Status::OK();
652
175
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
2.46k
    _closed = true;
657
2.46k
    return Status::OK();
658
2.64k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
34
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
34
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
34
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
34
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
34
    }
656
34
    _closed = true;
657
34
    return Status::OK();
658
34
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
474
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
474
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
474
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
474
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
474
    }
656
474
    _closed = true;
657
474
    return Status::OK();
658
474
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
106
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
106
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
106
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
106
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
106
    }
656
106
    _closed = true;
657
106
    return Status::OK();
658
106
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
659
660
template <typename SharedState>
661
76.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
76.4k
    _operator_profile =
664
76.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
76.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
76.4k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
76.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
76.4k
    _operator_profile->add_child(_common_profile, true);
673
76.4k
    _operator_profile->add_child(_custom_profile, true);
674
675
76.4k
    _operator_profile->set_metadata(_parent->node_id());
676
76.4k
    _wait_for_finish_dependency_timer =
677
76.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
76.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
76.4k
    if constexpr (!is_fake_shared) {
680
74.8k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
74.8k
            info.shared_state_map.end()) {
682
14
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
14
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
14
            }
685
14
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
14
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
14
                                                  ? 0
688
14
                                                  : info.task_idx]
689
14
                                  .get();
690
14
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
74.8k
        } else {
692
74.8k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
0
                DCHECK(false);
694
0
            }
695
74.8k
            _shared_state = info.shared_state->template cast<SharedState>();
696
74.8k
            _dependency = _shared_state->create_sink_dependency(
697
74.8k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
74.8k
        }
699
74.8k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
74.8k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
74.8k
    }
702
703
76.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
76.4k
    _rows_input_counter =
708
76.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
76.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
76.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
76.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
76.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
76.4k
    _memory_used_counter =
714
76.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
76.4k
    _common_profile->add_info_string("IsColocate",
716
76.4k
                                     std::to_string(_parent->is_colocated_operator()));
717
76.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
76.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
76.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
76.4k
    return Status::OK();
721
76.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
72.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
72.0k
    _operator_profile =
664
72.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
72.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
72.0k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
72.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
72.0k
    _operator_profile->add_child(_common_profile, true);
673
72.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
72.0k
    _operator_profile->set_metadata(_parent->node_id());
676
72.0k
    _wait_for_finish_dependency_timer =
677
72.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
72.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
72.0k
    if constexpr (!is_fake_shared) {
680
72.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
72.0k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
72.0k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
72.0k
            _shared_state = info.shared_state->template cast<SharedState>();
696
72.0k
            _dependency = _shared_state->create_sink_dependency(
697
72.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
72.0k
        }
699
72.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
72.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
72.0k
    }
702
703
72.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
72.0k
    _rows_input_counter =
708
72.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
72.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
72.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
72.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
72.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
72.0k
    _memory_used_counter =
714
72.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
72.0k
    _common_profile->add_info_string("IsColocate",
716
72.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
72.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
72.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
72.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
72.0k
    return Status::OK();
721
72.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2
    _operator_profile =
664
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2
    _operator_profile->add_child(_common_profile, true);
673
2
    _operator_profile->add_child(_custom_profile, true);
674
675
2
    _operator_profile->set_metadata(_parent->node_id());
676
2
    _wait_for_finish_dependency_timer =
677
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2
    if constexpr (!is_fake_shared) {
680
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2
            _shared_state = info.shared_state->template cast<SharedState>();
696
2
            _dependency = _shared_state->create_sink_dependency(
697
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2
        }
699
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2
    }
702
703
2
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2
    _rows_input_counter =
708
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2
    _memory_used_counter =
714
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2
    _common_profile->add_info_string("IsColocate",
716
2
                                     std::to_string(_parent->is_colocated_operator()));
717
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2
    return Status::OK();
721
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
203
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
203
    _operator_profile =
664
203
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
203
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
203
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
203
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
203
    _operator_profile->add_child(_common_profile, true);
673
203
    _operator_profile->add_child(_custom_profile, true);
674
675
203
    _operator_profile->set_metadata(_parent->node_id());
676
203
    _wait_for_finish_dependency_timer =
677
203
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
203
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
203
    if constexpr (!is_fake_shared) {
680
203
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
203
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
203
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
203
            _shared_state = info.shared_state->template cast<SharedState>();
696
203
            _dependency = _shared_state->create_sink_dependency(
697
203
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
203
        }
699
203
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
203
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
203
    }
702
703
203
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
203
    _rows_input_counter =
708
203
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
203
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
203
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
203
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
203
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
203
    _memory_used_counter =
714
203
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
203
    _common_profile->add_info_string("IsColocate",
716
203
                                     std::to_string(_parent->is_colocated_operator()));
717
203
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
203
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
203
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
203
    return Status::OK();
721
203
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
22
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
22
    _operator_profile =
664
22
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
22
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
22
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
22
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
22
    _operator_profile->add_child(_common_profile, true);
673
22
    _operator_profile->add_child(_custom_profile, true);
674
675
22
    _operator_profile->set_metadata(_parent->node_id());
676
22
    _wait_for_finish_dependency_timer =
677
22
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
22
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
22
    if constexpr (!is_fake_shared) {
680
22
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
22
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
22
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
22
            _shared_state = info.shared_state->template cast<SharedState>();
696
22
            _dependency = _shared_state->create_sink_dependency(
697
22
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
22
        }
699
22
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
22
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
22
    }
702
703
22
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
22
    _rows_input_counter =
708
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
22
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
22
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
22
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
22
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
22
    _memory_used_counter =
714
22
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
22
    _common_profile->add_info_string("IsColocate",
716
22
                                     std::to_string(_parent->is_colocated_operator()));
717
22
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
22
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
22
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
22
    return Status::OK();
721
22
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
317
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
317
    _operator_profile =
664
317
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
317
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
317
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
317
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
317
    _operator_profile->add_child(_common_profile, true);
673
317
    _operator_profile->add_child(_custom_profile, true);
674
675
317
    _operator_profile->set_metadata(_parent->node_id());
676
317
    _wait_for_finish_dependency_timer =
677
317
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
317
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
317
    if constexpr (!is_fake_shared) {
680
317
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
317
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
317
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
317
            _shared_state = info.shared_state->template cast<SharedState>();
696
317
            _dependency = _shared_state->create_sink_dependency(
697
317
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
317
        }
699
317
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
317
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
317
    }
702
703
317
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
317
    _rows_input_counter =
708
317
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
317
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
317
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
317
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
317
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
317
    _memory_used_counter =
714
317
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
317
    _common_profile->add_info_string("IsColocate",
716
317
                                     std::to_string(_parent->is_colocated_operator()));
717
317
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
317
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
317
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
317
    return Status::OK();
721
317
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
16
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
16
    _operator_profile =
664
16
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
16
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
16
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
16
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
16
    _operator_profile->add_child(_common_profile, true);
673
16
    _operator_profile->add_child(_custom_profile, true);
674
675
16
    _operator_profile->set_metadata(_parent->node_id());
676
16
    _wait_for_finish_dependency_timer =
677
16
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
16
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
16
    if constexpr (!is_fake_shared) {
680
16
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
16
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
16
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
16
            _shared_state = info.shared_state->template cast<SharedState>();
696
16
            _dependency = _shared_state->create_sink_dependency(
697
16
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
16
        }
699
16
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
16
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
16
    }
702
703
16
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
16
    _rows_input_counter =
708
16
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
16
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
16
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
16
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
16
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
16
    _memory_used_counter =
714
16
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
16
    _common_profile->add_info_string("IsColocate",
716
16
                                     std::to_string(_parent->is_colocated_operator()));
717
16
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
16
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
16
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
16
    return Status::OK();
721
16
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
933
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
933
    _operator_profile =
664
933
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
933
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
933
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
933
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
933
    _operator_profile->add_child(_common_profile, true);
673
933
    _operator_profile->add_child(_custom_profile, true);
674
675
933
    _operator_profile->set_metadata(_parent->node_id());
676
933
    _wait_for_finish_dependency_timer =
677
933
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
933
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
933
    if constexpr (!is_fake_shared) {
680
933
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
933
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
933
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
933
            _shared_state = info.shared_state->template cast<SharedState>();
696
933
            _dependency = _shared_state->create_sink_dependency(
697
933
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
933
        }
699
933
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
933
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
933
    }
702
703
933
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
933
    _rows_input_counter =
708
933
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
933
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
933
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
933
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
933
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
933
    _memory_used_counter =
714
933
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
933
    _common_profile->add_info_string("IsColocate",
716
933
                                     std::to_string(_parent->is_colocated_operator()));
717
933
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
933
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
933
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
933
    return Status::OK();
721
933
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
148
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
148
    _operator_profile =
664
148
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
148
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
148
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
148
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
148
    _operator_profile->add_child(_common_profile, true);
673
148
    _operator_profile->add_child(_custom_profile, true);
674
675
148
    _operator_profile->set_metadata(_parent->node_id());
676
148
    _wait_for_finish_dependency_timer =
677
148
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
148
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
148
    if constexpr (!is_fake_shared) {
680
148
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
148
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
148
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
148
            _shared_state = info.shared_state->template cast<SharedState>();
696
148
            _dependency = _shared_state->create_sink_dependency(
697
148
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
148
        }
699
148
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
148
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
148
    }
702
703
148
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
148
    _rows_input_counter =
708
148
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
148
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
148
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
148
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
148
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
148
    _memory_used_counter =
714
148
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
148
    _common_profile->add_info_string("IsColocate",
716
148
                                     std::to_string(_parent->is_colocated_operator()));
717
148
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
148
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
148
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
148
    return Status::OK();
721
148
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.53k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.53k
    _operator_profile =
664
1.53k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.53k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.53k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
1.53k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.53k
    _operator_profile->add_child(_common_profile, true);
673
1.53k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.53k
    _operator_profile->set_metadata(_parent->node_id());
676
1.53k
    _wait_for_finish_dependency_timer =
677
1.53k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.53k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
    if constexpr (!is_fake_shared) {
680
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
                                                  ? 0
688
                                                  : info.task_idx]
689
                                  .get();
690
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
            _shared_state = info.shared_state->template cast<SharedState>();
696
            _dependency = _shared_state->create_sink_dependency(
697
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
        }
699
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
    }
702
703
1.53k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
1.53k
    _rows_input_counter =
708
1.53k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.53k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.53k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.53k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.53k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.53k
    _memory_used_counter =
714
1.53k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.53k
    _common_profile->add_info_string("IsColocate",
716
1.53k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.53k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.53k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.53k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.53k
    return Status::OK();
721
1.53k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
3
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
3
    _operator_profile =
664
3
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
3
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
3
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
3
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
3
    _operator_profile->add_child(_common_profile, true);
673
3
    _operator_profile->add_child(_custom_profile, true);
674
675
3
    _operator_profile->set_metadata(_parent->node_id());
676
3
    _wait_for_finish_dependency_timer =
677
3
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
3
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
3
    if constexpr (!is_fake_shared) {
680
3
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
3
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
3
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
3
            _shared_state = info.shared_state->template cast<SharedState>();
696
3
            _dependency = _shared_state->create_sink_dependency(
697
3
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
3
        }
699
3
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
3
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
3
    }
702
703
3
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
3
    _rows_input_counter =
708
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
3
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
3
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
3
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
3
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
3
    _memory_used_counter =
714
3
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
3
    _common_profile->add_info_string("IsColocate",
716
3
                                     std::to_string(_parent->is_colocated_operator()));
717
3
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
3
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
3
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
3
    return Status::OK();
721
3
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
102
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
102
    _operator_profile =
664
102
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
102
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
102
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
102
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
102
    _operator_profile->add_child(_common_profile, true);
673
102
    _operator_profile->add_child(_custom_profile, true);
674
675
102
    _operator_profile->set_metadata(_parent->node_id());
676
102
    _wait_for_finish_dependency_timer =
677
102
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
102
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
102
    if constexpr (!is_fake_shared) {
680
102
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
102
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
102
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
102
            _shared_state = info.shared_state->template cast<SharedState>();
696
102
            _dependency = _shared_state->create_sink_dependency(
697
102
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
102
        }
699
102
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
102
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
102
    }
702
703
102
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
102
    _rows_input_counter =
708
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
102
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
102
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
102
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
102
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
102
    _memory_used_counter =
714
102
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
102
    _common_profile->add_info_string("IsColocate",
716
102
                                     std::to_string(_parent->is_colocated_operator()));
717
102
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
102
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
102
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
102
    return Status::OK();
721
102
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
158
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
158
    _operator_profile =
664
158
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
158
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
158
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
158
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
158
    _operator_profile->add_child(_common_profile, true);
673
158
    _operator_profile->add_child(_custom_profile, true);
674
675
158
    _operator_profile->set_metadata(_parent->node_id());
676
158
    _wait_for_finish_dependency_timer =
677
158
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
158
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
158
    if constexpr (!is_fake_shared) {
680
158
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
158
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
158
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
158
            _shared_state = info.shared_state->template cast<SharedState>();
696
158
            _dependency = _shared_state->create_sink_dependency(
697
158
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
158
        }
699
158
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
158
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
158
    }
702
703
158
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
158
    _rows_input_counter =
708
158
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
158
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
158
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
158
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
158
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
158
    _memory_used_counter =
714
158
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
158
    _common_profile->add_info_string("IsColocate",
716
158
                                     std::to_string(_parent->is_colocated_operator()));
717
158
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
158
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
158
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
158
    return Status::OK();
721
158
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
29
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
29
    _operator_profile =
664
29
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
29
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
29
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
29
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
29
    _operator_profile->add_child(_common_profile, true);
673
29
    _operator_profile->add_child(_custom_profile, true);
674
675
29
    _operator_profile->set_metadata(_parent->node_id());
676
29
    _wait_for_finish_dependency_timer =
677
29
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
29
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
29
    if constexpr (!is_fake_shared) {
680
29
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
29
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
29
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
29
            _shared_state = info.shared_state->template cast<SharedState>();
696
29
            _dependency = _shared_state->create_sink_dependency(
697
29
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
29
        }
699
29
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
29
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
29
    }
702
703
29
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
29
    _rows_input_counter =
708
29
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
29
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
29
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
29
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
29
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
29
    _memory_used_counter =
714
29
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
29
    _common_profile->add_info_string("IsColocate",
716
29
                                     std::to_string(_parent->is_colocated_operator()));
717
29
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
29
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
29
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
29
    return Status::OK();
721
29
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
14
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
14
    _operator_profile =
664
14
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
14
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
14
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
14
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
14
    _operator_profile->add_child(_common_profile, true);
673
14
    _operator_profile->add_child(_custom_profile, true);
674
675
14
    _operator_profile->set_metadata(_parent->node_id());
676
14
    _wait_for_finish_dependency_timer =
677
14
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
14
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
14
    if constexpr (!is_fake_shared) {
680
14
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
14
            info.shared_state_map.end()) {
682
14
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
14
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
14
            }
685
14
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
14
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
14
                                                  ? 0
688
14
                                                  : info.task_idx]
689
14
                                  .get();
690
14
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
14
        } else {
692
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
0
                DCHECK(false);
694
0
            }
695
0
            _shared_state = info.shared_state->template cast<SharedState>();
696
0
            _dependency = _shared_state->create_sink_dependency(
697
0
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
0
        }
699
14
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
14
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
14
    }
702
703
14
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
14
    _rows_input_counter =
708
14
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
14
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
14
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
14
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
14
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
14
    _memory_used_counter =
714
14
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
14
    _common_profile->add_info_string("IsColocate",
716
14
                                     std::to_string(_parent->is_colocated_operator()));
717
14
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
14
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
14
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
14
    return Status::OK();
721
14
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
888
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
888
    _operator_profile =
664
888
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
888
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
888
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
888
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
888
    _operator_profile->add_child(_common_profile, true);
673
888
    _operator_profile->add_child(_custom_profile, true);
674
675
888
    _operator_profile->set_metadata(_parent->node_id());
676
888
    _wait_for_finish_dependency_timer =
677
888
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
888
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
888
    if constexpr (!is_fake_shared) {
680
888
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
888
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
888
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
888
            _shared_state = info.shared_state->template cast<SharedState>();
696
888
            _dependency = _shared_state->create_sink_dependency(
697
888
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
888
        }
699
888
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
888
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
888
    }
702
703
888
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
888
    _rows_input_counter =
708
888
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
888
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
888
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
888
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
888
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
888
    _memory_used_counter =
714
888
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
888
    _common_profile->add_info_string("IsColocate",
716
888
                                     std::to_string(_parent->is_colocated_operator()));
717
888
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
888
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
888
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
888
    return Status::OK();
721
888
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
11
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
11
    _operator_profile =
664
11
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
11
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
11
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
11
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
11
    _operator_profile->add_child(_common_profile, true);
673
11
    _operator_profile->add_child(_custom_profile, true);
674
675
11
    _operator_profile->set_metadata(_parent->node_id());
676
11
    _wait_for_finish_dependency_timer =
677
11
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
11
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
11
    if constexpr (!is_fake_shared) {
680
11
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
11
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
11
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
11
            _shared_state = info.shared_state->template cast<SharedState>();
696
11
            _dependency = _shared_state->create_sink_dependency(
697
11
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
11
        }
699
11
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
11
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
11
    }
702
703
11
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
11
    _rows_input_counter =
708
11
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
11
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
11
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
11
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
11
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
11
    _memory_used_counter =
714
11
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
11
    _common_profile->add_info_string("IsColocate",
716
11
                                     std::to_string(_parent->is_colocated_operator()));
717
11
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
11
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
11
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
11
    return Status::OK();
721
11
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
722
723
template <typename SharedState>
724
76.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
76.0k
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
76.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
74.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
74.4k
    }
731
76.0k
    _closed = true;
732
76.0k
    return Status::OK();
733
76.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
72.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
72.0k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
72.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
72.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
72.0k
    }
731
72.0k
    _closed = true;
732
72.0k
    return Status::OK();
733
72.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1
    }
731
1
    _closed = true;
732
1
    return Status::OK();
733
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
172
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
172
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
172
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
172
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
172
    }
731
172
    _closed = true;
732
172
    return Status::OK();
733
172
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
13
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
13
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
11
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
11
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
11
    }
731
11
    _closed = true;
732
11
    return Status::OK();
733
13
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
317
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
317
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
317
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
317
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
317
    }
731
317
    _closed = true;
732
317
    return Status::OK();
733
317
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1
    }
731
1
    _closed = true;
732
1
    return Status::OK();
733
1
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
756
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
756
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
756
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
756
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
756
    }
731
756
    _closed = true;
732
756
    return Status::OK();
733
756
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
137
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
137
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
137
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
137
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
137
    }
731
137
    _closed = true;
732
137
    return Status::OK();
733
137
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.52k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.52k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
    }
731
1.52k
    _closed = true;
732
1.52k
    return Status::OK();
733
1.52k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
158
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
158
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
158
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
158
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
158
    }
731
158
    _closed = true;
732
158
    return Status::OK();
733
158
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
14
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
14
    }
731
14
    _closed = true;
732
14
    return Status::OK();
733
14
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
872
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
872
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
872
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
872
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
872
    }
731
872
    _closed = true;
732
872
    return Status::OK();
733
872
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
4.42k
                                                          bool* eos) {
738
4.42k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
4.42k
    return pull(state, block, eos);
740
4.42k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
4
                                                          bool* eos) {
738
4
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
4
    return pull(state, block, eos);
740
4
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
4.41k
                                                          bool* eos) {
738
4.41k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
4.41k
    return pull(state, block, eos);
740
4.41k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
648
                                                         bool* eos) {
745
648
    auto& local_state = get_local_state(state);
746
648
    if (need_more_input_data(state)) {
747
642
        local_state._child_block->clear_column_data(
748
642
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
642
                        .num_materialized_slots());
750
642
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
642
                state, local_state._child_block.get(), &local_state._child_eos));
752
642
        *eos = local_state._child_eos;
753
642
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
160
            return Status::OK();
755
160
        }
756
482
        {
757
482
            SCOPED_TIMER(local_state.exec_time_counter());
758
482
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
482
        }
760
482
    }
761
762
488
    if (!need_more_input_data(state)) {
763
488
        SCOPED_TIMER(local_state.exec_time_counter());
764
488
        bool new_eos = false;
765
488
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
488
        if (new_eos) {
767
351
            *eos = true;
768
351
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
488
    }
772
488
    return Status::OK();
773
488
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
60
                                                         bool* eos) {
745
60
    auto& local_state = get_local_state(state);
746
60
    if (need_more_input_data(state)) {
747
54
        local_state._child_block->clear_column_data(
748
54
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
54
                        .num_materialized_slots());
750
54
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
54
                state, local_state._child_block.get(), &local_state._child_eos));
752
54
        *eos = local_state._child_eos;
753
54
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
2
            return Status::OK();
755
2
        }
756
52
        {
757
52
            SCOPED_TIMER(local_state.exec_time_counter());
758
52
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
52
        }
760
52
    }
761
762
58
    if (!need_more_input_data(state)) {
763
58
        SCOPED_TIMER(local_state.exec_time_counter());
764
58
        bool new_eos = false;
765
58
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
58
        if (new_eos) {
767
33
            *eos = true;
768
33
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
58
    }
772
58
    return Status::OK();
773
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
744
2
                                                         bool* eos) {
745
2
    auto& local_state = get_local_state(state);
746
2
    if (need_more_input_data(state)) {
747
2
        local_state._child_block->clear_column_data(
748
2
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2
                        .num_materialized_slots());
750
2
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2
                state, local_state._child_block.get(), &local_state._child_eos));
752
2
        *eos = local_state._child_eos;
753
2
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
0
            return Status::OK();
755
0
        }
756
2
        {
757
2
            SCOPED_TIMER(local_state.exec_time_counter());
758
2
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
2
        }
760
2
    }
761
762
2
    if (!need_more_input_data(state)) {
763
2
        SCOPED_TIMER(local_state.exec_time_counter());
764
2
        bool new_eos = false;
765
2
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
2
        if (new_eos) {
767
2
            *eos = true;
768
2
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
2
    }
772
2
    return Status::OK();
773
2
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
586
                                                         bool* eos) {
745
586
    auto& local_state = get_local_state(state);
746
586
    if (need_more_input_data(state)) {
747
586
        local_state._child_block->clear_column_data(
748
586
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
586
                        .num_materialized_slots());
750
586
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
586
                state, local_state._child_block.get(), &local_state._child_eos));
752
586
        *eos = local_state._child_eos;
753
586
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
158
            return Status::OK();
755
158
        }
756
428
        {
757
428
            SCOPED_TIMER(local_state.exec_time_counter());
758
428
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
428
        }
760
428
    }
761
762
428
    if (!need_more_input_data(state)) {
763
428
        SCOPED_TIMER(local_state.exec_time_counter());
764
428
        bool new_eos = false;
765
428
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
428
        if (new_eos) {
767
316
            *eos = true;
768
316
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
428
    }
772
428
    return Status::OK();
773
428
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
50
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
50
    RETURN_IF_ERROR(Base::init(state, info));
779
50
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
50
                                                         "AsyncWriterDependency", true);
781
50
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
50
                             _finish_dependency));
783
784
50
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
50
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
50
    return Status::OK();
787
50
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
16
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
16
    RETURN_IF_ERROR(Base::init(state, info));
779
16
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
16
                                                         "AsyncWriterDependency", true);
781
16
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
16
                             _finish_dependency));
783
784
16
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
16
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
16
    return Status::OK();
787
16
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
34
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
34
    RETURN_IF_ERROR(Base::init(state, info));
779
34
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
34
                                                         "AsyncWriterDependency", true);
781
34
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
34
                             _finish_dependency));
783
784
34
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
34
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
34
    return Status::OK();
787
34
}
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
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
50
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50
    RETURN_IF_ERROR(Base::open(state));
793
50
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
708
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
658
        RETURN_IF_ERROR(
796
658
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
658
    }
798
50
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50
    return Status::OK();
800
50
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
16
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
16
    RETURN_IF_ERROR(Base::open(state));
793
16
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
96
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
80
        RETURN_IF_ERROR(
796
80
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
80
    }
798
16
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
16
    return Status::OK();
800
16
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
34
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
34
    RETURN_IF_ERROR(Base::open(state));
793
34
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
612
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
578
        RETURN_IF_ERROR(
796
578
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
578
    }
798
34
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
34
    return Status::OK();
800
34
}
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
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
108
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
108
    return _writer->sink(block, eos);
806
108
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
74
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
74
    return _writer->sink(block, eos);
806
74
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
34
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
34
    return _writer->sink(block, eos);
806
34
}
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
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
50
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
50
    if (_writer) {
818
50
        Status st = _writer->get_writer_status();
819
50
        if (exec_status.ok()) {
820
50
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50
                                                       : Status::Cancelled("force close"));
822
50
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50
        RETURN_IF_ERROR(st);
829
50
    }
830
50
    return Base::close(state, exec_status);
831
50
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
16
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
16
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
16
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
16
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
16
    if (_writer) {
818
16
        Status st = _writer->get_writer_status();
819
16
        if (exec_status.ok()) {
820
16
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
16
                                                       : Status::Cancelled("force close"));
822
16
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
16
        RETURN_IF_ERROR(st);
829
16
    }
830
16
    return Base::close(state, exec_status);
831
16
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
34
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
34
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
34
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
34
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
34
    if (_writer) {
818
34
        Status st = _writer->get_writer_status();
819
34
        if (exec_status.ok()) {
820
34
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
34
                                                       : Status::Cancelled("force close"));
822
34
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
34
        RETURN_IF_ERROR(st);
829
34
    }
830
34
    return Base::close(state, exec_status);
831
34
}
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
832
833
// An instantiation added outside the macros below needs the matching
834
// 'extern template' declaration in the operator's header (enforced by
835
// build-support/check-extern-template-pairing.py). Instantiations expanded
836
// through DECLARE_OPERATOR are invisible to that check -- macro bodies are
837
// skipped -- so their extern pairing has to be kept in sync by hand.
838
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
839
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
840
DECLARE_OPERATOR(ResultSinkLocalState)
841
DECLARE_OPERATOR(JdbcTableSinkLocalState)
842
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
843
DECLARE_OPERATOR(ResultFileSinkLocalState)
844
DECLARE_OPERATOR(OlapTableSinkLocalState)
845
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
846
DECLARE_OPERATOR(HiveTableSinkLocalState)
847
DECLARE_OPERATOR(TVFTableSinkLocalState)
848
DECLARE_OPERATOR(IcebergTableSinkLocalState)
849
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
850
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
851
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
852
DECLARE_OPERATOR(MCTableSinkLocalState)
853
DECLARE_OPERATOR(AnalyticSinkLocalState)
854
DECLARE_OPERATOR(BlackholeSinkLocalState)
855
DECLARE_OPERATOR(SortSinkLocalState)
856
DECLARE_OPERATOR(SpillSortSinkLocalState)
857
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
858
DECLARE_OPERATOR(AggSinkLocalState)
859
DECLARE_OPERATOR(BucketedAggSinkLocalState)
860
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
861
DECLARE_OPERATOR(ExchangeSinkLocalState)
862
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
863
DECLARE_OPERATOR(UnionSinkLocalState)
864
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
865
DECLARE_OPERATOR(PartitionSortSinkLocalState)
866
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
868
DECLARE_OPERATOR(SetSinkLocalState<true>)
869
DECLARE_OPERATOR(SetSinkLocalState<false>)
870
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
871
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
872
DECLARE_OPERATOR(CacheSinkLocalState)
873
DECLARE_OPERATOR(DictSinkLocalState)
874
DECLARE_OPERATOR(RecCTESinkLocalState)
875
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
876
877
#undef DECLARE_OPERATOR
878
879
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
880
DECLARE_OPERATOR(HashJoinProbeLocalState)
881
DECLARE_OPERATOR(OlapScanLocalState)
882
DECLARE_OPERATOR(GroupCommitLocalState)
883
DECLARE_OPERATOR(JDBCScanLocalState)
884
DECLARE_OPERATOR(FileScanLocalState)
885
DECLARE_OPERATOR(AnalyticLocalState)
886
DECLARE_OPERATOR(SortLocalState)
887
DECLARE_OPERATOR(SpillSortLocalState)
888
DECLARE_OPERATOR(LocalMergeSortLocalState)
889
DECLARE_OPERATOR(AggLocalState)
890
DECLARE_OPERATOR(BucketedAggLocalState)
891
DECLARE_OPERATOR(PartitionedAggLocalState)
892
DECLARE_OPERATOR(TableFunctionLocalState)
893
DECLARE_OPERATOR(ExchangeLocalState)
894
DECLARE_OPERATOR(RepeatLocalState)
895
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
896
DECLARE_OPERATOR(AssertNumRowsLocalState)
897
DECLARE_OPERATOR(EmptySetLocalState)
898
DECLARE_OPERATOR(UnionSourceLocalState)
899
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
900
DECLARE_OPERATOR(PartitionSortSourceLocalState)
901
DECLARE_OPERATOR(SetSourceLocalState<true>)
902
DECLARE_OPERATOR(SetSourceLocalState<false>)
903
DECLARE_OPERATOR(DataGenLocalState)
904
DECLARE_OPERATOR(SchemaScanLocalState)
905
DECLARE_OPERATOR(MetaScanLocalState)
906
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
907
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
908
DECLARE_OPERATOR(CacheSourceLocalState)
909
DECLARE_OPERATOR(RecCTESourceLocalState)
910
DECLARE_OPERATOR(RecCTEScanLocalState)
911
912
#ifdef BE_TEST
913
DECLARE_OPERATOR(MockLocalState)
914
DECLARE_OPERATOR(MockScanLocalState)
915
#endif
916
#undef DECLARE_OPERATOR
917
918
template class StreamingOperatorX<AssertNumRowsLocalState>;
919
template class StreamingOperatorX<SelectLocalState>;
920
921
template class StatefulOperatorX<HashJoinProbeLocalState>;
922
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
923
template class StatefulOperatorX<RepeatLocalState>;
924
template class StatefulOperatorX<MaterializationLocalState>;
925
template class StatefulOperatorX<StreamingAggLocalState>;
926
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
927
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
928
template class StatefulOperatorX<TableFunctionLocalState>;
929
930
template class PipelineXSinkLocalState<HashJoinSharedState>;
931
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
932
template class PipelineXSinkLocalState<SortSharedState>;
933
template class PipelineXSinkLocalState<SpillSortSharedState>;
934
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
935
template class PipelineXSinkLocalState<AnalyticSharedState>;
936
template class PipelineXSinkLocalState<AggSharedState>;
937
template class PipelineXSinkLocalState<BucketedAggSharedState>;
938
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
939
template class PipelineXSinkLocalState<FakeSharedState>;
940
template class PipelineXSinkLocalState<UnionSharedState>;
941
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
942
template class PipelineXSinkLocalState<MultiCastSharedState>;
943
template class PipelineXSinkLocalState<SetSharedState>;
944
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
945
template class PipelineXSinkLocalState<BasicSharedState>;
946
template class PipelineXSinkLocalState<DataQueueSharedState>;
947
template class PipelineXSinkLocalState<RecCTESharedState>;
948
949
template class PipelineXLocalState<HashJoinSharedState>;
950
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
951
template class PipelineXLocalState<SortSharedState>;
952
template class PipelineXLocalState<SpillSortSharedState>;
953
template class PipelineXLocalState<NestedLoopJoinSharedState>;
954
template class PipelineXLocalState<AnalyticSharedState>;
955
template class PipelineXLocalState<AggSharedState>;
956
template class PipelineXLocalState<BucketedAggSharedState>;
957
template class PipelineXLocalState<PartitionedAggSharedState>;
958
template class PipelineXLocalState<FakeSharedState>;
959
template class PipelineXLocalState<UnionSharedState>;
960
template class PipelineXLocalState<DataQueueSharedState>;
961
template class PipelineXLocalState<MultiCastSharedState>;
962
template class PipelineXLocalState<PartitionSortNodeSharedState>;
963
template class PipelineXLocalState<SetSharedState>;
964
template class PipelineXLocalState<LocalExchangeSharedState>;
965
template class PipelineXLocalState<BasicSharedState>;
966
template class PipelineXLocalState<RecCTESharedState>;
967
968
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
969
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
970
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
972
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
973
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
976
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
977
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
978
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
979
980
#ifdef BE_TEST
981
template class OperatorX<DummyOperatorLocalState>;
982
template class DataSinkOperatorX<DummySinkLocalState>;
983
#endif
984
985
} // namespace doris