Coverage Report

Created: 2026-11-01 19:56

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/paimon_table_sink_operator.h"
68
#include "exec/operator/partition_sort_sink_operator.h"
69
#include "exec/operator/partition_sort_source_operator.h"
70
#include "exec/operator/partitioned_aggregation_sink_operator.h"
71
#include "exec/operator/partitioned_aggregation_source_operator.h"
72
#include "exec/operator/partitioned_hash_join_probe_operator.h"
73
#include "exec/operator/partitioned_hash_join_sink_operator.h"
74
#include "exec/operator/rec_cte_anchor_sink_operator.h"
75
#include "exec/operator/rec_cte_scan_operator.h"
76
#include "exec/operator/rec_cte_sink_operator.h"
77
#include "exec/operator/rec_cte_source_operator.h"
78
#include "exec/operator/repeat_operator.h"
79
#include "exec/operator/result_file_sink_operator.h"
80
#include "exec/operator/result_sink_operator.h"
81
#include "exec/operator/schema_scan_operator.h"
82
#include "exec/operator/select_operator.h"
83
#include "exec/operator/set_probe_sink_operator.h"
84
#include "exec/operator/set_sink_operator.h"
85
#include "exec/operator/set_source_operator.h"
86
#include "exec/operator/sort_sink_operator.h"
87
#include "exec/operator/sort_source_operator.h"
88
#include "exec/operator/spill_iceberg_table_sink_operator.h"
89
#include "exec/operator/spill_sort_sink_operator.h"
90
#include "exec/operator/spill_sort_source_operator.h"
91
#include "exec/operator/streaming_aggregation_operator.h"
92
#include "exec/operator/table_function_operator.h"
93
#include "exec/operator/tvf_table_sink_operator.h"
94
#include "exec/operator/union_sink_operator.h"
95
#include "exec/operator/union_source_operator.h"
96
#include "exec/pipeline/dependency.h"
97
#include "exec/pipeline/pipeline.h"
98
#include "exprs/vexpr.h"
99
#include "exprs/vexpr_context.h"
100
#include "runtime/runtime_profile.h"
101
#include "runtime/runtime_profile_counter_names.h"
102
#include "util/debug_util.h"
103
#include "util/string_util.h"
104
105
namespace doris {
106
class RowDescriptor;
107
class RuntimeState;
108
} // namespace doris
109
110
namespace doris {
111
112
0
Status OperatorBase::close(RuntimeState* state) {
113
0
    if (_is_closed) {
114
0
        return Status::OK();
115
0
    }
116
0
    _is_closed = true;
117
0
    return Status::OK();
118
0
}
119
120
template <typename SharedStateArg>
121
1.94M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.94M
    if (_parent->nereids_id() == -1) {
123
998k
        return fmt::format("(id={})", _parent->node_id());
124
998k
    } else {
125
944k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
944k
    }
127
1.94M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
70.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
70.2k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
70.2k
    } else {
125
70.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
70.2k
    }
127
70.2k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4
    if (_parent->nereids_id() == -1) {
123
1
        return fmt::format("(id={})", _parent->node_id());
124
3
    } else {
125
3
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
3
    }
127
4
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
245k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
245k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
245k
    } else {
125
245k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
245k
    }
127
245k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
157
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
157
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
157
    } else {
125
157
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
157
    }
127
157
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.73k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.73k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
5.73k
    } else {
125
5.73k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.73k
    }
127
5.73k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
9.06k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
9.06k
    if (_parent->nereids_id() == -1) {
123
60
        return fmt::format("(id={})", _parent->node_id());
124
9.00k
    } else {
125
9.00k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
9.00k
    }
127
9.06k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
103k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
103k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
103k
    } else {
125
103k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
103k
    }
127
103k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
87.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
87.1k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
87.1k
    } else {
125
87.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
87.1k
    }
127
87.1k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
111
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
111
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
111
    } else {
125
111
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
111
    }
127
111
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
667k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
667k
    if (_parent->nereids_id() == -1) {
123
306k
        return fmt::format("(id={})", _parent->node_id());
124
361k
    } else {
125
361k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
361k
    }
127
667k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
55.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
55.9k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
55.9k
    } else {
125
55.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
55.9k
    }
127
55.9k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
26
    if (_parent->nereids_id() == -1) {
123
26
        return fmt::format("(id={})", _parent->node_id());
124
26
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4.77k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4.78k
    if (_parent->nereids_id() == -1) {
123
4.78k
        return fmt::format("(id={})", _parent->node_id());
124
18.4E
    } else {
125
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
18.4E
    }
127
4.77k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
456
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
456
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
354
    } else {
125
354
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
354
    }
127
456
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.16k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.16k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.15k
    } else {
125
5.15k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.15k
    }
127
5.16k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
687k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
687k
    if (_parent->nereids_id() == -1) {
123
687k
        return fmt::format("(id={})", _parent->node_id());
124
18.4E
    } else {
125
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
18.4E
    }
127
687k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
169
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
169
    } else {
125
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
169
    }
127
169
}
128
129
template <typename SharedStateArg>
130
1.29M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.29M
    if (_parent->nereids_id() == -1) {
132
708k
        return fmt::format("(id={})", _parent->node_id());
133
708k
    } else {
134
582k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
582k
    }
136
1.29M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
118k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
118k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
118k
    } else {
134
118k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
118k
    }
136
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5
    if (_parent->nereids_id() == -1) {
132
1
        return fmt::format("(id={})", _parent->node_id());
133
4
    } else {
134
4
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
4
    }
136
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
250k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
250k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
250k
    } else {
134
250k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
250k
    }
136
250k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
164
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
164
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
164
    } else {
134
164
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
164
    }
136
164
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5.75k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5.75k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
5.75k
    } else {
134
5.75k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
5.75k
    }
136
5.75k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.08k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.08k
    if (_parent->nereids_id() == -1) {
132
60
        return fmt::format("(id={})", _parent->node_id());
133
9.02k
    } else {
134
9.02k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.02k
    }
136
9.08k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
103k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
103k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
103k
    } else {
134
103k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
103k
    }
136
103k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
86.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
86.8k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
86.8k
    } else {
134
86.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
86.8k
    }
136
86.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
121
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
121
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
121
    } else {
134
121
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
121
    }
136
121
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
70
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
70
    if (_parent->nereids_id() == -1) {
132
70
        return fmt::format("(id={})", _parent->node_id());
133
70
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
70
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.26k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.26k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
9.26k
    } else {
134
9.26k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.26k
    }
136
9.26k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
456
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
456
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
354
    } else {
134
354
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
354
    }
136
456
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
12.5k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12.6k
    if (_parent->nereids_id() == -1) {
132
12.6k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
12.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
229k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
229k
    if (_parent->nereids_id() == -1) {
132
229k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
229k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
464k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
465k
    if (_parent->nereids_id() == -1) {
132
465k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
464k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
25
    if (_parent->nereids_id() == -1) {
132
25
        return fmt::format("(id={})", _parent->node_id());
133
25
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
338
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
338
    } else {
134
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
338
    }
136
338
}
137
138
template <typename SharedStateArg>
139
32.2k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
32.2k
    if (_terminated) {
141
1
        return Status::OK();
142
1
    }
143
32.2k
    _terminated = true;
144
32.2k
    return Status::OK();
145
32.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
24.0k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
24.0k
    _terminated = true;
144
24.0k
    return Status::OK();
145
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3.64k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3.64k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3.64k
    _terminated = true;
144
3.64k
    return Status::OK();
145
3.64k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1
    _terminated = true;
144
1
    return Status::OK();
145
1
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.32k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.32k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.32k
    _terminated = true;
144
2.32k
    return Status::OK();
145
2.32k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.15k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.15k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.15k
    _terminated = true;
144
1.15k
    return Status::OK();
145
1.15k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
311
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
311
    if (_terminated) {
141
1
        return Status::OK();
142
1
    }
143
310
    _terminated = true;
144
310
    return Status::OK();
145
311
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
329
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
329
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
329
    _terminated = true;
144
329
    return Status::OK();
145
329
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
9
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
9
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
9
    _terminated = true;
144
9
    return Status::OK();
145
9
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
71
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
71
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
71
    _terminated = true;
144
71
    return Status::OK();
145
71
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
5
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
5
    _terminated = true;
144
5
    return Status::OK();
145
5
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
231
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
231
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
231
    _terminated = true;
144
231
    return Status::OK();
145
231
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
134
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
134
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
134
    _terminated = true;
144
134
    return Status::OK();
145
134
}
146
147
317k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
317k
    return _child && _child->is_serial_operator() && !is_source()
149
317k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
317k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
317k
}
152
153
24.1k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
24.1k
    if (!_child) {
155
23.4k
        return false;
156
23.4k
    }
157
640
    if (_child->is_serial_operator()) {
158
62
        return true;
159
62
    }
160
578
    const auto child_distribution = _child->required_data_distribution(state);
161
578
    return child_distribution.need_local_exchange() &&
162
578
           !is_shuffled_exchange(child_distribution.distribution_type);
163
640
}
164
165
template <typename SharedStateArg>
166
16.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16.4k
    fmt::memory_buffer debug_string_buffer;
168
16.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16.4k
    return fmt::to_string(debug_string_buffer);
170
16.4k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
4
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
4
    fmt::memory_buffer debug_string_buffer;
168
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
4
    return fmt::to_string(debug_string_buffer);
170
4
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
3
    fmt::memory_buffer debug_string_buffer;
168
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
3
    return fmt::to_string(debug_string_buffer);
170
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
2
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
2
    fmt::memory_buffer debug_string_buffer;
168
2
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
2
    return fmt::to_string(debug_string_buffer);
170
2
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
10
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
10
    fmt::memory_buffer debug_string_buffer;
168
10
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
10
    return fmt::to_string(debug_string_buffer);
170
10
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
16.3k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16.3k
    fmt::memory_buffer debug_string_buffer;
168
16.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16.3k
    return fmt::to_string(debug_string_buffer);
170
16.3k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
1
    fmt::memory_buffer debug_string_buffer;
168
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
1
    return fmt::to_string(debug_string_buffer);
170
1
}
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
171
172
template <typename SharedStateArg>
173
16.3k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
16.3k
    fmt::memory_buffer debug_string_buffer;
175
16.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
16.3k
    return fmt::to_string(debug_string_buffer);
177
16.3k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
2
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
2
    fmt::memory_buffer debug_string_buffer;
175
2
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
2
    return fmt::to_string(debug_string_buffer);
177
2
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
10
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
10
    fmt::memory_buffer debug_string_buffer;
175
10
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
10
    return fmt::to_string(debug_string_buffer);
177
10
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
12
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
12
    fmt::memory_buffer debug_string_buffer;
175
12
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
12
    return fmt::to_string(debug_string_buffer);
177
12
}
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
173
16.3k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
16.3k
    fmt::memory_buffer debug_string_buffer;
175
16.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
16.3k
    return fmt::to_string(debug_string_buffer);
177
16.3k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
16.4k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
16.4k
    fmt::memory_buffer debug_string_buffer;
181
16.4k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
16.4k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
16.4k
                   _is_serial_operator);
184
16.4k
    return fmt::to_string(debug_string_buffer);
185
16.4k
}
186
187
16.3k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
16.3k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
16.3k
}
190
191
702k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
702k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
702k
    _nereids_id = tnode.nereids_id;
194
702k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.79k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.79k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.79k
            tnode.intermediate_projections_list.size()) {
200
0
            return Status::InternalError(
201
0
                    "intermediate_output_tuple_id_list size:{} not match "
202
0
                    "intermediate_projections_list size:{}",
203
0
                    tnode.intermediate_output_tuple_id_list.size(),
204
0
                    tnode.intermediate_projections_list.size());
205
0
        }
206
6.79k
    }
207
702k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
702k
    _op_name = substr + "_OPERATOR";
209
210
702k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
702k
    } else if (tnode.__isset.conjuncts) {
213
284k
        for (const auto& conjunct : tnode.conjuncts) {
214
284k
            VExprContextSPtr context;
215
284k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
284k
            _conjuncts.emplace_back(context);
217
284k
        }
218
106k
    }
219
220
    // create the projections expr
221
702k
    if (tnode.__isset.projections) {
222
276k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
276k
    }
224
702k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.80k
        DCHECK(has_projection()) << "no final projections";
226
6.80k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
12.2k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
12.2k
            VExprContextSPtrs projections;
229
12.2k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
12.2k
            _projection->intermediate_projections.push_back(projections);
231
12.2k
        }
232
6.80k
    }
233
702k
    return Status::OK();
234
702k
}
235
236
729k
Status OperatorXBase::prepare(RuntimeState* state) {
237
729k
    for (auto& conjunct : _conjuncts) {
238
284k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
284k
    }
240
729k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
679k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
347k
            return a->execute_cost() < b->execute_cost();
243
347k
        });
244
679k
    };
