Coverage Report

Created: 2026-06-06 12:59

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