245
246
729k
    if (has_projection()) {
247
275k
        auto& projection = *_projection;
248
288k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
12.2k
            const auto& input_row_desc =
250
12.2k
                    i == 0 ? operator_row_desc_before_projection()
251
12.2k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
12.2k
            RETURN_IF_ERROR(
253
12.2k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
12.2k
        }
255
275k
        const auto& final_projection_input_row_desc =
256
275k
                projection.intermediate_output_row_descriptors.empty()
257
275k
                        ? operator_row_desc_before_projection()
258
275k
                        : projection.intermediate_output_row_descriptors.back();
259
275k
        RETURN_IF_ERROR(
260
275k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
275k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
275k
                                                      projection.output_row_descriptor));
263
275k
    }
264
265
729k
    for (auto& conjunct : _conjuncts) {
266
284k
        RETURN_IF_ERROR(conjunct->open(state));
267
284k
    }
268
729k
    if (has_projection()) {
269
275k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
275k
        for (auto& projections : _projection->intermediate_projections) {
271
12.2k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
12.2k
        }
273
275k
    }
274
729k
    if (_child && !is_source()) {
275
98.0k
        RETURN_IF_ERROR(_child->prepare(state));
276
98.0k
    }
277
278
729k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
729k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
729k
    return Status::OK();
284
729k
}
285
286
8.96k
Status OperatorXBase::terminate(RuntimeState* state) {
287
8.96k
    if (_child && !is_source()) {
288
668
        RETURN_IF_ERROR(_child->terminate(state));
289
668
    }
290
8.96k
    auto result = state->get_local_state_result(operator_id());
291
8.96k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
8.96k
    return result.value()->terminate(state);
295
8.96k
}
296
297
5.23M
Status OperatorXBase::close(RuntimeState* state) {
298
5.23M
    if (_child && !is_source()) {
299
850k
        RETURN_IF_ERROR(_child->close(state));
300
850k
    }
301
5.23M
    auto result = state->get_local_state_result(operator_id());
302
5.23M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
5.23M
    return result.value()->close(state);
306
5.23M
}
307
308
300k
void PipelineXLocalStateBase::clear_origin_block() {
309
300k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
300k
}
311
312
829k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
829k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
829k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
829k
    return Status::OK();
317
829k
}
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
300k
                                     Block* output_block) const {
326
300k
    auto* local_state = state->get_local_state(operator_id());
327
300k
    SCOPED_TIMER(local_state->exec_time_counter());
328
300k
    SCOPED_TIMER(local_state->_projection_timer);
329
300k
    const size_t rows = origin_block->rows();
330
300k
    if (rows == 0) {
331
154k
        return Status::OK();
332
154k
    }
333
146k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
146k
    {
336
146k
        Block input_block = *origin_block;
337
338
146k
        ColumnsWithTypeAndName new_columns;
339
146k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.35k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.35k
            new_columns.resize(projections.size());
345
122k
            for (int i = 0; i < projections.size(); i++) {
346
116k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
116k
                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
116k
            }
355
5.34k
            Block tmp_block {new_columns};
356
5.34k
            input_block.swap(tmp_block);
357
5.34k
        }
358
359
146k
        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
146k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
146k
                output_block, _projection->output_row_descriptor);
368
146k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
146k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
146k
        Columns shared_columns(mutable_columns.size());
371
372
826k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
680k
            ColumnPtr column_ptr;
374
680k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
680k
            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
680k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
680k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
680k
            if (column_ptr->is_exclusive()) {
386
238k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
442k
            } else {
388
442k
                shared_columns[i] = std::move(column_ptr);
389
442k
            }
390
680k
        }
391
392
146k
        scoped_mutable_block.restore();
393
826k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
680k
            if (shared_columns[i]) {
395
442k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
442k
            }
397
680k
        }
398
146k
    }
399
400
0
    origin_block->clear_column_data(
401
146k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
146k
    DCHECK_EQ(output_block->rows(), rows);
403
404
146k
    return Status::OK();
405
146k
}
406
407
4.39M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.39M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.39M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.39M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.39M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.39M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.39M
            if (_debug_point_count++ % 2 == 0) {
414
4.39M
                return Status::OK();
415
4.39M
            }
416
4.39M
        }
417
4.39M
    });
418
419
4.39M
    Status status;
420
4.39M
    auto* local_state = state->get_local_state(operator_id());
421
4.39M
    Defer defer([&]() {
422
4.39M
        if (status.ok()) {
423
4.39M
            local_state->update_output_block_counters(*block);
424
4.39M
        }
425
4.39M
    });
426
4.39M
    if (has_projection()) {
427
300k
        local_state->clear_origin_block();
428
300k
        status = get_block(state, &local_state->_origin_block, eos);
429
300k
        if (UNLIKELY(!status.ok())) {
430
43
            return status;
431
43
        }
432
300k
        status = do_projections(state, &local_state->_origin_block, block);
433
300k
        return status;
434
300k
    }
435
4.09M
    status = get_block(state, block, eos);
436
4.09M
    RETURN_IF_ERROR(block->check_type_and_column());
437
4.09M
    return status;
438
4.09M
}
439
440
2.91M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.91M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.97k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.97k
        *eos = true;
444
9.97k
    }
445
446
2.91M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.91M
        auto op_name = to_lower(_parent->_op_name);
448
2.91M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.91M
        arg_op_name = to_lower(arg_op_name);
450
451
2.91M
        if (op_name == arg_op_name) {
452
2.91M
            *eos = true;
453
2.91M
        }
454
2.91M
    });
455
456
2.91M
    if (auto rows = block->rows()) {
457
807k
        _num_rows_returned += rows;
458
807k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
807k
    }
460
2.91M
}
461
462
32.2k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
32.2k
    auto result = state->get_sink_local_state_result();
464
32.2k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
32.2k
    return result.value()->terminate(state);
468
32.2k
}
469
470
16.3k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
16.3k
    fmt::memory_buffer debug_string_buffer;
472
473
16.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
16.3k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
16.3k
    return fmt::to_string(debug_string_buffer);
476
16.3k
}
477
478
16.3k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
16.3k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
16.3k
}
481
482
365k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
365k
    std::string op_name = "UNKNOWN_SINK";
484
365k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
365k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
365k
        op_name = it->second;
488
365k
    }
489
365k
    _name = op_name + "_OPERATOR";
490
365k
    return Status::OK();
491
365k
}
492
493
312k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
312k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
312k
    _nereids_id = tnode.nereids_id;
496
312k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
312k
    _name = substr + "_SINK_OPERATOR";
498
312k
    return Status::OK();
499
312k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.86M
                                                            LocalSinkStateInfo& info) {
504
1.86M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.86M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.86M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.86M
    return Status::OK();
508
1.86M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
118k
                                                            LocalSinkStateInfo& info) {
504
118k
    auto local_state = LocalStateType::create_unique(this, state);
505
118k
    RETURN_IF_ERROR(local_state->init(state, info));
506
118k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
118k
    return Status::OK();
508
118k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
415k
                                                            LocalSinkStateInfo& info) {
504
415k
    auto local_state = LocalStateType::create_unique(this, state);
505
415k
    RETURN_IF_ERROR(local_state->init(state, info));
506
415k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
415k
    return Status::OK();
508
415k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6
                                                            LocalSinkStateInfo& info) {
504
6
    auto local_state = LocalStateType::create_unique(this, state);
505
6
    RETURN_IF_ERROR(local_state->init(state, info));
506
6
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6
    return Status::OK();
508
6
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
370
                                                            LocalSinkStateInfo& info) {
504
370
    auto local_state = LocalStateType::create_unique(this, state);
505
370
    RETURN_IF_ERROR(local_state->init(state, info));
506
370
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
370
    return Status::OK();
508
370
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
49.5k
                                                            LocalSinkStateInfo& info) {
504
49.5k
    auto local_state = LocalStateType::create_unique(this, state);
505
49.5k
    RETURN_IF_ERROR(local_state->init(state, info));
506
49.5k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
49.5k
    return Status::OK();
508
49.5k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
8
                                                            LocalSinkStateInfo& info) {
504
8
    auto local_state = LocalStateType::create_unique(this, state);
505
8
    RETURN_IF_ERROR(local_state->init(state, info));
506
8
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8
    return Status::OK();
508
8
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_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
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE17setup_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
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.02k
                                                            LocalSinkStateInfo& info) {
504
9.02k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.02k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.02k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.02k
    return Status::OK();
508
9.02k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
48
                                                            LocalSinkStateInfo& info) {
504
48
    auto local_state = LocalStateType::create_unique(this, state);
505
48
    RETURN_IF_ERROR(local_state->init(state, info));
506
48
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
48
    return Status::OK();
508
48
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
250k
                                                            LocalSinkStateInfo& info) {
504
250k
    auto local_state = LocalStateType::create_unique(this, state);
505
250k
    RETURN_IF_ERROR(local_state->init(state, info));
506
250k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
250k
    return Status::OK();
508
250k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
163
                                                            LocalSinkStateInfo& info) {
504
163
    auto local_state = LocalStateType::create_unique(this, state);
505
163
    RETURN_IF_ERROR(local_state->init(state, info));
506
163
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
163
    return Status::OK();
508
163
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
229k
                                                            LocalSinkStateInfo& info) {
504
229k
    auto local_state = LocalStateType::create_unique(this, state);
505
229k
    RETURN_IF_ERROR(local_state->init(state, info));
506
229k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
229k
    return Status::OK();
508
229k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
103k
                                                            LocalSinkStateInfo& info) {
504
103k
    auto local_state = LocalStateType::create_unique(this, state);
505
103k
    RETURN_IF_ERROR(local_state->init(state, info));
506
103k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
103k
    return Status::OK();
508
103k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
86.9k
                                                            LocalSinkStateInfo& info) {
504
86.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
86.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
86.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
86.9k
    return Status::OK();
508
86.9k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
121
                                                            LocalSinkStateInfo& info) {
504
121
    auto local_state = LocalStateType::create_unique(this, state);
505
121
    RETURN_IF_ERROR(local_state->init(state, info));
506
121
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
121
    return Status::OK();
508
121
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
566k
                                                            LocalSinkStateInfo& info) {
504
566k
    auto local_state = LocalStateType::create_unique(this, state);
505
566k
    RETURN_IF_ERROR(local_state->init(state, info));
506
566k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
566k
    return Status::OK();
508
566k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.75k
                                                            LocalSinkStateInfo& info) {
504
5.75k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.75k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.75k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.75k
    return Status::OK();
508
5.75k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.25k
                                                            LocalSinkStateInfo& info) {
504
9.25k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.25k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.25k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.25k
    return Status::OK();
508
9.25k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.95k
                                                            LocalSinkStateInfo& info) {
504
1.95k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.95k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.95k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.95k
    return Status::OK();
508
1.95k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
350
                                                            LocalSinkStateInfo& info) {
504
350
    auto local_state = LocalStateType::create_unique(this, state);
505
350
    RETURN_IF_ERROR(local_state->init(state, info));
506
350
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
350
    return Status::OK();
508
350
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.79k
                                                            LocalSinkStateInfo& info) {
504
4.79k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.79k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.79k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.79k
    return Status::OK();
508
4.79k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.65k
                                                            LocalSinkStateInfo& info) {
504
2.65k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.65k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.65k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.65k
    return Status::OK();
508
2.65k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.57k
                                                            LocalSinkStateInfo& info) {
504
2.57k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.57k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.57k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.57k
    return Status::OK();
508
2.57k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.55k
                                                            LocalSinkStateInfo& info) {
504
2.55k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.55k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.55k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.55k
    return Status::OK();
508
2.55k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4
                                                            LocalSinkStateInfo& info) {
504
4
    auto local_state = LocalStateType::create_unique(this, state);
505
4
    RETURN_IF_ERROR(local_state->init(state, info));
506
4
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4
    return Status::OK();
508
4
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
567
                                                            LocalSinkStateInfo& info) {
504
567
    auto local_state = LocalStateType::create_unique(this, state);
505
567
    RETURN_IF_ERROR(local_state->init(state, info));
506
567
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
567
    return Status::OK();
508
567
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_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_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
106
                                                            LocalSinkStateInfo& info) {
504
106
    auto local_state = LocalStateType::create_unique(this, state);
505
106
    RETURN_IF_ERROR(local_state->init(state, info));
506
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106
    return Status::OK();
508
106
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
509
510
template <typename LocalStateType>
511
1.51M
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
1.51M
    } else {
519
1.51M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.51M
        ss->id = operator_id();
521
1.51M
        for (auto& dest : dests_id()) {
522
1.50M
            ss->related_op_ids.insert(dest);
523
1.50M
        }
524
1.51M
        return ss;
525
1.51M
    }
526
1.51M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
104k
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
104k
    } else {
519
104k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
104k
        ss->id = operator_id();
521
104k
        for (auto& dest : dests_id()) {
522
104k
            ss->related_op_ids.insert(dest);
523
104k
        }
524
104k
        return ss;
525
104k
    }
526
104k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
415k
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
415k
    } else {
519
415k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
415k
        ss->id = operator_id();
521
415k
        for (auto& dest : dests_id()) {
522
412k
            ss->related_op_ids.insert(dest);
523
412k
        }
524
415k
        return ss;
525
415k
    }
526
415k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_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
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
370
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
370
    } else {
519
370
        auto ss = LocalStateType::SharedStateType::create_shared();
520
370
        ss->id = operator_id();
521
370
        for (auto& dest : dests_id()) {
522
370
            ss->related_op_ids.insert(dest);
523
370
        }
524
370
        return ss;
525
370
    }
526
370
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
49.6k
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
49.6k
    } else {
519
49.6k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
49.6k
        ss->id = operator_id();
521
49.6k
        for (auto& dest : dests_id()) {
522
49.1k
            ss->related_op_ids.insert(dest);
523
49.1k
        }
524
49.6k
        return ss;
525
49.6k
    }
526
49.6k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
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
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_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_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
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
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
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
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
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
9.10k
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
9.10k
    } else {
519
9.10k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9.10k
        ss->id = operator_id();
521
9.10k
        for (auto& dest : dests_id()) {
522
9.10k
            ss->related_op_ids.insert(dest);
523
9.10k
        }
524
9.10k
        return ss;
525
9.10k
    }
526
9.10k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
48
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
48
    } else {
519
48
        auto ss = LocalStateType::SharedStateType::create_shared();
520
48
        ss->id = operator_id();
521
48
        for (auto& dest : dests_id()) {
522
48
            ss->related_op_ids.insert(dest);
523
48
        }
524
48
        return ss;
525
48
    }
526
48
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
251k
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
251k
    } else {
519
251k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
251k
        ss->id = operator_id();
521
251k
        for (auto& dest : dests_id()) {
522
251k
            ss->related_op_ids.insert(dest);
523
251k
        }
524
251k
        return ss;
525
251k
    }
526
251k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
166
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
166
    } else {
519
166
        auto ss = LocalStateType::SharedStateType::create_shared();
520
166
        ss->id = operator_id();
521
166
        for (auto& dest : dests_id()) {
522
166
            ss->related_op_ids.insert(dest);
523
166
        }
524
166
        return ss;
525
166
    }
526
166
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
104k
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
104k
    } else {
519
104k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
104k
        ss->id = operator_id();
521
104k
        for (auto& dest : dests_id()) {
522
104k
            ss->related_op_ids.insert(dest);
523
104k
        }
524
104k
        return ss;
525
104k
    }
526
104k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
120
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
120
    } else {
519
120
        auto ss = LocalStateType::SharedStateType::create_shared();
520
120
        ss->id = operator_id();
521
120
        for (auto& dest : dests_id()) {
522
120
            ss->related_op_ids.insert(dest);
523
120
        }
524
120
        return ss;
525
120
    }
526
120
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
566k
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
566k
    } else {
519
566k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
566k
        ss->id = operator_id();
521
566k
        for (auto& dest : dests_id()) {
522
560k
            ss->related_op_ids.insert(dest);
523
560k
        }
524
566k
        return ss;
525
566k
    }
526
566k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.75k
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
5.75k
    } else {
519
5.75k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.75k
        ss->id = operator_id();
521
5.75k
        for (auto& dest : dests_id()) {
522
5.75k
            ss->related_op_ids.insert(dest);
523
5.75k
        }
524
5.75k
        return ss;
525
5.75k
    }
526
5.75k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
456
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
456
    } else {
519
456
        auto ss = LocalStateType::SharedStateType::create_shared();
520
456
        ss->id = operator_id();
521
456
        for (auto& dest : dests_id()) {
522
455
            ss->related_op_ids.insert(dest);
523
455
        }
524
456
        return ss;
525
456
    }
526
456
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.57k
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
2.57k
    } else {
519
2.57k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.57k
        ss->id = operator_id();
521
2.57k
        for (auto& dest : dests_id()) {
522
2.56k
            ss->related_op_ids.insert(dest);
523
2.56k
        }
524
2.57k
        return ss;
525
2.57k
    }
526
2.57k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.55k
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
2.55k
    } else {
519
2.55k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.55k
        ss->id = operator_id();
521
2.55k
        for (auto& dest : dests_id()) {
522
2.55k
            ss->related_op_ids.insert(dest);
523
2.55k
        }
524
2.55k
        return ss;
525
2.55k
    }
526
2.55k
}
_ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
3
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
3
    } else {
519
3
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3
        ss->id = operator_id();
521
3
        for (auto& dest : dests_id()) {
522
3
            ss->related_op_ids.insert(dest);
523
3
        }
524
3
        return ss;
525
3
    }
526
3
}
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
563
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
563
    } else {
519
563
        auto ss = LocalStateType::SharedStateType::create_shared();
520
563
        ss->id = operator_id();
521
563
        for (auto& dest : dests_id()) {
522
553
            ss->related_op_ids.insert(dest);
523
553
        }
524
563
        return ss;
525
563
    }
526
563
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
106
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
106
    } else {
519
106
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106
        ss->id = operator_id();
521
106
        for (auto& dest : dests_id()) {
522
106
            ss->related_op_ids.insert(dest);
523
106
        }
524
106
        return ss;
525
106
    }
526
106
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.21M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.21M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.21M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.21M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.21M
    return Status::OK();
534
2.21M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
70.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
70.6k
    auto local_state = LocalStateType::create_unique(state, this);
531
70.6k
    RETURN_IF_ERROR(local_state->init(state, info));
532
70.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
70.6k
    return Status::OK();
534
70.6k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
251k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
251k
    auto local_state = LocalStateType::create_unique(state, this);
531
251k
    RETURN_IF_ERROR(local_state->init(state, info));
532
251k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
251k
    return Status::OK();
534
251k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
119
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
119
    auto local_state = LocalStateType::create_unique(state, this);
531
119
    RETURN_IF_ERROR(local_state->init(state, info));
532
119
    state->emplace_local_state(operator_id(), std::move(local_state));
533
119
    return Status::OK();
534
119
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.38k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.38k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.38k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.38k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.38k
    return Status::OK();
534
3.38k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.03k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.03k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.03k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.03k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.03k
    return Status::OK();
534
9.03k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.27k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.27k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.27k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.27k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.27k
    return Status::OK();
534
8.27k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
157
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
157
    auto local_state = LocalStateType::create_unique(state, this);
531
157
    RETURN_IF_ERROR(local_state->init(state, info));
532
157
    state->emplace_local_state(operator_id(), std::move(local_state));
533
157
    return Status::OK();
534
157
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
241k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
241k
    auto local_state = LocalStateType::create_unique(state, this);
531
241k
    RETURN_IF_ERROR(local_state->init(state, info));
532
241k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
241k
    return Status::OK();
534
241k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
103k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
103k
    auto local_state = LocalStateType::create_unique(state, this);
531
103k
    RETURN_IF_ERROR(local_state->init(state, info));
532
103k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
103k
    return Status::OK();
534
103k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
87.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
87.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
87.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
87.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
87.4k
    return Status::OK();
534
87.4k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
109
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
109
    auto local_state = LocalStateType::create_unique(state, this);
531
109
    RETURN_IF_ERROR(local_state->init(state, info));
532
109
    state->emplace_local_state(operator_id(), std::move(local_state));
533
109
    return Status::OK();
534
109
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.26k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.26k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.26k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.26k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.26k
    return Status::OK();
534
6.26k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
307k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
307k
    auto local_state = LocalStateType::create_unique(state, this);
531
307k
    RETURN_IF_ERROR(local_state->init(state, info));
532
307k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
307k
    return Status::OK();
534
307k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.36k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.36k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.36k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.36k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.36k
    return Status::OK();
534
1.36k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.75k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.75k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.75k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.75k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.75k
    return Status::OK();
534
5.75k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
29
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
29
    auto local_state = LocalStateType::create_unique(state, this);
531
29
    RETURN_IF_ERROR(local_state->init(state, info));
532
29
    state->emplace_local_state(operator_id(), std::move(local_state));
533
29
    return Status::OK();
534
29
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.59k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.59k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.59k
    return Status::OK();
534
1.59k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
56.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.0k
    return Status::OK();
534
56.0k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.78k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.78k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.78k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.78k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.78k
    return Status::OK();
534
4.78k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
352
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
352
    auto local_state = LocalStateType::create_unique(state, this);
531
352
    RETURN_IF_ERROR(local_state->init(state, info));
532
352
    state->emplace_local_state(operator_id(), std::move(local_state));
533
352
    return Status::OK();
534
352
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.59k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.59k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.59k
    return Status::OK();
534
2.59k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.57k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.57k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.57k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.57k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.57k
    return Status::OK();
534
2.57k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
602
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
602
    auto local_state = LocalStateType::create_unique(state, this);
531
602
    RETURN_IF_ERROR(local_state->init(state, info));
532
602
    state->emplace_local_state(operator_id(), std::move(local_state));
533
602
    return Status::OK();
534
602
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.72k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.72k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.72k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.72k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.72k
    return Status::OK();
534
1.72k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.8k
    return Status::OK();
534
10.8k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
695k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
695k
    auto local_state = LocalStateType::create_unique(state, this);
531
695k
    RETURN_IF_ERROR(local_state->init(state, info));
532
695k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
695k
    return Status::OK();
534
695k
}
_ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_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_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
14
    auto local_state = LocalStateType::create_unique(state, this);
531
14
    RETURN_IF_ERROR(local_state->init(state, info));
532
14
    state->emplace_local_state(operator_id(), std::move(local_state));
533
14
    return Status::OK();
534
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
169
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
169
    auto local_state = LocalStateType::create_unique(state, this);
531
169
    RETURN_IF_ERROR(local_state->init(state, info));
532
169
    state->emplace_local_state(operator_id(), std::move(local_state));
533
169
    return Status::OK();
534
169
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.20k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.20k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.20k
    return Status::OK();
534
2.20k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
797
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
797
    auto local_state = LocalStateType::create_unique(state, this);
531
797
    RETURN_IF_ERROR(local_state->init(state, info));
532
797
    state->emplace_local_state(operator_id(), std::move(local_state));
533
797
    return Status::OK();
534
797
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
758
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
758
    auto local_state = LocalStateType::create_unique(state, this);
531
758
    RETURN_IF_ERROR(local_state->init(state, info));
532
758
    state->emplace_local_state(operator_id(), std::move(local_state));
533
758
    return Status::OK();
534
758
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.97k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.97k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.97k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.97k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.97k
    return Status::OK();
534
7.97k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
329k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
329k
    auto local_state = LocalStateType::create_unique(state, this);
531
329k
    RETURN_IF_ERROR(local_state->init(state, info));
532
329k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
329k
    return Status::OK();
534
329k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.85M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.20M
        : _num_rows_returned(0),
542
2.20M
          _rows_returned_counter(nullptr),
543
2.20M
          _parent(parent),
544
2.20M
          _state(state),
545
2.20M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.21M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.21M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.21M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.21M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.21M
    _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.21M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.21M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.21M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.21M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.21M
    if constexpr (!is_fake_shared) {
560
1.29M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
792k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
792k
                                    .first.get()
563
792k
                                    ->template cast<SharedStateArg>();
564
565
792k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
792k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
792k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
792k
        } else if (info.shared_state) {
569
429k
            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
429k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
429k
            _dependency = _shared_state->create_source_dependency(
576
429k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
429k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
429k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
429k
        } else {
580
72.3k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
8.45k
                DCHECK(false);
582
8.45k
            }
583
72.3k
        }
584
1.29M
    }
585
586
2.21M
    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.21M
    _rows_returned_counter =
591
2.21M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.21M
    _blocks_returned_counter =
593
2.21M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.21M
    _output_block_bytes_counter =
595
2.21M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.21M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.21M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.21M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.21M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.21M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.21M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.21M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.21M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.21M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.21M
    _memory_used_counter =
606
2.21M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.21M
    _common_profile->add_info_string("IsColocate",
608
2.21M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.21M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.21M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.21M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.21M
    return Status::OK();
613
2.21M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
70.8k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
70.8k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
70.8k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
70.8k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
70.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
70.8k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
70.8k
    _operator_profile->add_child(_common_profile.get(), true);
557
70.8k
    _operator_profile->add_child(_custom_profile.get(), true);
558
70.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
70.8k
    if constexpr (!is_fake_shared) {
560
70.8k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
14.3k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
14.3k
                                    .first.get()
563
14.3k
                                    ->template cast<SharedStateArg>();
564
565
14.3k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
14.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
14.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.4k
        } 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
55.7k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
55.7k
            _dependency = _shared_state->create_source_dependency(
576
55.7k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
55.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
55.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
55.7k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
706
        }
584
70.8k
    }
585
586
70.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
70.8k
    _rows_returned_counter =
591
70.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
70.8k
    _blocks_returned_counter =
593
70.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
70.8k
    _output_block_bytes_counter =
595
70.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
70.8k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
70.8k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
70.8k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
70.8k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
70.8k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
70.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
70.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
70.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
70.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
70.8k
    _memory_used_counter =
606
70.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
70.8k
    _common_profile->add_info_string("IsColocate",
608
70.8k
                                     std::to_string(_parent->is_colocated_operator()));
609
70.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
70.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
70.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
70.8k
    return Status::OK();
613
70.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4
    _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
4
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4
    _operator_profile->add_child(_common_profile.get(), true);
557
4
    _operator_profile->add_child(_custom_profile.get(), true);
558
4
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4
    if constexpr (!is_fake_shared) {
560
4
        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
4
        } 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
4
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4
            _dependency = _shared_state->create_source_dependency(
576
4
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
4
    }
585
586
4
    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
4
    _rows_returned_counter =
591
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4
    _blocks_returned_counter =
593
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4
    _output_block_bytes_counter =
595
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4
    _memory_used_counter =
606
4
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4
    _common_profile->add_info_string("IsColocate",
608
4
                                     std::to_string(_parent->is_colocated_operator()));
609
4
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4
    return Status::OK();
613
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
250k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
250k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
250k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
250k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
250k
    _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
250k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
250k
    _operator_profile->add_child(_common_profile.get(), true);
557
250k
    _operator_profile->add_child(_custom_profile.get(), true);
558
250k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
250k
    if constexpr (!is_fake_shared) {
560
250k
        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
250k
        } 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
241k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
241k
            _dependency = _shared_state->create_source_dependency(
576
241k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
241k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
241k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
241k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
9.46k
        }
584
250k
    }
585
586
250k
    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
250k
    _rows_returned_counter =
591
250k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
250k
    _blocks_returned_counter =
593
250k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
250k
    _output_block_bytes_counter =
595
250k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
250k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
250k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
250k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
250k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
250k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
250k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
250k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
250k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
250k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
250k
    _memory_used_counter =
606
250k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
250k
    _common_profile->add_info_string("IsColocate",
608
250k
                                     std::to_string(_parent->is_colocated_operator()));
609
250k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
250k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
250k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
250k
    return Status::OK();
613
250k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
157
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
157
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
157
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
157
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
157
    _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
157
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
157
    _operator_profile->add_child(_common_profile.get(), true);
557
157
    _operator_profile->add_child(_custom_profile.get(), true);
558
157
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
157
    if constexpr (!is_fake_shared) {
560
157
        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
157
        } 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
157
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
157
            _dependency = _shared_state->create_source_dependency(
576
157
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
157
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
157
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
157
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
157
    }
585
586
157
    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
157
    _rows_returned_counter =
591
157
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
157
    _blocks_returned_counter =
593
157
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
157
    _output_block_bytes_counter =
595
157
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
157
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
157
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
157
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
157
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
157
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
157
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
157
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
157
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
157
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
157
    _memory_used_counter =
606
157
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
157
    _common_profile->add_info_string("IsColocate",
608
157
                                     std::to_string(_parent->is_colocated_operator()));
609
157
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
157
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
157
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
157
    return Status::OK();
613
157
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.74k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.74k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.74k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.74k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.74k
    _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
5.74k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.74k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.74k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.74k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.74k
    if constexpr (!is_fake_shared) {
560
5.74k
        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
5.74k
        } 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
5.72k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.72k
            _dependency = _shared_state->create_source_dependency(
576
5.72k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.72k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.72k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.72k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
21
        }
584
5.74k
    }
585
586
5.74k
    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
5.74k
    _rows_returned_counter =
591
5.74k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.74k
    _blocks_returned_counter =
593
5.74k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.74k
    _output_block_bytes_counter =
595
5.74k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.74k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.74k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.74k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.74k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.74k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.74k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.74k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.74k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.74k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.74k
    _memory_used_counter =
606
5.74k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.74k
    _common_profile->add_info_string("IsColocate",
608
5.74k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.74k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.74k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.74k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.74k
    return Status::OK();
613
5.74k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
9.10k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
9.10k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
9.10k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
9.10k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
9.10k
    _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
9.10k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
9.10k
    _operator_profile->add_child(_common_profile.get(), true);
557
9.10k
    _operator_profile->add_child(_custom_profile.get(), true);
558
9.10k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
9.10k
    if constexpr (!is_fake_shared) {
560
9.10k
        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
9.10k
        } 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
9.06k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
9.06k
            _dependency = _shared_state->create_source_dependency(
576
9.06k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
9.06k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
9.06k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
9.06k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
33
        }
584
9.10k
    }
585
586
9.10k
    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
9.10k
    _rows_returned_counter =
591
9.10k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
9.10k
    _blocks_returned_counter =
593
9.10k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
9.10k
    _output_block_bytes_counter =
595
9.10k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.10k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
9.10k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
9.10k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
9.10k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
9.10k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
9.10k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
9.10k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
9.10k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
9.10k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
9.10k
    _memory_used_counter =
606
9.10k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
9.10k
    _common_profile->add_info_string("IsColocate",
608
9.10k
                                     std::to_string(_parent->is_colocated_operator()));
609
9.10k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
9.10k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
9.10k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
9.10k
    return Status::OK();
613
9.10k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
104k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
104k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
104k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
104k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
104k
    _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
104k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
104k
    _operator_profile->add_child(_common_profile.get(), true);
557
104k
    _operator_profile->add_child(_custom_profile.get(), true);
558
104k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
104k
    if constexpr (!is_fake_shared) {
560
104k
        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
104k
        } 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
102k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
102k
            _dependency = _shared_state->create_source_dependency(
576
102k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
102k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
102k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
102k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.63k
        }
584
104k
    }
585
586
104k
    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
104k
    _rows_returned_counter =
591
104k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
104k
    _blocks_returned_counter =
593
104k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
104k
    _output_block_bytes_counter =
595
104k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
104k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
104k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
104k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
104k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
104k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
104k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
104k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
104k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
104k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
104k
    _memory_used_counter =
606
104k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
104k
    _common_profile->add_info_string("IsColocate",
608
104k
                                     std::to_string(_parent->is_colocated_operator()));
609
104k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
104k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
104k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
104k
    return Status::OK();
613
104k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
87.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
87.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
87.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
87.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
87.3k
    _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
87.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
87.3k
    _operator_profile->add_child(_common_profile.get(), true);
557
87.3k
    _operator_profile->add_child(_custom_profile.get(), true);
558
87.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
87.3k
    if constexpr (!is_fake_shared) {
560
87.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
87.1k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
87.1k
                                    .first.get()
563
87.1k
                                    ->template cast<SharedStateArg>();
564
565
87.1k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
87.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
87.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
87.1k
        } 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
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
233
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
233
        }
584
87.3k
    }
585
586
87.3k
    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
87.3k
    _rows_returned_counter =
591
87.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
87.3k
    _blocks_returned_counter =
593
87.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
87.3k
    _output_block_bytes_counter =
595
87.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
87.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
87.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
87.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
87.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
87.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
87.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
87.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
87.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
87.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
87.3k
    _memory_used_counter =
606
87.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
87.3k
    _common_profile->add_info_string("IsColocate",
608
87.3k
                                     std::to_string(_parent->is_colocated_operator()));
609
87.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
87.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
87.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
87.3k
    return Status::OK();
613
87.3k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
111
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
111
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
111
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
111
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
111
    _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
111
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
111
    _operator_profile->add_child(_common_profile.get(), true);
557
111
    _operator_profile->add_child(_custom_profile.get(), true);
558
111
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
111
    if constexpr (!is_fake_shared) {
560
111
        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
111
        } 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
111
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
111
            _dependency = _shared_state->create_source_dependency(
576
111
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
111
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
111
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
111
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
111
    }
585
586
111
    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
111
    _rows_returned_counter =
591
111
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
111
    _blocks_returned_counter =
593
111
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
111
    _output_block_bytes_counter =
595
111
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
111
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
111
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
111
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
111
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
111
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
111
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
111
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
111
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
111
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
111
    _memory_used_counter =
606
111
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
111
    _common_profile->add_info_string("IsColocate",
608
111
                                     std::to_string(_parent->is_colocated_operator()));
609
111
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
111
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
111
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
111
    return Status::OK();
613
111
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
923k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
923k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
923k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
923k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
923k
    _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
923k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
923k
    _operator_profile->add_child(_common_profile.get(), true);
557
923k
    _operator_profile->add_child(_custom_profile.get(), true);
558
923k
    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
923k
    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
923k
    _rows_returned_counter =
591
923k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
923k
    _blocks_returned_counter =
593
923k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
923k
    _output_block_bytes_counter =
595
923k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
923k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
923k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
923k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
923k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
923k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
923k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
923k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
923k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
923k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
923k
    _memory_used_counter =
606
923k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
923k
    _common_profile->add_info_string("IsColocate",
608
923k
                                     std::to_string(_parent->is_colocated_operator()));
609
923k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
923k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
923k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
923k
    return Status::OK();
613
923k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
55.9k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
55.9k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
55.9k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
55.9k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
55.9k
    _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
55.9k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
55.9k
    _operator_profile->add_child(_common_profile.get(), true);
557
55.9k
    _operator_profile->add_child(_custom_profile.get(), true);
558
55.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
55.9k
    if constexpr (!is_fake_shared) {
560
55.9k
        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
55.9k
        } 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
4.19k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.19k
            _dependency = _shared_state->create_source_dependency(
576
4.19k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.19k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.19k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.7k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.7k
        }
584
55.9k
    }
585
586
55.9k
    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
55.9k
    _rows_returned_counter =
591
55.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
55.9k
    _blocks_returned_counter =
593
55.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
55.9k
    _output_block_bytes_counter =
595
55.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
55.9k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
55.9k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
55.9k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
55.9k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
55.9k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
55.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
55.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
55.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
55.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
55.9k
    _memory_used_counter =
606
55.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
55.9k
    _common_profile->add_info_string("IsColocate",
608
55.9k
                                     std::to_string(_parent->is_colocated_operator()));
609
55.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
55.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
55.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
55.9k
    return Status::OK();
613
55.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _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
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        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
26
        } 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
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    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
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4.78k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.78k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.78k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.78k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.78k
    _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
4.78k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.78k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.78k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.78k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.78k
    if constexpr (!is_fake_shared) {
560
4.78k
        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
4.78k
        } 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
4.76k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.76k
            _dependency = _shared_state->create_source_dependency(
576
4.76k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.76k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.76k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.76k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
13
        }
584
4.78k
    }
585
586
4.78k
    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
4.78k
    _rows_returned_counter =
591
4.78k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.78k
    _blocks_returned_counter =
593
4.78k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.78k
    _output_block_bytes_counter =
595
4.78k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.78k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.78k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.78k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.78k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.78k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.78k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.78k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.78k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.78k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.78k
    _memory_used_counter =
606
4.78k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.78k
    _common_profile->add_info_string("IsColocate",
608
4.78k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.78k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.78k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.78k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.78k
    return Status::OK();
613
4.78k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
454
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
454
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
454
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
454
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
454
    _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
454
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
454
    _operator_profile->add_child(_common_profile.get(), true);
557
454
    _operator_profile->add_child(_custom_profile.get(), true);
558
454
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
454
    if constexpr (!is_fake_shared) {
560
454
        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
456
        } 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
456
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
456
            _dependency = _shared_state->create_source_dependency(
576
456
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
456
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
456
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
18.4E
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18.4E
        }
584
454
    }
585
586
454
    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
454
    _rows_returned_counter =
591
454
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
454
    _blocks_returned_counter =
593
454
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
454
    _output_block_bytes_counter =
595
454
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
454
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
454
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
454
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
454
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
454
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
454
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
454
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
454
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
454
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
454
    _memory_used_counter =
606
454
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
454
    _common_profile->add_info_string("IsColocate",
608
454
                                     std::to_string(_parent->is_colocated_operator()));
609
454
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
454
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
454
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
454
    return Status::OK();
613
454
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.18k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.18k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.18k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.18k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.18k
    _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
5.18k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.18k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.18k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.18k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.18k
    if constexpr (!is_fake_shared) {
560
5.18k
        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
5.18k
        } 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
5.13k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.13k
            _dependency = _shared_state->create_source_dependency(
576
5.13k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.13k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.13k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.13k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
54
        }
584
5.18k
    }
585
586
5.18k
    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
5.18k
    _rows_returned_counter =
591
5.18k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.18k
    _blocks_returned_counter =
593
5.18k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.18k
    _output_block_bytes_counter =
595
5.18k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.18k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.18k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.18k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.18k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.18k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.18k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.18k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.18k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.18k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.18k
    _memory_used_counter =
606
5.18k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.18k
    _common_profile->add_info_string("IsColocate",
608
5.18k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.18k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.18k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.18k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.18k
    return Status::OK();
613
5.18k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
699k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
699k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
699k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
699k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
699k
    _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
699k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
699k
    _operator_profile->add_child(_common_profile.get(), true);
557
699k
    _operator_profile->add_child(_custom_profile.get(), true);
558
699k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
699k
    if constexpr (!is_fake_shared) {
560
699k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
690k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
690k
                                    .first.get()
563
690k
                                    ->template cast<SharedStateArg>();
564
565
690k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
690k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
690k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
690k
        } 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
8.45k
        } else {
580
8.45k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
8.45k
                DCHECK(false);
582
8.45k
            }
583
8.45k
        }
584
699k
    }
585
586
699k
    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
699k
    _rows_returned_counter =
591
699k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
699k
    _blocks_returned_counter =
593
699k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
699k
    _output_block_bytes_counter =
595
699k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
699k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
699k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
699k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
699k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
699k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
699k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
699k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
699k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
699k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
699k
    _memory_used_counter =
606
699k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
699k
    _common_profile->add_info_string("IsColocate",
608
699k
                                     std::to_string(_parent->is_colocated_operator()));
609
699k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
699k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
699k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
699k
    return Status::OK();
613
699k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
169
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
169
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
169
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
169
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
169
    _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
169
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
169
    _operator_profile->add_child(_common_profile.get(), true);
557
169
    _operator_profile->add_child(_custom_profile.get(), true);
558
169
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
169
    if constexpr (!is_fake_shared) {
560
169
        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
169
        } 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
169
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
169
            _dependency = _shared_state->create_source_dependency(
576
169
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
169
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
169
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
169
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
169
    }
585
586
169
    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
169
    _rows_returned_counter =
591
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
169
    _blocks_returned_counter =
593
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
169
    _output_block_bytes_counter =
595
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
169
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
169
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
169
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
169
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
169
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
169
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
169
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
169
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
169
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
169
    _memory_used_counter =
606
169
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
169
    _common_profile->add_info_string("IsColocate",
608
169
                                     std::to_string(_parent->is_colocated_operator()));
609
169
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
169
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
169
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
169
    return Status::OK();
613
169
}
614
615
template <typename SharedStateArg>
616
2.22M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.22M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.54M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
314k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
314k
    }
621
2.22M
    if (_parent->has_projection()) {
622
396k
        const auto& projection = *_parent->_projection;
623
396k
        _projections.resize(projection.projections.size());
624
2.47M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.08M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.08M
        }
627
396k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
419k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
23.5k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
425k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
402k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
402k
                        state, _intermediate_projections[i][j]));
633
402k
            }
634
23.5k
        }
635
396k
    }
636
2.22M
    return Status::OK();
637
2.22M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
71.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
71.0k
    _conjuncts.resize(_parent->_conjuncts.size());
618
72.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.83k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.83k
    }
621
71.0k
    if (_parent->has_projection()) {
622
71.0k
        const auto& projection = *_parent->_projection;
623
71.0k
        _projections.resize(projection.projections.size());
624
395k
        for (size_t i = 0; i < _projections.size(); i++) {
625
324k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
324k
        }
627
71.0k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
82.3k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
11.2k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
352k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
341k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
341k
                        state, _intermediate_projections[i][j]));
633
341k
            }
634
11.2k
        }
635
71.0k
    }
636
71.0k
    return Status::OK();
637
71.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6
    _conjuncts.resize(_parent->_conjuncts.size());
618
6
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
6
    if (_parent->has_projection()) {
622
3
        const auto& projection = *_parent->_projection;
623
3
        _projections.resize(projection.projections.size());
624
9
        for (size_t i = 0; i < _projections.size(); i++) {
625
6
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
6
        }
627
3
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
3
        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
3
    }
636
6
    return Status::OK();
637
6
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
252k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
252k
    _conjuncts.resize(_parent->_conjuncts.size());
618
252k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
252k
    if (_parent->has_projection()) {
622
134
        const auto& projection = *_parent->_projection;
623
134
        _projections.resize(projection.projections.size());
624
624
        for (size_t i = 0; i < _projections.size(); i++) {
625
490
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
490
        }
627
134
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
134
        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
134
    }
636
252k
    return Status::OK();
637
252k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
148
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
148
    _conjuncts.resize(_parent->_conjuncts.size());
618
148
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
148
    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
148
    return Status::OK();
637
148
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.76k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.76k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.79k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
38
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
38
    }
621
5.76k
    if (_parent->has_projection()) {
622
5.76k
        const auto& projection = *_parent->_projection;
623
5.76k
        _projections.resize(projection.projections.size());
624
24.0k
        for (size_t i = 0; i < _projections.size(); i++) {
625
18.2k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
18.2k
        }
627
5.76k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.78k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
24
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
191
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
167
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
167
                        state, _intermediate_projections[i][j]));
633
167
            }
634
24
        }
635
5.76k
    }
636
5.76k
    return Status::OK();
637
5.76k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.11k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.11k
    _conjuncts.resize(_parent->_conjuncts.size());
618
9.83k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
724
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
724
    }
621
9.11k
    if (_parent->has_projection()) {
622
4.73k
        const auto& projection = *_parent->_projection;
623
4.73k
        _projections.resize(projection.projections.size());
624
19.8k
        for (size_t i = 0; i < _projections.size(); i++) {
625
15.1k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
15.1k
        }
627
4.73k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.81k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
85
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
637
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
552
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
552
                        state, _intermediate_projections[i][j]));
633
552
            }
634
85
        }
635
4.73k
    }
636
9.11k
    return Status::OK();
637
9.11k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
104k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
104k
    _conjuncts.resize(_parent->_conjuncts.size());
618
105k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.11k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.11k
    }
621
104k
    if (_parent->has_projection()) {
622
32.6k
        const auto& projection = *_parent->_projection;
623
32.6k
        _projections.resize(projection.projections.size());
624
293k
        for (size_t i = 0; i < _projections.size(); i++) {
625
260k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
260k
        }
627
32.6k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
33.4k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
754
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.75k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.99k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.99k
                        state, _intermediate_projections[i][j]));
633
3.99k
            }
634
754
        }
635
32.6k
    }
636
104k
    return Status::OK();
637
104k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
87.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
87.4k
    _conjuncts.resize(_parent->_conjuncts.size());
618
87.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
40
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
40
    }
621
87.4k
    if (_parent->has_projection()) {
622
306
        const auto& projection = *_parent->_projection;
623
306
        _projections.resize(projection.projections.size());
624
1.27k
        for (size_t i = 0; i < _projections.size(); i++) {
625
968
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
968
        }
627
306
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
307
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
1
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3
                        state, _intermediate_projections[i][j]));
633
3
            }
634
1
        }
635
306
    }
636
87.4k
    return Status::OK();
637
87.4k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
115
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
115
    _conjuncts.resize(_parent->_conjuncts.size());
618
115
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
115
    if (_parent->has_projection()) {
622
3
        const auto& projection = *_parent->_projection;
623
3
        _projections.resize(projection.projections.size());
624
11
        for (size_t i = 0; i < _projections.size(); i++) {
625
8
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
8
        }
627
3
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
3
        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
3
    }
636
115
    return Status::OK();
637
115
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
928k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
928k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.23M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
310k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
310k
    }
621
928k
    if (_parent->has_projection()) {
622
269k
        const auto& projection = *_parent->_projection;
623
269k
        _projections.resize(projection.projections.size());
624
1.62M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.35M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.35M
        }
627
269k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
280k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
11.3k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
65.5k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
54.1k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
54.1k
                        state, _intermediate_projections[i][j]));
633
54.1k
            }
634
11.3k
        }
635
269k
    }
636
928k
    return Status::OK();
637
928k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.2k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
56.2k
    if (_parent->has_projection()) {
622
11.9k
        const auto& projection = *_parent->_projection;
623
11.9k
        _projections.resize(projection.projections.size());
624
115k
        for (size_t i = 0; i < _projections.size(); i++) {
625
103k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
103k
        }
627
11.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.0k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
103
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
2.06k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.96k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.96k
                        state, _intermediate_projections[i][j]));
633
1.96k
            }
634
103
        }
635
11.9k
    }
636
56.2k
    return Status::OK();
637
56.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
25
    _conjuncts.resize(_parent->_conjuncts.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    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
25
    return Status::OK();
637
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
4.77k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.77k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.25k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
480
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
480
    }
621
4.77k
    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
4.77k
    return Status::OK();
637
4.77k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
456
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
456
    _conjuncts.resize(_parent->_conjuncts.size());
618
456
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
456
    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
456
    return Status::OK();
637
456
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.19k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.19k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.19k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
5.19k
    if (_parent->has_projection()) {
622
147
        const auto& projection = *_parent->_projection;
623
147
        _projections.resize(projection.projections.size());
624
403
        for (size_t i = 0; i < _projections.size(); i++) {
625
256
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
256
        }
627
147
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
147
        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
147
    }
636
5.19k
    return Status::OK();
637
5.19k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
702k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
702k
    _conjuncts.resize(_parent->_conjuncts.size());
618
702k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
702k
    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
702k
    return Status::OK();
637
702k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
8.96k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
8.96k
    if (_terminated) {
642
2
        return Status::OK();
643
2
    }
644
8.96k
    _terminated = true;
645
8.96k
    return Status::OK();
646
8.96k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
420
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
420
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
420
    _terminated = true;
645
420
    return Status::OK();
646
420
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
29
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
29
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
29
    _terminated = true;
645
29
    return Status::OK();
646
29
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
61
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
61
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
61
    _terminated = true;
645
61
    return Status::OK();
646
61
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
15
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
15
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
15
    _terminated = true;
645
15
    return Status::OK();
646
15
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
7.22k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.22k
    if (_terminated) {
642
1
        return Status::OK();
643
1
    }
644
7.22k
    _terminated = true;
645
7.22k
    return Status::OK();
646
7.22k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
55
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
55
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
55
    _terminated = true;
645
55
    return Status::OK();
646
55
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
3
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
3
    _terminated = true;
645
3
    return Status::OK();
646
3
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.12k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.12k
    if (_terminated) {
642
1
        return Status::OK();
643
1
    }
644
1.12k
    _terminated = true;
645
1.12k
    return Status::OK();
646
1.12k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
32
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
32
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
32
    _terminated = true;
645
32
    return Status::OK();
646
32
}
647
648
template <typename SharedStateArg>
649
2.50M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.50M
    if (_closed) {
651
274k
        return Status::OK();
652
274k
    }
653
2.22M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.29M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.29M
    }
656
2.22M
    _closed = true;
657
2.22M
    return Status::OK();
658
2.50M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
70.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
70.9k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
70.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
70.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
70.9k
    }
656
70.9k
    _closed = true;
657
70.9k
    return Status::OK();
658
70.9k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
7
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
7
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
7
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
7
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
7
    }
656
7
    _closed = true;
657
7
    return Status::OK();
658
7
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
499k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
499k
    if (_closed) {
651
251k
        return Status::OK();
652
251k
    }
653
248k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
248k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
248k
    }
656
248k
    _closed = true;
657
248k
    return Status::OK();
658
499k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
157
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
157
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
157
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
157
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
157
    }
656
157
    _closed = true;
657
157
    return Status::OK();
658
157
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.74k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.74k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.74k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.74k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.74k
    }
656
5.74k
    _closed = true;
657
5.74k
    return Status::OK();
658
5.74k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
9.03k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
9.03k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
9.03k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
9.03k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
9.03k
    }
656
9.03k
    _closed = true;
657
9.03k
    return Status::OK();
658
9.03k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
104k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
104k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
104k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
104k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
104k
    }
656
104k
    _closed = true;
657
104k
    return Status::OK();
658
104k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
86.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
86.9k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
86.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
86.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
86.9k
    }
656
86.9k
    _closed = true;
657
86.9k
    return Status::OK();
658
86.9k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
110
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
110
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
110
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
110
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
110
    }
656
110
    _closed = true;
657
110
    return Status::OK();
658
110
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
946k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
946k
    if (_closed) {
651
17.3k
        return Status::OK();
652
17.3k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
928k
    _closed = true;
657
928k
    return Status::OK();
658
946k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56.2k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56.2k
    }
656
56.2k
    _closed = true;
657
56.2k
    return Status::OK();
658
56.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4.74k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.74k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.74k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.74k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.74k
    }
656
4.74k
    _closed = true;
657
4.74k
    return Status::OK();
658
4.74k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
707
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
707
    if (_closed) {
651
353
        return Status::OK();
652
353
    }
653
354
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
354
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
354
    }
656
354
    _closed = true;
657
354
    return Status::OK();
658
707
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.6k
    if (_closed) {
651
5.50k
        return Status::OK();
652
5.50k
    }
653
5.18k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.18k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.18k
    }
656
5.18k
    _closed = true;
657
5.18k
    return Status::OK();
658
10.6k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
704k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
704k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
704k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
704k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
704k
    }
656
704k
    _closed = true;
657
704k
    return Status::OK();
658
704k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
339
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
339
    if (_closed) {
651
179
        return Status::OK();
652
179
    }
653
160
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
160
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
160
    }
656
160
    _closed = true;
657
160
    return Status::OK();
658
339
}
659
660
template <typename SharedState>
661
1.86M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.86M
    _operator_profile =
664
1.86M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.86M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.86M
    _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.86M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.86M
    _operator_profile->add_child(_common_profile, true);
673
1.86M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.86M
    _operator_profile->set_metadata(_parent->node_id());
676
1.86M
    _wait_for_finish_dependency_timer =
677
1.86M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.86M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.86M
    if constexpr (!is_fake_shared) {
680
1.29M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.29M
            info.shared_state_map.end()) {
682
331k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
229k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
229k
            }
685
331k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
331k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
331k
                                                  ? 0
688
331k
                                                  : info.task_idx]
689
331k
                                  .get();
690
331k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
966k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
966k
            _shared_state = info.shared_state->template cast<SharedState>();
696
966k
            _dependency = _shared_state->create_sink_dependency(
697
966k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
966k
        }
699
1.29M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.29M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.29M
    }
702
703
1.86M
    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.86M
    _rows_input_counter =
708
1.86M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.86M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.86M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.86M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.86M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.86M
    _memory_used_counter =
714
1.86M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.86M
    _common_profile->add_info_string("IsColocate",
716
1.86M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.86M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.86M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.86M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.86M
    return Status::OK();
721
1.86M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
118k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
118k
    _operator_profile =
664
118k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
118k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
118k
    _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
118k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
118k
    _operator_profile->add_child(_common_profile, true);
673
118k
    _operator_profile->add_child(_custom_profile, true);
674
675
118k
    _operator_profile->set_metadata(_parent->node_id());
676
118k
    _wait_for_finish_dependency_timer =
677
118k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
118k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
118k
    if constexpr (!is_fake_shared) {
680
118k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
118k
            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
14.5k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
14.5k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
14.5k
                                                  ? 0
688
14.5k
                                                  : info.task_idx]
689
14.5k
                                  .get();
690
14.5k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
104k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
104k
            _shared_state = info.shared_state->template cast<SharedState>();
696
104k
            _dependency = _shared_state->create_sink_dependency(
697
104k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
104k
        }
699
118k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
118k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
118k
    }
702
703
118k
    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
118k
    _rows_input_counter =
708
118k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
118k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
118k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
118k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
118k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
118k
    _memory_used_counter =
714
118k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
118k
    _common_profile->add_info_string("IsColocate",
716
118k
                                     std::to_string(_parent->is_colocated_operator()));
717
118k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
118k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
118k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
118k
    return Status::OK();
721
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5
    _operator_profile =
664
5
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5
    _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
5
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5
    _operator_profile->add_child(_common_profile, true);
673
5
    _operator_profile->add_child(_custom_profile, true);
674
675
5
    _operator_profile->set_metadata(_parent->node_id());
676
5
    _wait_for_finish_dependency_timer =
677
5
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5
    if constexpr (!is_fake_shared) {
680
5
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5
            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
5
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5
            _shared_state = info.shared_state->template cast<SharedState>();
696
5
            _dependency = _shared_state->create_sink_dependency(
697
5
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5
        }
699
5
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5
    }
702
703
5
    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
5
    _rows_input_counter =
708
5
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5
    _memory_used_counter =
714
5
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5
    _common_profile->add_info_string("IsColocate",
716
5
                                     std::to_string(_parent->is_colocated_operator()));
717
5
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5
    return Status::OK();
721
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
251k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
251k
    _operator_profile =
664
251k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
251k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
251k
    _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
251k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
251k
    _operator_profile->add_child(_common_profile, true);
673
251k
    _operator_profile->add_child(_custom_profile, true);
674
675
251k
    _operator_profile->set_metadata(_parent->node_id());
676
251k
    _wait_for_finish_dependency_timer =
677
251k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
251k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
251k
    if constexpr (!is_fake_shared) {
680
251k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
251k
            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
251k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
251k
            _shared_state = info.shared_state->template cast<SharedState>();
696
251k
            _dependency = _shared_state->create_sink_dependency(
697
251k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
251k
        }
699
251k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
251k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
251k
    }
702
703
251k
    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
251k
    _rows_input_counter =
708
251k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
251k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
251k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
251k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
251k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
251k
    _memory_used_counter =
714
251k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
251k
    _common_profile->add_info_string("IsColocate",
716
251k
                                     std::to_string(_parent->is_colocated_operator()));
717
251k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
251k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
251k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
251k
    return Status::OK();
721
251k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
164
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
164
    _operator_profile =
664
164
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
164
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
164
    _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
164
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
164
    _operator_profile->add_child(_common_profile, true);
673
164
    _operator_profile->add_child(_custom_profile, true);
674
675
164
    _operator_profile->set_metadata(_parent->node_id());
676
164
    _wait_for_finish_dependency_timer =
677
164
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
164
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
164
    if constexpr (!is_fake_shared) {
680
164
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
164
            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
164
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
164
            _shared_state = info.shared_state->template cast<SharedState>();
696
164
            _dependency = _shared_state->create_sink_dependency(
697
164
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
164
        }
699
164
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
164
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
164
    }
702
703
164
    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
164
    _rows_input_counter =
708
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
164
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
164
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
164
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
164
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
164
    _memory_used_counter =
714
164
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
164
    _common_profile->add_info_string("IsColocate",
716
164
                                     std::to_string(_parent->is_colocated_operator()));
717
164
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
164
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
164
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
164
    return Status::OK();
721
164
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.75k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.75k
    _operator_profile =
664
5.75k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.75k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.75k
    _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
5.75k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.75k
    _operator_profile->add_child(_common_profile, true);
673
5.75k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.75k
    _operator_profile->set_metadata(_parent->node_id());
676
5.75k
    _wait_for_finish_dependency_timer =
677
5.75k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.75k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.75k
    if constexpr (!is_fake_shared) {
680
5.75k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.75k
            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
5.75k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.75k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.75k
            _dependency = _shared_state->create_sink_dependency(
697
5.75k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.75k
        }
699
5.75k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.75k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.75k
    }
702
703
5.75k
    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
5.75k
    _rows_input_counter =
708
5.75k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.75k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.75k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.75k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.75k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.75k
    _memory_used_counter =
714
5.75k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.75k
    _common_profile->add_info_string("IsColocate",
716
5.75k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.75k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.75k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.75k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.75k
    return Status::OK();
721
5.75k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.10k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.10k
    _operator_profile =
664
9.10k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.10k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.10k
    _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
9.10k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.10k
    _operator_profile->add_child(_common_profile, true);
673
9.10k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.10k
    _operator_profile->set_metadata(_parent->node_id());
676
9.10k
    _wait_for_finish_dependency_timer =
677
9.10k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.10k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.10k
    if constexpr (!is_fake_shared) {
680
9.10k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.10k
            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
9.10k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.10k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.10k
            _dependency = _shared_state->create_sink_dependency(
697
9.10k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.10k
        }
699
9.10k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.10k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.10k
    }
702
703
9.10k
    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
9.10k
    _rows_input_counter =
708
9.10k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.10k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.10k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.10k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.10k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.10k
    _memory_used_counter =
714
9.10k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.10k
    _common_profile->add_info_string("IsColocate",
716
9.10k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.10k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.10k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.10k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.10k
    return Status::OK();
721
9.10k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
104k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
104k
    _operator_profile =
664
104k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
104k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
104k
    _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
104k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
104k
    _operator_profile->add_child(_common_profile, true);
673
104k
    _operator_profile->add_child(_custom_profile, true);
674
675
104k
    _operator_profile->set_metadata(_parent->node_id());
676
104k
    _wait_for_finish_dependency_timer =
677
104k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
104k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
104k
    if constexpr (!is_fake_shared) {
680
104k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
104k
            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
104k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
104k
            _shared_state = info.shared_state->template cast<SharedState>();
696
104k
            _dependency = _shared_state->create_sink_dependency(
697
104k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
104k
        }
699
104k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
104k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
104k
    }
702
703
104k
    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
104k
    _rows_input_counter =
708
104k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
104k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
104k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
104k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
104k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
104k
    _memory_used_counter =
714
104k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
104k
    _common_profile->add_info_string("IsColocate",
716
104k
                                     std::to_string(_parent->is_colocated_operator()));
717
104k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
104k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
104k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
104k
    return Status::OK();
721
104k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
87.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
87.2k
    _operator_profile =
664
87.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
87.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
87.2k
    _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
87.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
87.2k
    _operator_profile->add_child(_common_profile, true);
673
87.2k
    _operator_profile->add_child(_custom_profile, true);
674
675
87.2k
    _operator_profile->set_metadata(_parent->node_id());
676
87.2k
    _wait_for_finish_dependency_timer =
677
87.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
87.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
87.2k
    if constexpr (!is_fake_shared) {
680
87.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
87.2k
            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
87.2k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
87.2k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
87.2k
                                                  ? 0
688
87.2k
                                                  : info.task_idx]
689
87.2k
                                  .get();
690
87.2k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
87.2k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
34
            _shared_state = info.shared_state->template cast<SharedState>();
696
34
            _dependency = _shared_state->create_sink_dependency(
697
34
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
34
        }
699
87.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
87.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
87.2k
    }
702
703
87.2k
    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
87.2k
    _rows_input_counter =
708
87.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
87.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
87.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
87.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
87.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
87.2k
    _memory_used_counter =
714
87.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
87.2k
    _common_profile->add_info_string("IsColocate",
716
87.2k
                                     std::to_string(_parent->is_colocated_operator()));
717
87.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
87.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
87.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
87.2k
    return Status::OK();
721
87.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
121
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
121
    _operator_profile =
664
121
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
121
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
121
    _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
121
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
121
    _operator_profile->add_child(_common_profile, true);
673
121
    _operator_profile->add_child(_custom_profile, true);
674
675
121
    _operator_profile->set_metadata(_parent->node_id());
676
121
    _wait_for_finish_dependency_timer =
677
121
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
121
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
121
    if constexpr (!is_fake_shared) {
680
121
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
121
            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
121
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
121
            _shared_state = info.shared_state->template cast<SharedState>();
696
121
            _dependency = _shared_state->create_sink_dependency(
697
121
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
121
        }
699
121
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
121
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
121
    }
702
703
121
    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
121
    _rows_input_counter =
708
121
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
121
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
121
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
121
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
121
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
121
    _memory_used_counter =
714
121
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
121
    _common_profile->add_info_string("IsColocate",
716
121
                                     std::to_string(_parent->is_colocated_operator()));
717
121
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
121
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
121
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
121
    return Status::OK();
721
121
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
568k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
568k
    _operator_profile =
664
568k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
568k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
568k
    _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
568k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
568k
    _operator_profile->add_child(_common_profile, true);
673
568k
    _operator_profile->add_child(_custom_profile, true);
674
675
568k
    _operator_profile->set_metadata(_parent->node_id());
676
568k
    _wait_for_finish_dependency_timer =
677
568k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
568k
    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
568k
    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
568k
    _rows_input_counter =
708
568k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
568k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
568k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
568k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
568k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
568k
    _memory_used_counter =
714
568k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
568k
    _common_profile->add_info_string("IsColocate",
716
568k
                                     std::to_string(_parent->is_colocated_operator()));
717
568k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
568k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
568k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
568k
    return Status::OK();
721
568k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.27k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.27k
    _operator_profile =
664
9.27k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.27k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.27k
    _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
9.27k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.27k
    _operator_profile->add_child(_common_profile, true);
673
9.27k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.27k
    _operator_profile->set_metadata(_parent->node_id());
676
9.27k
    _wait_for_finish_dependency_timer =
677
9.27k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.27k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.27k
    if constexpr (!is_fake_shared) {
680
9.27k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.27k
            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
9.27k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.27k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.27k
            _dependency = _shared_state->create_sink_dependency(
697
9.27k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.27k
        }
699
9.27k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.27k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.27k
    }
702
703
9.27k
    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
9.27k
    _rows_input_counter =
708
9.27k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.27k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.27k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.27k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.27k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.27k
    _memory_used_counter =
714
9.27k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.27k
    _common_profile->add_info_string("IsColocate",
716
9.27k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.27k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.27k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.27k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.27k
    return Status::OK();
721
9.27k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
454
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
454
    _operator_profile =
664
454
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
454
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
454
    _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
454
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
454
    _operator_profile->add_child(_common_profile, true);
673
454
    _operator_profile->add_child(_custom_profile, true);
674
675
454
    _operator_profile->set_metadata(_parent->node_id());
676
454
    _wait_for_finish_dependency_timer =
677
454
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
454
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
454
    if constexpr (!is_fake_shared) {
680
454
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
454
            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
454
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
454
            _shared_state = info.shared_state->template cast<SharedState>();
696
454
            _dependency = _shared_state->create_sink_dependency(
697
454
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
454
        }
699
454
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
454
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
454
    }
702
703
454
    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
454
    _rows_input_counter =
708
454
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
454
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
454
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
454
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
454
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
454
    _memory_used_counter =
714
454
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
454
    _common_profile->add_info_string("IsColocate",
716
454
                                     std::to_string(_parent->is_colocated_operator()));
717
454
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
454
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
454
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
454
    return Status::OK();
721
454
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.94k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.94k
    _operator_profile =
664
1.94k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.94k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.94k
    _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.94k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.94k
    _operator_profile->add_child(_common_profile, true);
673
1.94k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.94k
    _operator_profile->set_metadata(_parent->node_id());
676
1.94k
    _wait_for_finish_dependency_timer =
677
1.94k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.94k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.94k
    if constexpr (!is_fake_shared) {
680
1.94k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.94k
            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
1.94k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.94k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.94k
            _dependency = _shared_state->create_sink_dependency(
697
1.94k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.94k
        }
699
1.94k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.94k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.94k
    }
702
703
1.94k
    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.94k
    _rows_input_counter =
708
1.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.94k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.94k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.94k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.94k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.94k
    _memory_used_counter =
714
1.94k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.94k
    _common_profile->add_info_string("IsColocate",
716
1.94k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.94k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.94k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.94k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.94k
    return Status::OK();
721
1.94k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.6k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.6k
    _operator_profile =
664
12.6k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.6k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.6k
    _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
12.6k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.6k
    _operator_profile->add_child(_common_profile, true);
673
12.6k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.6k
    _operator_profile->set_metadata(_parent->node_id());
676
12.6k
    _wait_for_finish_dependency_timer =
677
12.6k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.6k
    if constexpr (!is_fake_shared) {
680
12.6k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.6k
            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
12.6k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.6k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.6k
            _dependency = _shared_state->create_sink_dependency(
697
12.6k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.6k
        }
699
12.6k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.6k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.6k
    }
702
703
12.6k
    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
12.6k
    _rows_input_counter =
708
12.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.6k
    _memory_used_counter =
714
12.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.6k
    _common_profile->add_info_string("IsColocate",
716
12.6k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.6k
    return Status::OK();
721
12.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
229k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
229k
    _operator_profile =
664
229k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
229k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
229k
    _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
229k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
229k
    _operator_profile->add_child(_common_profile, true);
673
229k
    _operator_profile->add_child(_custom_profile, true);
674
675
229k
    _operator_profile->set_metadata(_parent->node_id());
676
229k
    _wait_for_finish_dependency_timer =
677
229k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
229k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
229k
    if constexpr (!is_fake_shared) {
680
229k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
229k
            info.shared_state_map.end()) {
682
229k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
229k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
229k
            }
685
229k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
229k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
229k
                                                  ? 0
688
229k
                                                  : info.task_idx]
689
229k
                                  .get();
690
229k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
229k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
229k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
229k
    }
702
703
229k
    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
229k
    _rows_input_counter =
708
229k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
229k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
229k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
229k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
229k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
229k
    _memory_used_counter =
714
229k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
229k
    _common_profile->add_info_string("IsColocate",
716
229k
                                     std::to_string(_parent->is_colocated_operator()));
717
229k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
229k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
229k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
229k
    return Status::OK();
721
229k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
466k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
466k
    _operator_profile =
664
466k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
466k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
466k
    _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
466k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
466k
    _operator_profile->add_child(_common_profile, true);
673
466k
    _operator_profile->add_child(_custom_profile, true);
674
675
466k
    _operator_profile->set_metadata(_parent->node_id());
676
466k
    _wait_for_finish_dependency_timer =
677
466k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
466k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
466k
    if constexpr (!is_fake_shared) {
680
466k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
466k
            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
466k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
466k
            _shared_state = info.shared_state->template cast<SharedState>();
696
466k
            _dependency = _shared_state->create_sink_dependency(
697
466k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
466k
        }
699
466k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
466k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
466k
    }
702
703
466k
    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
466k
    _rows_input_counter =
708
466k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
466k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
466k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
466k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
466k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
466k
    _memory_used_counter =
714
466k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
466k
    _common_profile->add_info_string("IsColocate",
716
466k
                                     std::to_string(_parent->is_colocated_operator()));
717
466k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
466k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
466k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
466k
    return Status::OK();
721
466k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
25
    _operator_profile =
664
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
25
    _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
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
25
    _operator_profile->add_child(_common_profile, true);
673
25
    _operator_profile->add_child(_custom_profile, true);
674
675
25
    _operator_profile->set_metadata(_parent->node_id());
676
25
    _wait_for_finish_dependency_timer =
677
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
25
    if constexpr (!is_fake_shared) {
680
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
25
            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
25
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
25
            _shared_state = info.shared_state->template cast<SharedState>();
696
25
            _dependency = _shared_state->create_sink_dependency(
697
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
25
        }
699
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
25
    }
702
703
25
    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
25
    _rows_input_counter =
708
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
25
    _memory_used_counter =
714
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
25
    _common_profile->add_info_string("IsColocate",
716
25
                                     std::to_string(_parent->is_colocated_operator()));
717
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
25
    return Status::OK();
721
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
338
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
338
    _operator_profile =
664
338
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
338
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
338
    _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
338
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
338
    _operator_profile->add_child(_common_profile, true);
673
338
    _operator_profile->add_child(_custom_profile, true);
674
675
338
    _operator_profile->set_metadata(_parent->node_id());
676
338
    _wait_for_finish_dependency_timer =
677
338
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
338
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
338
    if constexpr (!is_fake_shared) {
680
338
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
338
            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
338
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
338
            _shared_state = info.shared_state->template cast<SharedState>();
696
338
            _dependency = _shared_state->create_sink_dependency(
697
338
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
338
        }
699
338
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
338
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
338
    }
702
703
338
    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
338
    _rows_input_counter =
708
338
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
338
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
338
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
338
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
338
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
338
    _memory_used_counter =
714
338
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
338
    _common_profile->add_info_string("IsColocate",
716
338
                                     std::to_string(_parent->is_colocated_operator()));
717
338
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
338
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
338
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
338
    return Status::OK();
721
338
}
722
723
template <typename SharedState>
724
1.86M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.86M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.86M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.29M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.29M
    }
731
1.86M
    _closed = true;
732
1.86M
    return Status::OK();
733
1.86M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
118k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
118k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
118k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
118k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
118k
    }
731
118k
    _closed = true;
732
118k
    return Status::OK();
733
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
4
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
4
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
4
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
4
    }
731
4
    _closed = true;
732
4
    return Status::OK();
733
4
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
251k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
251k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
251k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
251k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
251k
    }
731
251k
    _closed = true;
732
251k
    return Status::OK();
733
251k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
155
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
155
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
153
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
153
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
153
    }
731
153
    _closed = true;
732
153
    return Status::OK();
733
155
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.70k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.70k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.70k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.70k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.70k
    }
731
5.70k
    _closed = true;
732
5.70k
    return Status::OK();
733
5.70k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.03k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.03k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.03k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.03k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.03k
    }
731
9.03k
    _closed = true;
732
9.03k
    return Status::OK();
733
9.03k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
103k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
103k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
103k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
103k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
103k
    }
731
103k
    _closed = true;
732
103k
    return Status::OK();
733
103k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
86.8k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
86.8k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
86.8k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
86.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
86.8k
    }
731
86.8k
    _closed = true;
732
86.8k
    return Status::OK();
733
86.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
109
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
109
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
109
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
109
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
109
    }
731
109
    _closed = true;
732
109
    return Status::OK();
733
109
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
570k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
570k
    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
570k
    _closed = true;
732
570k
    return Status::OK();
733
570k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.27k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.27k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.27k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.27k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.27k
    }
731
9.27k
    _closed = true;
732
9.27k
    return Status::OK();
733
9.27k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
353
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
353
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
353
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
353
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
353
    }
731
353
    _closed = true;
732
353
    return Status::OK();
733
353
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.96k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.96k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.96k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.96k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.96k
    }
731
1.96k
    _closed = true;
732
1.96k
    return Status::OK();
733
1.96k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.6k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.6k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.6k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.6k
    }
731
12.6k
    _closed = true;
732
12.6k
    return Status::OK();
733
12.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
230k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
230k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
230k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
230k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
230k
    }
731
230k
    _closed = true;
732
230k
    return Status::OK();
733
230k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
468k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
468k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
468k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
468k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
468k
    }
731
468k
    _closed = true;
732
468k
    return Status::OK();
733
468k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_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_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
338
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
338
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
338
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
338
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
338
    }
731
338
    _closed = true;
732
338
    return Status::OK();
733
338
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
1.36k
                                                          bool* eos) {
738
1.36k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.35k
    return pull(state, block, eos);
740
1.36k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
40
                                                          bool* eos) {
738
40
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
40
    return pull(state, block, eos);
740
40
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
1.32k
                                                          bool* eos) {
738
1.32k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.31k
    return pull(state, block, eos);
740
1.32k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
557k
                                                         bool* eos) {
745
557k
    auto& local_state = get_local_state(state);
746
557k
    if (need_more_input_data(state)) {
747
525k
        local_state._child_block->clear_column_data(
748
525k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
525k
                        .num_slots());
750
525k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
525k
                state, local_state._child_block.get(), &local_state._child_eos));
752
525k
        *eos = local_state._child_eos;
753
525k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
55.8k
            return Status::OK();
755
55.8k
        }
756
469k
        {
757
469k
            SCOPED_TIMER(local_state.exec_time_counter());
758
469k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
469k
        }
760
469k
    }
761
762
501k
    if (!need_more_input_data(state)) {
763
473k
        SCOPED_TIMER(local_state.exec_time_counter());
764
473k
        bool new_eos = false;
765
473k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
473k
        if (new_eos) {
767
397k
            *eos = true;
768
397k
        } else if (!need_more_input_data(state)) {
769
24.8k
            *eos = false;
770
24.8k
        }
771
473k
    }
772
501k
    return Status::OK();
773
501k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
137k
                                                         bool* eos) {
745
137k
    auto& local_state = get_local_state(state);
746
137k
    if (need_more_input_data(state)) {
747
117k
        local_state._child_block->clear_column_data(
748
117k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
117k
                        .num_slots());
750
117k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
117k
                state, local_state._child_block.get(), &local_state._child_eos));
752
117k
        *eos = local_state._child_eos;
753
117k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
35.3k
            return Status::OK();
755
35.3k
        }
756
82.0k
        {
757
82.0k
            SCOPED_TIMER(local_state.exec_time_counter());
758
82.0k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
82.0k
        }
760
82.0k
    }
761
762
102k
    if (!need_more_input_data(state)) {
763
102k
        SCOPED_TIMER(local_state.exec_time_counter());
764
102k
        bool new_eos = false;
765
102k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
102k
        if (new_eos) {
767
46.6k
            *eos = true;
768
55.4k
        } else if (!need_more_input_data(state)) {
769
11.8k
            *eos = false;
770
11.8k
        }
771
102k
    }
772
102k
    return Status::OK();
773
102k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.27k
                                                         bool* eos) {
745
4.27k
    auto& local_state = get_local_state(state);
746
4.27k
    if (need_more_input_data(state)) {
747
2.34k
        local_state._child_block->clear_column_data(
748
2.34k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.34k
                        .num_slots());
750
2.34k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.34k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.34k
        *eos = local_state._child_eos;
753
2.34k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
434
            return Status::OK();
755
434
        }
756
1.91k
        {
757
1.91k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.91k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.91k
        }
760
1.91k
    }
761
762
3.85k
    if (!need_more_input_data(state)) {
763
3.85k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.85k
        bool new_eos = false;
765
3.85k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.85k
        if (new_eos) {
767
1.36k
            *eos = true;
768
2.48k
        } else if (!need_more_input_data(state)) {
769
1.91k
            *eos = false;
770
1.91k
        }
771
3.85k
    }
772
3.84k
    return Status::OK();
773
3.84k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.96k
                                                         bool* eos) {
745
1.96k
    auto& local_state = get_local_state(state);
746
1.96k
    if (need_more_input_data(state)) {
747
1.96k
        local_state._child_block->clear_column_data(
748
1.96k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.96k
                        .num_slots());
750
1.96k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.96k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.96k
        *eos = local_state._child_eos;
753
1.96k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
779
            return Status::OK();
755
779
        }
756
1.18k
        {
757
1.18k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.18k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.18k
        }
760
1.18k
    }
761
762
1.18k
    if (!need_more_input_data(state)) {
763
1.18k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.18k
        bool new_eos = false;
765
1.18k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.18k
        if (new_eos) {
767
797
            *eos = true;
768
797
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.18k
    }
772
1.18k
    return Status::OK();
773
1.18k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
16.9k
                                                         bool* eos) {
745
16.9k
    auto& local_state = get_local_state(state);
746
16.9k
    if (need_more_input_data(state)) {
747
16.9k
        local_state._child_block->clear_column_data(
748
16.9k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
16.9k
                        .num_slots());
750
16.9k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
16.9k
                state, local_state._child_block.get(), &local_state._child_eos));
752
16.9k
        *eos = local_state._child_eos;
753
16.9k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.24k
            return Status::OK();
755
3.24k
        }
756
13.7k
        {
757
13.7k
            SCOPED_TIMER(local_state.exec_time_counter());
758
13.7k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
13.7k
        }
760
13.7k
    }
761
762
13.7k
    if (!need_more_input_data(state)) {
763
8.06k
        SCOPED_TIMER(local_state.exec_time_counter());
764
8.06k
        bool new_eos = false;
765
8.06k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
8.06k
        if (new_eos) {
767
7.88k
            *eos = true;
768
7.88k
        } else if (!need_more_input_data(state)) {
769
8
            *eos = false;
770
8
        }
771
8.06k
    }
772
13.7k
    return Status::OK();
773
13.7k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
366k
                                                         bool* eos) {
745
366k
    auto& local_state = get_local_state(state);
746
367k
    if (need_more_input_data(state)) {
747
367k
        local_state._child_block->clear_column_data(
748
367k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
367k
                        .num_slots());
750
367k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
367k
                state, local_state._child_block.get(), &local_state._child_eos));
752
367k
        *eos = local_state._child_eos;
753
367k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
14.7k
            return Status::OK();
755
14.7k
        }
756
352k
        {
757
352k
            SCOPED_TIMER(local_state.exec_time_counter());
758
352k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
352k
        }
760
352k
    }
761
762
351k
    if (!need_more_input_data(state)) {
763
330k
        SCOPED_TIMER(local_state.exec_time_counter());
764
330k
        bool new_eos = false;
765
330k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
330k
        if (new_eos) {
767
329k
            *eos = true;
768
329k
        } else if (!need_more_input_data(state)) {
769
7
            *eos = false;
770
7
        }
771
330k
    }
772
351k
    return Status::OK();
773
351k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
20.3k
                                                         bool* eos) {
745
20.3k
    auto& local_state = get_local_state(state);
746
20.3k
    if (need_more_input_data(state)) {
747
9.70k
        local_state._child_block->clear_column_data(
748
9.70k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.70k
                        .num_slots());
750
9.70k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.70k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.70k
        *eos = local_state._child_eos;
753
9.70k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
445
            return Status::OK();
755
445
        }
756
9.25k
        {
757
9.25k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.25k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.25k
        }
760
9.25k
    }
761
762
19.9k
    if (!need_more_input_data(state)) {
763
19.3k
        SCOPED_TIMER(local_state.exec_time_counter());
764
19.3k
        bool new_eos = false;
765
19.3k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
19.3k
        if (new_eos) {
767
5.71k
            *eos = true;
768
13.6k
        } else if (!need_more_input_data(state)) {
769
10.6k
            *eos = false;
770
10.6k
        }
771
19.3k
    }
772
19.9k
    return Status::OK();
773
19.9k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
9.49k
                                                         bool* eos) {
745
9.49k
    auto& local_state = get_local_state(state);
746
9.49k
    if (need_more_input_data(state)) {
747
9.14k
        local_state._child_block->clear_column_data(
748
9.14k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.14k
                        .num_slots());
750
9.14k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.14k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.14k
        *eos = local_state._child_eos;
753
9.14k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
885
            return Status::OK();
755
885
        }
756
8.25k
        {
757
8.25k
            SCOPED_TIMER(local_state.exec_time_counter());
758
8.25k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
8.25k
        }
760
8.25k
    }
761
762
8.61k
    if (!need_more_input_data(state)) {
763
8.61k
        SCOPED_TIMER(local_state.exec_time_counter());
764
8.61k
        bool new_eos = false;
765
8.61k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
8.61k
        if (new_eos) {
767
6.11k
            *eos = true;
768
6.11k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
8.61k
    }
772
8.60k
    return Status::OK();
773
8.60k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
49.4k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.4k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.4k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.4k
                                                         "AsyncWriterDependency", true);
781
49.4k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.4k
                             _finish_dependency));
783
784
49.4k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.4k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.4k
    return Status::OK();
787
49.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
370
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
370
    RETURN_IF_ERROR(Base::init(state, info));
779
370
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
370
                                                         "AsyncWriterDependency", true);
781
370
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
370
                             _finish_dependency));
783
784
370
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
370
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
370
    return Status::OK();
787
370
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
49.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.0k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.0k
                                                         "AsyncWriterDependency", true);
781
49.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.0k
                             _finish_dependency));
783
784
49.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.0k
    return Status::OK();
787
49.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
8
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
8
    RETURN_IF_ERROR(Base::init(state, info));
779
8
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
8
                                                         "AsyncWriterDependency", true);
781
8
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
8
                             _finish_dependency));
783
784
8
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
8
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
8
    return Status::OK();
787
8
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_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
}
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
50.1k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.1k
    RETURN_IF_ERROR(Base::open(state));
793
50.1k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
390k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
340k
        RETURN_IF_ERROR(
796
340k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
340k
    }
798
50.1k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.1k
    return Status::OK();
800
50.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
370
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
370
    RETURN_IF_ERROR(Base::open(state));
793
370
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.86k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.49k
        RETURN_IF_ERROR(
796
1.49k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.49k
    }
798
370
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
370
    return Status::OK();
800
370
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
49.8k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
49.8k
    RETURN_IF_ERROR(Base::open(state));
793
49.8k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
388k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
338k
        RETURN_IF_ERROR(
796
338k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
338k
    }
798
49.8k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
49.8k
    return Status::OK();
800
49.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
8
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
8
    RETURN_IF_ERROR(Base::open(state));
793
8
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
144
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
136
        RETURN_IF_ERROR(
796
136
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
136
    }
798
8
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
8
    return Status::OK();
800
8
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_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
33
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
17
        RETURN_IF_ERROR(
796
17
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
17
    }
798
16
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
16
    return Status::OK();
800
16
}
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
66.0k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
66.0k
    return _writer->sink(block, eos);
806
66.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.93k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.93k
    return _writer->sink(block, eos);
806
1.93k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
64.0k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
64.0k
    return _writer->sink(block, eos);
806
64.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
8
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
8
    return _writer->sink(block, eos);
806
8
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
52
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
52
    return _writer->sink(block, eos);
806
52
}
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
50.3k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.3k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.3k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.3k
    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.3k
    if (_writer) {
818
50.3k
        Status st = _writer->get_writer_status();
819
50.3k
        if (exec_status.ok()) {
820
50.2k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.2k
                                                       : Status::Cancelled("force close"));
822
50.2k
        } else {
823
153
            _writer->force_close(exec_status);
824
153
        }
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.3k
        RETURN_IF_ERROR(st);
829
50.3k
    }
830
50.2k
    return Base::close(state, exec_status);
831
50.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
359
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
359
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
359
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
359
    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
359
    if (_writer) {
818
359
        Status st = _writer->get_writer_status();
819
359
        if (exec_status.ok()) {
820
359
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
359
                                                       : Status::Cancelled("force close"));
822
359
        } 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
359
        RETURN_IF_ERROR(st);
829
359
    }
830
359
    return Base::close(state, exec_status);
831
359
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
49.9k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
49.9k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
49.9k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
49.9k
    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
49.9k
    if (_writer) {
818
49.9k
        Status st = _writer->get_writer_status();
819
49.9k
        if (exec_status.ok()) {
820
49.8k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
49.8k
                                                       : Status::Cancelled("force close"));
822
49.8k
        } else {
823
153
            _writer->force_close(exec_status);
824
153
        }
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
49.9k
        RETURN_IF_ERROR(st);
829
49.9k
    }
830
49.9k
    return Base::close(state, exec_status);
831
49.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
8
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
8
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
8
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
8
    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
8
    if (_writer) {
818
8
        Status st = _writer->get_writer_status();
819
8
        if (exec_status.ok()) {
820
8
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
8
                                                       : Status::Cancelled("force close"));
822
8
        } 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
8
        RETURN_IF_ERROR(st);
829
8
    }
830
8
    return Base::close(state, exec_status);
831
8
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_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
}
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(PaimonTableSinkLocalState)
850
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
851
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
852
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
853
DECLARE_OPERATOR(MCTableSinkLocalState)
854
DECLARE_OPERATOR(AnalyticSinkLocalState)
855
DECLARE_OPERATOR(BlackholeSinkLocalState)
856
DECLARE_OPERATOR(SortSinkLocalState)
857
DECLARE_OPERATOR(SpillSortSinkLocalState)
858
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
859
DECLARE_OPERATOR(AggSinkLocalState)
860
DECLARE_OPERATOR(BucketedAggSinkLocalState)
861
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
862
DECLARE_OPERATOR(ExchangeSinkLocalState)
863
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
864
DECLARE_OPERATOR(UnionSinkLocalState)
865
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
866
DECLARE_OPERATOR(PartitionSortSinkLocalState)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
868
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
869
DECLARE_OPERATOR(SetSinkLocalState<true>)
870
DECLARE_OPERATOR(SetSinkLocalState<false>)
871
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
872
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
873
DECLARE_OPERATOR(CacheSinkLocalState)
874
DECLARE_OPERATOR(DictSinkLocalState)
875
DECLARE_OPERATOR(RecCTESinkLocalState)
876
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
877
878
#undef DECLARE_OPERATOR
879
880
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
881
DECLARE_OPERATOR(HashJoinProbeLocalState)
882
DECLARE_OPERATOR(OlapScanLocalState)
883
DECLARE_OPERATOR(GroupCommitLocalState)
884
DECLARE_OPERATOR(JDBCScanLocalState)
885
DECLARE_OPERATOR(FileScanLocalState)
886
DECLARE_OPERATOR(AnalyticLocalState)
887
DECLARE_OPERATOR(SortLocalState)
888
DECLARE_OPERATOR(SpillSortLocalState)
889
DECLARE_OPERATOR(LocalMergeSortLocalState)
890
DECLARE_OPERATOR(AggLocalState)
891
DECLARE_OPERATOR(BucketedAggLocalState)
892
DECLARE_OPERATOR(PartitionedAggLocalState)
893
DECLARE_OPERATOR(TableFunctionLocalState)
894
DECLARE_OPERATOR(ExchangeLocalState)
895
DECLARE_OPERATOR(RepeatLocalState)
896
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
897
DECLARE_OPERATOR(AssertNumRowsLocalState)
898
DECLARE_OPERATOR(EmptySetLocalState)
899
DECLARE_OPERATOR(UnionSourceLocalState)
900
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
901
DECLARE_OPERATOR(PartitionSortSourceLocalState)
902
DECLARE_OPERATOR(SetSourceLocalState<true>)
903
DECLARE_OPERATOR(SetSourceLocalState<false>)
904
DECLARE_OPERATOR(DataGenLocalState)
905
DECLARE_OPERATOR(SchemaScanLocalState)
906
DECLARE_OPERATOR(MetaScanLocalState)
907
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
908
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
909
DECLARE_OPERATOR(CacheSourceLocalState)
910
DECLARE_OPERATOR(RecCTESourceLocalState)
911
DECLARE_OPERATOR(RecCTEScanLocalState)
912
913
#ifdef BE_TEST
914
DECLARE_OPERATOR(MockLocalState)
915
DECLARE_OPERATOR(MockScanLocalState)
916
#endif
917
#undef DECLARE_OPERATOR
918
919
template class StreamingOperatorX<AssertNumRowsLocalState>;
920
template class StreamingOperatorX<SelectLocalState>;
921
922
template class StatefulOperatorX<HashJoinProbeLocalState>;
923
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
924
template class StatefulOperatorX<RepeatLocalState>;
925
template class StatefulOperatorX<MaterializationLocalState>;
926
template class StatefulOperatorX<StreamingAggLocalState>;
927
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
928
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
929
template class StatefulOperatorX<TableFunctionLocalState>;
930
931
template class PipelineXSinkLocalState<HashJoinSharedState>;
932
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
933
template class PipelineXSinkLocalState<SortSharedState>;
934
template class PipelineXSinkLocalState<SpillSortSharedState>;
935
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
936
template class PipelineXSinkLocalState<AnalyticSharedState>;
937
template class PipelineXSinkLocalState<AggSharedState>;
938
template class PipelineXSinkLocalState<BucketedAggSharedState>;
939
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
940
template class PipelineXSinkLocalState<FakeSharedState>;
941
template class PipelineXSinkLocalState<UnionSharedState>;
942
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
943
template class PipelineXSinkLocalState<MultiCastSharedState>;
944
template class PipelineXSinkLocalState<SetSharedState>;
945
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
946
template class PipelineXSinkLocalState<BasicSharedState>;
947
template class PipelineXSinkLocalState<DataQueueSharedState>;
948
template class PipelineXSinkLocalState<RecCTESharedState>;
949
950
template class PipelineXLocalState<HashJoinSharedState>;
951
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
952
template class PipelineXLocalState<SortSharedState>;
953
template class PipelineXLocalState<SpillSortSharedState>;
954
template class PipelineXLocalState<NestedLoopJoinSharedState>;
955
template class PipelineXLocalState<AnalyticSharedState>;
956
template class PipelineXLocalState<AggSharedState>;
957
template class PipelineXLocalState<BucketedAggSharedState>;
958
template class PipelineXLocalState<PartitionedAggSharedState>;
959
template class PipelineXLocalState<FakeSharedState>;
960
template class PipelineXLocalState<UnionSharedState>;
961
template class PipelineXLocalState<DataQueueSharedState>;
962
template class PipelineXLocalState<MultiCastSharedState>;
963
template class PipelineXLocalState<PartitionSortNodeSharedState>;
964
template class PipelineXLocalState<SetSharedState>;
965
template class PipelineXLocalState<LocalExchangeSharedState>;
966
template class PipelineXLocalState<BasicSharedState>;
967
template class PipelineXLocalState<RecCTESharedState>;
968
969
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
970
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
972
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
973
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
976
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
977
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
978
979
#ifdef BE_TEST
980
template class OperatorX<DummyOperatorLocalState>;
981
template class DataSinkOperatorX<DummySinkLocalState>;
982
#endif
983
984
} // namespace doris