Coverage Report

Created: 2026-06-09 06:13

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
2.20M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
2.20M
    if (_parent->nereids_id() == -1) {
120
1.16M
        return fmt::format("(id={})", _parent->node_id());
121
1.16M
    } else {
122
1.04M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
1.04M
    }
124
2.20M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
66.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
66.2k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
66.2k
    } else {
122
66.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
66.2k
    }
124
66.2k
}
_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
251k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
251k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
251k
    } else {
122
251k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
251k
    }
124
251k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
36
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
36
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
36
    } else {
122
36
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
36
    }
124
36
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
9.88k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
9.88k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
9.88k
    } else {
122
9.88k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
9.88k
    }
124
9.88k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
6.35k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
6.35k
    if (_parent->nereids_id() == -1) {
120
11
        return fmt::format("(id={})", _parent->node_id());
121
6.34k
    } else {
122
6.34k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
6.34k
    }
124
6.35k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
150k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
150k
    if (_parent->nereids_id() == -1) {
120
29
        return fmt::format("(id={})", _parent->node_id());
121
150k
    } else {
122
150k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
150k
    }
124
150k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
279
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
279
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
279
    } else {
122
279
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
279
    }
124
279
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
186
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
186
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
186
    } else {
122
186
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
186
    }
124
186
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
887k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
887k
    if (_parent->nereids_id() == -1) {
120
389k
        return fmt::format("(id={})", _parent->node_id());
121
498k
    } else {
122
498k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
498k
    }
124
887k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
54.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
54.9k
    if (_parent->nereids_id() == -1) {
120
2
        return fmt::format("(id={})", _parent->node_id());
121
54.9k
    } else {
122
54.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
54.9k
    }
124
54.9k
}
_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.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
10.5k
    if (_parent->nereids_id() == -1) {
120
10.5k
        return fmt::format("(id={})", _parent->node_id());
121
10.5k
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
10.5k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
415
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
415
    if (_parent->nereids_id() == -1) {
120
102
        return fmt::format("(id={})", _parent->node_id());
121
313
    } else {
122
313
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
313
    }
124
415
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.92k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.92k
    if (_parent->nereids_id() == -1) {
120
13
        return fmt::format("(id={})", _parent->node_id());
121
4.91k
    } else {
122
4.91k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4.91k
    }
124
4.92k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
765k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
765k
    if (_parent->nereids_id() == -1) {
120
764k
        return fmt::format("(id={})", _parent->node_id());
121
764k
    } else {
122
1.02k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
1.02k
    }
124
765k
}
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.35M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
1.35M
    if (_parent->nereids_id() == -1) {
129
813k
        return fmt::format("(id={})", _parent->node_id());
130
813k
    } else {
131
542k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
542k
    }
133
1.35M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
114k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
114k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
114k
    } else {
131
114k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
114k
    }
133
114k
}
_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
253k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
253k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
253k
    } else {
131
253k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
253k
    }
133
253k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
44
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
44
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
44
    } else {
131
44
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
44
    }
133
44
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
9.88k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
9.88k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
9.88k
    } else {
131
9.88k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
9.88k
    }
133
9.88k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
6.38k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
6.38k
    if (_parent->nereids_id() == -1) {
129
11
        return fmt::format("(id={})", _parent->node_id());
130
6.37k
    } else {
131
6.37k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
6.37k
    }
133
6.38k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
150k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
150k
    if (_parent->nereids_id() == -1) {
129
29
        return fmt::format("(id={})", _parent->node_id());
130
150k
    } else {
131
150k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
150k
    }
133
150k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
245
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
245
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
245
    } else {
131
245
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
245
    }
133
245
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
198
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
198
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
198
    } else {
131
198
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
198
    }
133
198
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
98
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
98
    if (_parent->nereids_id() == -1) {
129
98
        return fmt::format("(id={})", _parent->node_id());
130
98
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
98
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
5.78k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
5.78k
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
5.77k
    } else {
131
5.77k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
5.77k
    }
133
5.78k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
420
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
420
    if (_parent->nereids_id() == -1) {
129
102
        return fmt::format("(id={})", _parent->node_id());
130
318
    } else {
131
318
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
318
    }
133
420
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
12.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
12.0k
    if (_parent->nereids_id() == -1) {
129
12.0k
        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
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
291k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
291k
    if (_parent->nereids_id() == -1) {
129
291k
        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
291k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
510k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
510k
    if (_parent->nereids_id() == -1) {
129
509k
        return fmt::format("(id={})", _parent->node_id());
130
509k
    } else {
131
170
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
170
    }
133
510k
}
_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.3k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
30.3k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
30.3k
    _terminated = true;
141
30.3k
    return Status::OK();
142
30.3k
}
_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.56k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1.56k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1.56k
    _terminated = true;
141
1.56k
    return Status::OK();
142
1.56k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
17
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
17
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
17
    _terminated = true;
141
17
    return Status::OK();
142
17
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1
    _terminated = true;
141
1
    return Status::OK();
142
1
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
3.21k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
3.21k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
3.21k
    _terminated = true;
141
3.21k
    return Status::OK();
142
3.21k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
582
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
582
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
582
    _terminated = true;
141
582
    return Status::OK();
142
582
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
3
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
3
    _terminated = true;
141
3
    return Status::OK();
142
3
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_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_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
609
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
609
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
609
    _terminated = true;
141
609
    return Status::OK();
142
609
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
129
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
129
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
129
    _terminated = true;
141
129
    return Status::OK();
142
129
}
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
801k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
145
801k
    return _child && _child->is_serial_operator() && !is_source()
146
801k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
147
801k
                   : DataDistribution(ExchangeType::NOOP);
148
801k
}
149
150
13.9k
bool OperatorBase::is_hash_shuffle(ExchangeType exchange_type) {
151
13.9k
    return exchange_type == ExchangeType::HASH_SHUFFLE ||
152
13.9k
           exchange_type == ExchangeType::BUCKET_HASH_SHUFFLE;
153
13.9k
}
154
155
88.3k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
156
88.3k
    if (!_child) {
157
29.7k
        return false;
158
29.7k
    }
159
58.6k
    if (_child->is_serial_operator()) {
160
43.6k
        return true;
161
43.6k
    }
162
14.9k
    const auto child_distribution = _child->required_data_distribution(state);
163
14.9k
    return child_distribution.need_local_exchange() &&
164
14.9k
           !is_hash_shuffle(child_distribution.distribution_type);
165
58.6k
}
166
167
81.6k
const RowDescriptor& OperatorBase::row_desc() const {
168
81.6k
    return _child->row_desc();
169
81.6k
}
170
171
template <typename SharedStateArg>
172
20.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
20.4k
    fmt::memory_buffer debug_string_buffer;
174
20.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
20.4k
    return fmt::to_string(debug_string_buffer);
176
20.4k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
78
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
78
    fmt::memory_buffer debug_string_buffer;
174
78
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
78
    return fmt::to_string(debug_string_buffer);
176
78
}
_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
24
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
24
    fmt::memory_buffer debug_string_buffer;
174
24
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
24
    return fmt::to_string(debug_string_buffer);
176
24
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
24
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
24
    fmt::memory_buffer debug_string_buffer;
174
24
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
24
    return fmt::to_string(debug_string_buffer);
176
24
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
19.1k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
19.1k
    fmt::memory_buffer debug_string_buffer;
174
19.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
19.1k
    return fmt::to_string(debug_string_buffer);
176
19.1k
}
_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
1.09k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
1.09k
    fmt::memory_buffer debug_string_buffer;
174
1.09k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
1.09k
    return fmt::to_string(debug_string_buffer);
176
1.09k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
template <typename SharedStateArg>
179
20.3k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
20.3k
    fmt::memory_buffer debug_string_buffer;
181
20.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
20.3k
    return fmt::to_string(debug_string_buffer);
183
20.3k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
18
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
18
    fmt::memory_buffer debug_string_buffer;
181
18
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
18
    return fmt::to_string(debug_string_buffer);
183
18
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
24
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
24
    fmt::memory_buffer debug_string_buffer;
181
24
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
24
    return fmt::to_string(debug_string_buffer);
183
24
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
24
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
24
    fmt::memory_buffer debug_string_buffer;
181
24
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
24
    return fmt::to_string(debug_string_buffer);
183
24
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
951
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
951
    fmt::memory_buffer debug_string_buffer;
181
951
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
951
    return fmt::to_string(debug_string_buffer);
183
951
}
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
135
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
135
    fmt::memory_buffer debug_string_buffer;
181
135
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
135
    return fmt::to_string(debug_string_buffer);
183
135
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
19.1k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
19.1k
    fmt::memory_buffer debug_string_buffer;
181
19.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
19.1k
    return fmt::to_string(debug_string_buffer);
183
19.1k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
184
185
20.7k
std::string OperatorXBase::debug_string(int indentation_level) const {
186
20.7k
    fmt::memory_buffer debug_string_buffer;
187
20.7k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
188
20.7k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
189
20.7k
                   _is_serial_operator);
190
20.7k
    return fmt::to_string(debug_string_buffer);
191
20.7k
}
192
193
20.4k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
194
20.4k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
195
20.4k
}
196
197
703k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
198
703k
    std::string node_name = print_plan_node_type(tnode.node_type);
199
703k
    _nereids_id = tnode.nereids_id;
200
703k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
201
3.81k
        if (!tnode.__isset.output_tuple_id) {
202
0
            return Status::InternalError("no final output tuple id");
203
0
        }
204
3.81k
        if (tnode.intermediate_output_tuple_id_list.size() !=
205
3.81k
            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.81k
    }
213
703k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
214
703k
    _op_name = substr + "_OPERATOR";
215
216
703k
    if (tnode.__isset.vconjunct) {
217
0
        return Status::InternalError("vconjunct is not supported yet");
218
703k
    } else if (tnode.__isset.conjuncts) {
219
449k
        for (const auto& conjunct : tnode.conjuncts) {
220
449k
            VExprContextSPtr context;
221
449k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
222
449k
            _conjuncts.emplace_back(context);
223
449k
        }
224
147k
    }
225
226
    // create the projections expr
227
703k
    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
703k
    if (!tnode.intermediate_projections_list.empty()) {
232
3.81k
        DCHECK(tnode.__isset.projections) << "no final projections";
233
3.81k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
234
8.08k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
235
8.08k
            VExprContextSPtrs projections;
236
8.08k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
237
8.08k
            _intermediate_projections.push_back(projections);
238
8.08k
        }
239
3.81k
    }
240
703k
    return Status::OK();
241
703k
}
242
243
736k
Status OperatorXBase::prepare(RuntimeState* state) {
244
736k
    for (auto& conjunct : _conjuncts) {
245
449k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
246
449k
    }
247
736k
    if (state->enable_adjust_conjunct_order_by_cost()) {
248
684k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
249
603k
            return a->execute_cost() < b->execute_cost();
250
603k
        });
251
684k
    };
252
253
744k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
254
8.08k
        RETURN_IF_ERROR(
255
8.08k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
256
8.08k
    }
257
736k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
258
259
736k
    if (has_output_row_desc()) {
260
318k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
261
318k
    }
262
263
736k
    for (auto& conjunct : _conjuncts) {
264
449k
        RETURN_IF_ERROR(conjunct->open(state));
265
449k
    }
266
736k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
267
736k
    for (auto& projections : _intermediate_projections) {
268
8.08k
        RETURN_IF_ERROR(VExpr::open(projections, state));
269
8.08k
    }
270
736k
    if (_child && !is_source()) {
271
134k
        RETURN_IF_ERROR(_child->prepare(state));
272
134k
    }
273
274
736k
    if (VExpr::contains_blockable_function(_conjuncts) ||
275
736k
        VExpr::contains_blockable_function(_projections)) {
276
0
        _blockable = true;
277
0
    }
278
279
736k
    return Status::OK();
280
736k
}
281
282
7.52k
Status OperatorXBase::terminate(RuntimeState* state) {
283
7.52k
    if (_child && !is_source()) {
284
1.22k
        RETURN_IF_ERROR(_child->terminate(state));
285
1.22k
    }
286
7.52k
    auto result = state->get_local_state_result(operator_id());
287
7.52k
    if (!result) {
288
0
        return result.error();
289
0
    }
290
7.52k
    return result.value()->terminate(state);
291
7.52k
}
292
293
6.16M
Status OperatorXBase::close(RuntimeState* state) {
294
6.16M
    if (_child && !is_source()) {
295
1.12M
        RETURN_IF_ERROR(_child->close(state));
296
1.12M
    }
297
6.16M
    auto result = state->get_local_state_result(operator_id());
298
6.16M
    if (!result) {
299
0
        return result.error();
300
0
    }
301
6.16M
    return result.value()->close(state);
302
6.16M
}
303
304
278k
void PipelineXLocalStateBase::clear_origin_block() {
305
278k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
306
278k
}
307
308
591k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
309
591k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
310
311
591k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
312
591k
    return Status::OK();
313
591k
}
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
278k
                                     Block* output_block) const {
322
278k
    auto* local_state = state->get_local_state(operator_id());
323
278k
    SCOPED_TIMER(local_state->exec_time_counter());
324
278k
    SCOPED_TIMER(local_state->_projection_timer);
325
278k
    const size_t rows = origin_block->rows();
326
278k
    if (rows == 0) {
327
138k
        return Status::OK();
328
138k
    }
329
139k
    Block input_block = *origin_block;
330
331
139k
    size_t bytes_usage = 0;
332
139k
    ColumnsWithTypeAndName new_columns;
333
139k
    for (const auto& projections : local_state->_intermediate_projections) {
334
1.07k
        if (projections.empty()) {
335
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
336
0
                                         node_id());
337
0
        }
338
1.07k
        new_columns.resize(projections.size());
339
7.92k
        for (int i = 0; i < projections.size(); i++) {
340
6.84k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
341
6.84k
            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
6.84k
        }
349
1.07k
        Block tmp_block {new_columns};
350
1.07k
        bytes_usage += tmp_block.allocated_bytes();
351
1.07k
        input_block.swap(tmp_block);
352
1.07k
    }
353
354
139k
    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
657k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
361
657k
        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
657k
        } else {
371
657k
            if (_keep_origin || !from->is_exclusive()) {
372
647k
                to->insert_range_from(*from, 0, rows);
373
647k
                bytes_usage += from->allocated_bytes();
374
647k
            } else {
375
10.4k
                to = from->assert_mutable();
376
10.4k
            }
377
657k
        }
378
657k
    };
379
380
139k
    auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
381
139k
            output_block, *_output_row_descriptor);
382
139k
    auto& mutable_block = scoped_mutable_block.mutable_block();
383
139k
    auto& mutable_columns = mutable_block.mutable_columns();
384
139k
    if (rows != 0) {
385
139k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
386
797k
        for (int i = 0; i < mutable_columns.size(); ++i) {
387
657k
            ColumnPtr column_ptr;
388
657k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
389
657k
            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
657k
            column_ptr = column_ptr->convert_to_full_column_if_const();
396
657k
            bytes_usage += column_ptr->allocated_bytes();
397
657k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
398
657k
        }
399
139k
        DCHECK(mutable_block.rows() == rows);
400
139k
    }
401
139k
    local_state->_estimate_memory_usage += bytes_usage;
402
403
139k
    return Status::OK();
404
139k
}
405
406
4.77M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
407
4.77M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
408
4.77M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
409
4.77M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
410
4.77M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
411
4.77M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
412
4.77M
            if (_debug_point_count++ % 2 == 0) {
413
4.77M
                return Status::OK();
414
4.77M
            }
415
4.77M
        }
416
4.77M
    });
417
418
4.77M
    Status status;
419
4.77M
    auto* local_state = state->get_local_state(operator_id());
420
4.77M
    Defer defer([&]() {
421
4.77M
        if (status.ok()) {
422
4.77M
            local_state->update_output_block_counters(*block);
423
4.77M
        }
424
4.77M
    });
425
4.77M
    if (_output_row_descriptor) {
426
278k
        local_state->clear_origin_block();
427
278k
        status = get_block(state, &local_state->_origin_block, eos);
428
278k
        if (UNLIKELY(!status.ok())) {
429
20
            return status;
430
20
        }
431
278k
        status = do_projections(state, &local_state->_origin_block, block);
432
278k
        return status;
433
278k
    }
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.13M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
440
3.13M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
441
7.54k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
442
7.54k
        *eos = true;
443
7.54k
    }
444
445
3.13M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
446
3.13M
        auto op_name = to_lower(_parent->_op_name);
447
3.13M
        auto arg_op_name = dp->param<std::string>("op_name");
448
3.13M
        arg_op_name = to_lower(arg_op_name);
449
450
3.13M
        if (op_name == arg_op_name) {
451
3.13M
            *eos = true;
452
3.13M
        }
453
3.13M
    });
454
455
3.13M
    if (auto rows = block->rows()) {
456
876k
        _num_rows_returned += rows;
457
876k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
458
876k
    }
459
3.13M
}
460
461
30.3k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
462
30.3k
    auto result = state->get_sink_local_state_result();
463
30.3k
    if (!result) {
464
0
        return result.error();
465
0
    }
466
30.3k
    return result.value()->terminate(state);
467
30.3k
}
468
469
20.6k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
470
20.6k
    fmt::memory_buffer debug_string_buffer;
471
472
20.6k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
473
20.6k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
474
20.6k
    return fmt::to_string(debug_string_buffer);
475
20.6k
}
476
477
20.3k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
478
20.3k
    return state->get_sink_local_state()->debug_string(indentation_level);
479
20.3k
}
480
481
455k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
482
455k
    std::string op_name = "UNKNOWN_SINK";
483
455k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
484
485
456k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
486
456k
        op_name = it->second;
487
456k
    }
488
455k
    _name = op_name + "_OPERATOR";
489
455k
    return Status::OK();
490
455k
}
491
492
192k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
493
192k
    std::string op_name = print_plan_node_type(tnode.node_type);
494
192k
    _nereids_id = tnode.nereids_id;
495
192k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
496
192k
    _name = substr + "_SINK_OPERATOR";
497
192k
    return Status::OK();
498
192k
}
499
500
template <typename LocalStateType>
501
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
502
2.05M
                                                            LocalSinkStateInfo& info) {
503
2.05M
    auto local_state = LocalStateType::create_unique(this, state);
504
2.05M
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.05M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.05M
    return Status::OK();
507
2.05M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
114k
                                                            LocalSinkStateInfo& info) {
503
114k
    auto local_state = LocalStateType::create_unique(this, state);
504
114k
    RETURN_IF_ERROR(local_state->init(state, info));
505
114k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
114k
    return Status::OK();
507
114k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
445k
                                                            LocalSinkStateInfo& info) {
503
445k
    auto local_state = LocalStateType::create_unique(this, state);
504
445k
    RETURN_IF_ERROR(local_state->init(state, info));
505
445k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
445k
    return Status::OK();
507
445k
}
_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
537
                                                            LocalSinkStateInfo& info) {
503
537
    auto local_state = LocalStateType::create_unique(this, state);
504
537
    RETURN_IF_ERROR(local_state->init(state, info));
505
537
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
537
    return Status::OK();
507
537
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
45.2k
                                                            LocalSinkStateInfo& info) {
503
45.2k
    auto local_state = LocalStateType::create_unique(this, state);
504
45.2k
    RETURN_IF_ERROR(local_state->init(state, info));
505
45.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
45.2k
    return Status::OK();
507
45.2k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
9.06k
                                                            LocalSinkStateInfo& info) {
503
9.06k
    auto local_state = LocalStateType::create_unique(this, state);
504
9.06k
    RETURN_IF_ERROR(local_state->init(state, info));
505
9.06k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
9.06k
    return Status::OK();
507
9.06k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
5.16k
                                                            LocalSinkStateInfo& info) {
503
5.16k
    auto local_state = LocalStateType::create_unique(this, state);
504
5.16k
    RETURN_IF_ERROR(local_state->init(state, info));
505
5.16k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
5.16k
    return Status::OK();
507
5.16k
}
_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.37k
                                                            LocalSinkStateInfo& info) {
503
6.37k
    auto local_state = LocalStateType::create_unique(this, state);
504
6.37k
    RETURN_IF_ERROR(local_state->init(state, info));
505
6.37k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
6.37k
    return Status::OK();
507
6.37k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
95
                                                            LocalSinkStateInfo& info) {
503
95
    auto local_state = LocalStateType::create_unique(this, state);
504
95
    RETURN_IF_ERROR(local_state->init(state, info));
505
95
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
95
    return Status::OK();
507
95
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
254k
                                                            LocalSinkStateInfo& info) {
503
254k
    auto local_state = LocalStateType::create_unique(this, state);
504
254k
    RETURN_IF_ERROR(local_state->init(state, info));
505
254k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
254k
    return Status::OK();
507
254k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
44
                                                            LocalSinkStateInfo& info) {
503
44
    auto local_state = LocalStateType::create_unique(this, state);
504
44
    RETURN_IF_ERROR(local_state->init(state, info));
505
44
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
44
    return Status::OK();
507
44
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
291k
                                                            LocalSinkStateInfo& info) {
503
291k
    auto local_state = LocalStateType::create_unique(this, state);
504
291k
    RETURN_IF_ERROR(local_state->init(state, info));
505
291k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
291k
    return Status::OK();
507
291k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
150k
                                                            LocalSinkStateInfo& info) {
503
150k
    auto local_state = LocalStateType::create_unique(this, state);
504
150k
    RETURN_IF_ERROR(local_state->init(state, info));
505
150k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
150k
    return Status::OK();
507
150k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
245
                                                            LocalSinkStateInfo& info) {
503
245
    auto local_state = LocalStateType::create_unique(this, state);
504
245
    RETURN_IF_ERROR(local_state->init(state, info));
505
245
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
245
    return Status::OK();
507
245
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
198
                                                            LocalSinkStateInfo& info) {
503
198
    auto local_state = LocalStateType::create_unique(this, state);
504
198
    RETURN_IF_ERROR(local_state->init(state, info));
505
198
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
198
    return Status::OK();
507
198
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
690k
                                                            LocalSinkStateInfo& info) {
503
690k
    auto local_state = LocalStateType::create_unique(this, state);
504
690k
    RETURN_IF_ERROR(local_state->init(state, info));
505
690k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
690k
    return Status::OK();
507
690k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
9.89k
                                                            LocalSinkStateInfo& info) {
503
9.89k
    auto local_state = LocalStateType::create_unique(this, state);
504
9.89k
    RETURN_IF_ERROR(local_state->init(state, info));
505
9.89k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
9.89k
    return Status::OK();
507
9.89k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
5.77k
                                                            LocalSinkStateInfo& info) {
503
5.77k
    auto local_state = LocalStateType::create_unique(this, state);
504
5.77k
    RETURN_IF_ERROR(local_state->init(state, info));
505
5.77k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
5.77k
    return Status::OK();
507
5.77k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
3.78k
                                                            LocalSinkStateInfo& info) {
503
3.78k
    auto local_state = LocalStateType::create_unique(this, state);
504
3.78k
    RETURN_IF_ERROR(local_state->init(state, info));
505
3.78k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
3.78k
    return Status::OK();
507
3.78k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
319
                                                            LocalSinkStateInfo& info) {
503
319
    auto local_state = LocalStateType::create_unique(this, state);
504
319
    RETURN_IF_ERROR(local_state->init(state, info));
505
319
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
319
    return Status::OK();
507
319
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
4.56k
                                                            LocalSinkStateInfo& info) {
503
4.56k
    auto local_state = LocalStateType::create_unique(this, state);
504
4.56k
    RETURN_IF_ERROR(local_state->init(state, info));
505
4.56k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
4.56k
    return Status::OK();
507
4.56k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.48k
                                                            LocalSinkStateInfo& info) {
503
2.48k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.48k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.48k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.48k
    return Status::OK();
507
2.48k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.41k
                                                            LocalSinkStateInfo& info) {
503
2.41k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.41k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.41k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.41k
    return Status::OK();
507
2.41k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.44k
                                                            LocalSinkStateInfo& info) {
503
2.44k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.44k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.44k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.44k
    return Status::OK();
507
2.44k
}
_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
161
                                                            LocalSinkStateInfo& info) {
503
161
    auto local_state = LocalStateType::create_unique(this, state);
504
161
    RETURN_IF_ERROR(local_state->init(state, info));
505
161
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
161
    return Status::OK();
507
161
}
_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.72M
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.72M
    } else {
518
1.72M
        auto ss = LocalStateType::SharedStateType::create_shared();
519
1.72M
        ss->id = operator_id();
520
1.72M
        for (auto& dest : dests_id()) {
521
1.71M
            ss->related_op_ids.insert(dest);
522
1.71M
        }
523
1.72M
        return ss;
524
1.72M
    }
525
1.72M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
93.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
93.1k
    } else {
518
93.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
93.1k
        ss->id = operator_id();
520
93.1k
        for (auto& dest : dests_id()) {
521
92.9k
            ss->related_op_ids.insert(dest);
522
92.9k
        }
523
93.1k
        return ss;
524
93.1k
    }
525
93.1k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
446k
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
446k
    } else {
518
446k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
446k
        ss->id = operator_id();
520
446k
        for (auto& dest : dests_id()) {
521
445k
            ss->related_op_ids.insert(dest);
522
445k
        }
523
446k
        return ss;
524
446k
    }
525
446k
}
_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
540
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
540
    } else {
518
540
        auto ss = LocalStateType::SharedStateType::create_shared();
519
540
        ss->id = operator_id();
520
540
        for (auto& dest : dests_id()) {
521
539
            ss->related_op_ids.insert(dest);
522
539
        }
523
540
        return ss;
524
540
    }
525
540
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
45.3k
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.3k
    } else {
518
45.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
45.3k
        ss->id = operator_id();
520
45.3k
        for (auto& dest : dests_id()) {
521
45.1k
            ss->related_op_ids.insert(dest);
522
45.1k
        }
523
45.3k
        return ss;
524
45.3k
    }
525
45.3k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
510
9.06k
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.06k
    } else {
518
9.06k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
9.06k
        ss->id = operator_id();
520
9.06k
        for (auto& dest : dests_id()) {
521
9.06k
            ss->related_op_ids.insert(dest);
522
9.06k
        }
523
9.06k
        return ss;
524
9.06k
    }
525
9.06k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
5.16k
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.16k
    } else {
518
5.16k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
5.16k
        ss->id = operator_id();
520
5.16k
        for (auto& dest : dests_id()) {
521
5.16k
            ss->related_op_ids.insert(dest);
522
5.16k
        }
523
5.16k
        return ss;
524
5.16k
    }
525
5.16k
}
_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.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
3.38k
    } else {
518
3.38k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
3.38k
        ss->id = operator_id();
520
3.38k
        for (auto& dest : dests_id()) {
521
3.38k
            ss->related_op_ids.insert(dest);
522
3.38k
        }
523
3.38k
        return ss;
524
3.38k
    }
525
3.38k
}
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.39k
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.39k
    } else {
518
6.39k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
6.39k
        ss->id = operator_id();
520
6.39k
        for (auto& dest : dests_id()) {
521
6.39k
            ss->related_op_ids.insert(dest);
522
6.39k
        }
523
6.39k
        return ss;
524
6.39k
    }
525
6.39k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
95
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
    } else {
518
95
        auto ss = LocalStateType::SharedStateType::create_shared();
519
95
        ss->id = operator_id();
520
95
        for (auto& dest : dests_id()) {
521
95
            ss->related_op_ids.insert(dest);
522
95
        }
523
95
        return ss;
524
95
    }
525
95
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
254k
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
254k
    } else {
518
254k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
254k
        ss->id = operator_id();
520
254k
        for (auto& dest : dests_id()) {
521
254k
            ss->related_op_ids.insert(dest);
522
254k
        }
523
254k
        return ss;
524
254k
    }
525
254k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
46
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
46
    } else {
518
46
        auto ss = LocalStateType::SharedStateType::create_shared();
519
46
        ss->id = operator_id();
520
46
        for (auto& dest : dests_id()) {
521
46
            ss->related_op_ids.insert(dest);
522
46
        }
523
46
        return ss;
524
46
    }
525
46
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
150k
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
150k
    } else {
518
150k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
150k
        ss->id = operator_id();
520
150k
        for (auto& dest : dests_id()) {
521
150k
            ss->related_op_ids.insert(dest);
522
150k
        }
523
150k
        return ss;
524
150k
    }
525
150k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
195
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
195
    } else {
518
195
        auto ss = LocalStateType::SharedStateType::create_shared();
519
195
        ss->id = operator_id();
520
196
        for (auto& dest : dests_id()) {
521
196
            ss->related_op_ids.insert(dest);
522
196
        }
523
195
        return ss;
524
195
    }
525
195
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
690k
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
690k
    } else {
518
690k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
690k
        ss->id = operator_id();
520
690k
        for (auto& dest : dests_id()) {
521
686k
            ss->related_op_ids.insert(dest);
522
686k
        }
523
690k
        return ss;
524
690k
    }
525
690k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
9.89k
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.89k
    } else {
518
9.89k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
9.89k
        ss->id = operator_id();
520
9.89k
        for (auto& dest : dests_id()) {
521
9.89k
            ss->related_op_ids.insert(dest);
522
9.89k
        }
523
9.89k
        return ss;
524
9.89k
    }
525
9.89k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
420
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
420
    } else {
518
420
        auto ss = LocalStateType::SharedStateType::create_shared();
519
420
        ss->id = operator_id();
520
420
        for (auto& dest : dests_id()) {
521
417
            ss->related_op_ids.insert(dest);
522
417
        }
523
420
        return ss;
524
420
    }
525
420
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
510
2.40k
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.40k
    } else {
518
2.40k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
2.40k
        ss->id = operator_id();
520
2.40k
        for (auto& dest : dests_id()) {
521
2.39k
            ss->related_op_ids.insert(dest);
522
2.39k
        }
523
2.40k
        return ss;
524
2.40k
    }
525
2.40k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
510
2.45k
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.45k
    } else {
518
2.45k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
2.45k
        ss->id = operator_id();
520
2.45k
        for (auto& dest : dests_id()) {
521
2.45k
            ss->related_op_ids.insert(dest);
522
2.45k
        }
523
2.45k
        return ss;
524
2.45k
    }
525
2.45k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
161
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
161
    } else {
518
161
        auto ss = LocalStateType::SharedStateType::create_shared();
519
161
        ss->id = operator_id();
520
161
        for (auto& dest : dests_id()) {
521
161
            ss->related_op_ids.insert(dest);
522
161
        }
523
161
        return ss;
524
161
    }
525
161
}
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.54M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.54M
    auto local_state = LocalStateType::create_unique(state, this);
530
2.54M
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.54M
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.54M
    return Status::OK();
533
2.54M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
66.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
66.2k
    auto local_state = LocalStateType::create_unique(state, this);
530
66.2k
    RETURN_IF_ERROR(local_state->init(state, info));
531
66.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
66.2k
    return Status::OK();
533
66.2k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
293k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
293k
    auto local_state = LocalStateType::create_unique(state, this);
530
293k
    RETURN_IF_ERROR(local_state->init(state, info));
531
293k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
293k
    return Status::OK();
533
293k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
74
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
74
    auto local_state = LocalStateType::create_unique(state, this);
530
74
    RETURN_IF_ERROR(local_state->init(state, info));
531
74
    state->emplace_local_state(operator_id(), std::move(local_state));
532
74
    return Status::OK();
533
74
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
34.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
34.0k
    auto local_state = LocalStateType::create_unique(state, this);
530
34.0k
    RETURN_IF_ERROR(local_state->init(state, info));
531
34.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
34.0k
    return Status::OK();
533
34.0k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
6.35k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
6.35k
    auto local_state = LocalStateType::create_unique(state, this);
530
6.35k
    RETURN_IF_ERROR(local_state->init(state, info));
531
6.35k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
6.35k
    return Status::OK();
533
6.35k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
6.92k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
6.92k
    auto local_state = LocalStateType::create_unique(state, this);
530
6.92k
    RETURN_IF_ERROR(local_state->init(state, info));
531
6.92k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
6.92k
    return Status::OK();
533
6.92k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
37
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
37
    auto local_state = LocalStateType::create_unique(state, this);
530
37
    RETURN_IF_ERROR(local_state->init(state, info));
531
37
    state->emplace_local_state(operator_id(), std::move(local_state));
532
37
    return Status::OK();
533
37
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
246k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
246k
    auto local_state = LocalStateType::create_unique(state, this);
530
246k
    RETURN_IF_ERROR(local_state->init(state, info));
531
246k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
246k
    return Status::OK();
533
246k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
150k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
150k
    auto local_state = LocalStateType::create_unique(state, this);
530
150k
    RETURN_IF_ERROR(local_state->init(state, info));
531
150k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
150k
    return Status::OK();
533
150k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
279
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
279
    auto local_state = LocalStateType::create_unique(state, this);
530
279
    RETURN_IF_ERROR(local_state->init(state, info));
531
279
    state->emplace_local_state(operator_id(), std::move(local_state));
532
279
    return Status::OK();
533
279
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
186
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
186
    auto local_state = LocalStateType::create_unique(state, this);
530
186
    RETURN_IF_ERROR(local_state->init(state, info));
531
186
    state->emplace_local_state(operator_id(), std::move(local_state));
532
186
    return Status::OK();
533
186
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
4.07k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
4.07k
    auto local_state = LocalStateType::create_unique(state, this);
530
4.07k
    RETURN_IF_ERROR(local_state->init(state, info));
531
4.07k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
4.07k
    return Status::OK();
533
4.07k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
390k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
390k
    auto local_state = LocalStateType::create_unique(state, this);
530
390k
    RETURN_IF_ERROR(local_state->init(state, info));
531
390k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
390k
    return Status::OK();
533
390k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.44k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.44k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.44k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.44k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.44k
    return Status::OK();
533
1.44k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
9.88k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
9.88k
    auto local_state = LocalStateType::create_unique(state, this);
530
9.88k
    RETURN_IF_ERROR(local_state->init(state, info));
531
9.88k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
9.88k
    return Status::OK();
533
9.88k
}
_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.70k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.70k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.70k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.70k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.70k
    return Status::OK();
533
1.70k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
55.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
55.0k
    auto local_state = LocalStateType::create_unique(state, this);
530
55.0k
    RETURN_IF_ERROR(local_state->init(state, info));
531
55.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
55.0k
    return Status::OK();
533
55.0k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
10.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
10.5k
    auto local_state = LocalStateType::create_unique(state, this);
530
10.5k
    RETURN_IF_ERROR(local_state->init(state, info));
531
10.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
10.5k
    return Status::OK();
533
10.5k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
313
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
313
    auto local_state = LocalStateType::create_unique(state, this);
530
313
    RETURN_IF_ERROR(local_state->init(state, info));
531
313
    state->emplace_local_state(operator_id(), std::move(local_state));
532
313
    return Status::OK();
533
313
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.43k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.43k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.43k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.43k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.43k
    return Status::OK();
533
2.43k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.46k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.46k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.46k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.46k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.46k
    return Status::OK();
533
2.46k
}
_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.38k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
7.38k
    auto local_state = LocalStateType::create_unique(state, this);
530
7.38k
    RETURN_IF_ERROR(local_state->init(state, info));
531
7.38k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
7.38k
    return Status::OK();
533
7.38k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
768k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
768k
    auto local_state = LocalStateType::create_unique(state, this);
530
768k
    RETURN_IF_ERROR(local_state->init(state, info));
531
768k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
768k
    return Status::OK();
533
768k
}
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.64k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.64k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.64k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.64k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.64k
    return Status::OK();
533
1.64k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.95k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.95k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.95k
    return Status::OK();
533
2.95k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
12.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
12.6k
    auto local_state = LocalStateType::create_unique(state, this);
530
12.6k
    RETURN_IF_ERROR(local_state->init(state, info));
531
12.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
12.6k
    return Status::OK();
533
12.6k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
465k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
465k
    auto local_state = LocalStateType::create_unique(state, this);
530
465k
    RETURN_IF_ERROR(local_state->init(state, info));
531
465k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
465k
    return Status::OK();
533
465k
}
534
535
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
536
                                                         RuntimeState* state)
537
2.05M
        : _parent(parent), _state(state) {}
538
539
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
540
2.54M
        : _num_rows_returned(0),
541
2.54M
          _rows_returned_counter(nullptr),
542
2.54M
          _parent(parent),
543
2.54M
          _state(state),
544
2.54M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
545
546
template <typename SharedStateArg>
547
2.54M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
2.54M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
2.54M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
2.54M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
2.54M
    _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.54M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
2.54M
    _operator_profile->add_child(_common_profile.get(), true);
556
2.54M
    _operator_profile->add_child(_custom_profile.get(), true);
557
2.54M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
2.54M
    if constexpr (!is_fake_shared) {
559
1.33M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
788k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
788k
                                    .first.get()
562
788k
                                    ->template cast<SharedStateArg>();
563
564
788k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
788k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
788k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
788k
        } else if (info.shared_state) {
568
478k
            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
478k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
478k
            _dependency = _shared_state->create_source_dependency(
575
478k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
478k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
478k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
478k
        } else {
579
64.0k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
4.01k
                DCHECK(false);
581
4.01k
            }
582
64.0k
        }
583
1.33M
    }
584
585
2.54M
    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.54M
    _rows_returned_counter =
590
2.54M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
2.54M
    _blocks_returned_counter =
592
2.54M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
2.54M
    _output_block_bytes_counter =
594
2.54M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
2.54M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
2.54M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
2.54M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
2.54M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
2.54M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
2.54M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
2.54M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
2.54M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
2.54M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
2.54M
    _memory_used_counter =
605
2.54M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
2.54M
    _common_profile->add_info_string("IsColocate",
607
2.54M
                                     std::to_string(_parent->is_colocated_operator()));
608
2.54M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
2.54M
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
2.54M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
2.54M
    return Status::OK();
612
2.54M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
66.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
66.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
66.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
66.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
66.4k
    _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
66.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
66.4k
    _operator_profile->add_child(_common_profile.get(), true);
556
66.4k
    _operator_profile->add_child(_custom_profile.get(), true);
557
66.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
66.4k
    if constexpr (!is_fake_shared) {
559
66.4k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
21.1k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
21.1k
                                    .first.get()
562
21.1k
                                    ->template cast<SharedStateArg>();
563
564
21.1k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
21.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
21.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
45.2k
        } 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
44.6k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
44.6k
            _dependency = _shared_state->create_source_dependency(
575
44.6k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
44.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
44.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
44.6k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
641
        }
583
66.4k
    }
584
585
66.4k
    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
66.4k
    _rows_returned_counter =
590
66.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
66.4k
    _blocks_returned_counter =
592
66.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
66.4k
    _output_block_bytes_counter =
594
66.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
66.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
66.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
66.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
66.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
66.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
66.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
66.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
66.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
66.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
66.4k
    _memory_used_counter =
605
66.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
66.4k
    _common_profile->add_info_string("IsColocate",
607
66.4k
                                     std::to_string(_parent->is_colocated_operator()));
608
66.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
66.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
66.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
66.4k
    return Status::OK();
612
66.4k
}
_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
254k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
254k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
254k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
254k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
254k
    _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
254k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
254k
    _operator_profile->add_child(_common_profile.get(), true);
556
254k
    _operator_profile->add_child(_custom_profile.get(), true);
557
254k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
254k
    if constexpr (!is_fake_shared) {
559
254k
        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
254k
        } 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
248k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
248k
            _dependency = _shared_state->create_source_dependency(
575
248k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
248k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
248k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
248k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
5.68k
        }
583
254k
    }
584
585
254k
    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
254k
    _rows_returned_counter =
590
254k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
254k
    _blocks_returned_counter =
592
254k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
254k
    _output_block_bytes_counter =
594
254k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
254k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
254k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
254k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
254k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
254k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
254k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
254k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
254k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
254k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
254k
    _memory_used_counter =
605
254k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
254k
    _common_profile->add_info_string("IsColocate",
607
254k
                                     std::to_string(_parent->is_colocated_operator()));
608
254k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
254k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
254k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
254k
    return Status::OK();
612
254k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
37
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
37
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
37
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
37
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
37
    _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
37
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
37
    _operator_profile->add_child(_common_profile.get(), true);
556
37
    _operator_profile->add_child(_custom_profile.get(), true);
557
37
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
37
    if constexpr (!is_fake_shared) {
559
37
        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
37
        } 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
37
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
37
            _dependency = _shared_state->create_source_dependency(
575
37
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
37
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
37
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
37
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
37
    }
584
585
37
    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
37
    _rows_returned_counter =
590
37
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
37
    _blocks_returned_counter =
592
37
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
37
    _output_block_bytes_counter =
594
37
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
37
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
37
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
37
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
37
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
37
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
37
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
37
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
37
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
37
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
37
    _memory_used_counter =
605
37
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
37
    _common_profile->add_info_string("IsColocate",
607
37
                                     std::to_string(_parent->is_colocated_operator()));
608
37
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
37
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
37
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
37
    return Status::OK();
612
37
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
9.88k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
9.88k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
9.88k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
9.88k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
9.88k
    _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.88k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
9.88k
    _operator_profile->add_child(_common_profile.get(), true);
556
9.88k
    _operator_profile->add_child(_custom_profile.get(), true);
557
9.88k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
9.88k
    if constexpr (!is_fake_shared) {
559
9.88k
        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.88k
        } 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.88k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
9.88k
            _dependency = _shared_state->create_source_dependency(
575
9.88k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
9.88k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
9.88k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
9.88k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
9.88k
    }
584
585
9.88k
    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.88k
    _rows_returned_counter =
590
9.88k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
9.88k
    _blocks_returned_counter =
592
9.88k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
9.88k
    _output_block_bytes_counter =
594
9.88k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
9.88k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
9.88k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
9.88k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
9.88k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
9.88k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
9.88k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
9.88k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
9.88k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
9.88k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
9.88k
    _memory_used_counter =
605
9.88k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
9.88k
    _common_profile->add_info_string("IsColocate",
607
9.88k
                                     std::to_string(_parent->is_colocated_operator()));
608
9.88k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
9.88k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
9.88k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
9.88k
    return Status::OK();
612
9.88k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
6.39k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
6.39k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
6.39k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
6.39k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
6.39k
    _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.39k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
6.39k
    _operator_profile->add_child(_common_profile.get(), true);
556
6.39k
    _operator_profile->add_child(_custom_profile.get(), true);
557
6.39k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
6.39k
    if constexpr (!is_fake_shared) {
559
6.39k
        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.39k
        } 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.33k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
6.33k
            _dependency = _shared_state->create_source_dependency(
575
6.33k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
6.33k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
6.33k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
6.33k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
63
        }
583
6.39k
    }
584
585
6.39k
    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.39k
    _rows_returned_counter =
590
6.39k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
6.39k
    _blocks_returned_counter =
592
6.39k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
6.39k
    _output_block_bytes_counter =
594
6.39k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
6.39k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
6.39k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
6.39k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
6.39k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
6.39k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
6.39k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
6.39k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
6.39k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
6.39k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
6.39k
    _memory_used_counter =
605
6.39k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
6.39k
    _common_profile->add_info_string("IsColocate",
607
6.39k
                                     std::to_string(_parent->is_colocated_operator()));
608
6.39k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
6.39k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
6.39k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
6.39k
    return Status::OK();
612
6.39k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
150k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
150k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
150k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
150k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
150k
    _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
150k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
150k
    _operator_profile->add_child(_common_profile.get(), true);
556
150k
    _operator_profile->add_child(_custom_profile.get(), true);
557
150k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
150k
    if constexpr (!is_fake_shared) {
559
150k
        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
150k
        } 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
149k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
149k
            _dependency = _shared_state->create_source_dependency(
575
149k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
149k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
149k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
149k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
1.28k
        }
583
150k
    }
584
585
150k
    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
150k
    _rows_returned_counter =
590
150k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
150k
    _blocks_returned_counter =
592
150k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
150k
    _output_block_bytes_counter =
594
150k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
150k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
150k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
150k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
150k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
150k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
150k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
150k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
150k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
150k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
150k
    _memory_used_counter =
605
150k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
150k
    _common_profile->add_info_string("IsColocate",
607
150k
                                     std::to_string(_parent->is_colocated_operator()));
608
150k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
150k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
150k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
150k
    return Status::OK();
612
150k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
282
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
282
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
282
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
282
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
282
    _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
282
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
282
    _operator_profile->add_child(_common_profile.get(), true);
556
282
    _operator_profile->add_child(_custom_profile.get(), true);
557
282
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
282
    if constexpr (!is_fake_shared) {
559
282
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
277
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
277
                                    .first.get()
562
277
                                    ->template cast<SharedStateArg>();
563
564
277
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
277
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
277
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
277
        } 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
5
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
5
        }
583
282
    }
584
585
282
    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
282
    _rows_returned_counter =
590
282
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
282
    _blocks_returned_counter =
592
282
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
282
    _output_block_bytes_counter =
594
282
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
282
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
282
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
282
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
282
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
282
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
282
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
282
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
282
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
282
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
282
    _memory_used_counter =
605
282
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
282
    _common_profile->add_info_string("IsColocate",
607
282
                                     std::to_string(_parent->is_colocated_operator()));
608
282
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
282
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
282
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
282
    return Status::OK();
612
282
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
186
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
186
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
186
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
186
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
186
    _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
186
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
186
    _operator_profile->add_child(_common_profile.get(), true);
556
186
    _operator_profile->add_child(_custom_profile.get(), true);
557
186
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
186
    if constexpr (!is_fake_shared) {
559
186
        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
187
        } 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
187
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
187
            _dependency = _shared_state->create_source_dependency(
575
187
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
187
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
187
                    _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
186
    }
584
585
186
    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
186
    _rows_returned_counter =
590
186
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
186
    _blocks_returned_counter =
592
186
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
186
    _output_block_bytes_counter =
594
186
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
186
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
186
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
186
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
186
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
186
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
186
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
186
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
186
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
186
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
186
    _memory_used_counter =
605
186
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
186
    _common_profile->add_info_string("IsColocate",
607
186
                                     std::to_string(_parent->is_colocated_operator()));
608
186
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
186
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
186
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
186
    return Status::OK();
612
186
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
1.21M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
1.21M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
1.21M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
1.21M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
1.21M
    _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.21M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
1.21M
    _operator_profile->add_child(_common_profile.get(), true);
556
1.21M
    _operator_profile->add_child(_custom_profile.get(), true);
557
1.21M
    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.21M
    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.21M
    _rows_returned_counter =
590
1.21M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
1.21M
    _blocks_returned_counter =
592
1.21M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
1.21M
    _output_block_bytes_counter =
594
1.21M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
1.21M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
1.21M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
1.21M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
1.21M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
1.21M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
1.21M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
1.21M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
1.21M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
1.21M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
1.21M
    _memory_used_counter =
605
1.21M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
1.21M
    _common_profile->add_info_string("IsColocate",
607
1.21M
                                     std::to_string(_parent->is_colocated_operator()));
608
1.21M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
1.21M
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
1.21M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
1.21M
    return Status::OK();
612
1.21M
}
_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.69k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
2.69k
            _dependency = _shared_state->create_source_dependency(
575
2.69k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
2.69k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
2.69k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
52.2k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
52.2k
        }
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.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
10.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
10.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
10.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
10.5k
    _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.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
10.5k
    _operator_profile->add_child(_common_profile.get(), true);
556
10.5k
    _operator_profile->add_child(_custom_profile.get(), true);
557
10.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
10.5k
    if constexpr (!is_fake_shared) {
559
10.5k
        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.5k
        } 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.4k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
10.4k
            _dependency = _shared_state->create_source_dependency(
575
10.4k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
10.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
10.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
10.4k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
50
        }
583
10.5k
    }
584
585
10.5k
    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.5k
    _rows_returned_counter =
590
10.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
10.5k
    _blocks_returned_counter =
592
10.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
10.5k
    _output_block_bytes_counter =
594
10.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
10.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
10.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
10.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
10.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
10.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
10.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
10.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
10.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
10.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
10.5k
    _memory_used_counter =
605
10.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
10.5k
    _common_profile->add_info_string("IsColocate",
607
10.5k
                                     std::to_string(_parent->is_colocated_operator()));
608
10.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
10.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
10.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
10.5k
    return Status::OK();
612
10.5k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
420
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
420
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
420
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
420
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
420
    _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
420
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
420
    _operator_profile->add_child(_common_profile.get(), true);
556
420
    _operator_profile->add_child(_custom_profile.get(), true);
557
420
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
420
    if constexpr (!is_fake_shared) {
559
420
        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
420
        } 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
406
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
406
            _dependency = _shared_state->create_source_dependency(
575
406
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
406
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
406
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
406
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
14
        }
583
420
    }
584
585
420
    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
420
    _rows_returned_counter =
590
420
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
420
    _blocks_returned_counter =
592
420
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
420
    _output_block_bytes_counter =
594
420
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
420
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
420
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
420
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
420
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
420
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
420
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
420
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
420
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
420
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
420
    _memory_used_counter =
605
420
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
420
    _common_profile->add_info_string("IsColocate",
607
420
                                     std::to_string(_parent->is_colocated_operator()));
608
420
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
420
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
420
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
420
    return Status::OK();
612
420
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
4.93k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
4.93k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
4.93k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
4.93k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
4.93k
    _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.93k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
4.93k
    _operator_profile->add_child(_common_profile.get(), true);
556
4.93k
    _operator_profile->add_child(_custom_profile.get(), true);
557
4.93k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
4.93k
    if constexpr (!is_fake_shared) {
559
4.93k
        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.93k
        } 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.90k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
4.90k
            _dependency = _shared_state->create_source_dependency(
575
4.90k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
4.90k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
4.90k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
4.90k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
27
        }
583
4.93k
    }
584
585
4.93k
    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.93k
    _rows_returned_counter =
590
4.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
4.93k
    _blocks_returned_counter =
592
4.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
4.93k
    _output_block_bytes_counter =
594
4.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
4.93k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
4.93k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
4.93k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
4.93k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
4.93k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
4.93k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
4.93k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
4.93k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
4.93k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
4.93k
    _memory_used_counter =
605
4.93k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
4.93k
    _common_profile->add_info_string("IsColocate",
607
4.93k
                                     std::to_string(_parent->is_colocated_operator()));
608
4.93k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
4.93k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
4.93k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
4.93k
    return Status::OK();
612
4.93k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
770k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
770k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
770k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
770k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
770k
    _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
770k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
770k
    _operator_profile->add_child(_common_profile.get(), true);
556
770k
    _operator_profile->add_child(_custom_profile.get(), true);
557
770k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
770k
    if constexpr (!is_fake_shared) {
559
770k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
766k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
766k
                                    .first.get()
562
766k
                                    ->template cast<SharedStateArg>();
563
564
766k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
766k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
766k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
766k
        } 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.01k
        } else {
579
4.01k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
4.01k
                DCHECK(false);
581
4.01k
            }
582
4.01k
        }
583
770k
    }
584
585
770k
    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
770k
    _rows_returned_counter =
590
770k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
770k
    _blocks_returned_counter =
592
770k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
770k
    _output_block_bytes_counter =
594
770k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
770k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
770k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
770k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
770k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
770k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
770k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
770k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
770k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
770k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
770k
    _memory_used_counter =
605
770k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
770k
    _common_profile->add_info_string("IsColocate",
607
770k
                                     std::to_string(_parent->is_colocated_operator()));
608
770k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
770k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
770k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
770k
    return Status::OK();
612
770k
}
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.55M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
2.55M
    _conjuncts.resize(_parent->_conjuncts.size());
617
2.55M
    _projections.resize(_parent->_projections.size());
618
3.05M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
499k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
499k
    }
621
5.21M
    for (size_t i = 0; i < _projections.size(); i++) {
622
2.66M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
2.66M
    }
624
2.55M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
2.56M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
11.6k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
78.6k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
67.0k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
67.0k
                    state, _intermediate_projections[i][j]));
630
67.0k
        }
631
11.6k
    }
632
2.55M
    return Status::OK();
633
2.55M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
66.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
66.4k
    _conjuncts.resize(_parent->_conjuncts.size());
617
66.4k
    _projections.resize(_parent->_projections.size());
618
67.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
989
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
989
    }
621
338k
    for (size_t i = 0; i < _projections.size(); i++) {
622
272k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
272k
    }
624
66.4k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
67.9k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
1.45k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
16.6k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
15.2k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
15.2k
                    state, _intermediate_projections[i][j]));
630
15.2k
        }
631
1.45k
    }
632
66.4k
    return Status::OK();
633
66.4k
}
_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
254k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
254k
    _conjuncts.resize(_parent->_conjuncts.size());
617
254k
    _projections.resize(_parent->_projections.size());
618
254k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
255k
    for (size_t i = 0; i < _projections.size(); i++) {
622
359
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
359
    }
624
254k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
254k
    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
254k
    return Status::OK();
633
254k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
37
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
37
    _conjuncts.resize(_parent->_conjuncts.size());
617
37
    _projections.resize(_parent->_projections.size());
618
37
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
37
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
37
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
37
    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
37
    return Status::OK();
633
37
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
9.88k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
9.88k
    _conjuncts.resize(_parent->_conjuncts.size());
617
9.88k
    _projections.resize(_parent->_projections.size());
618
9.95k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
67
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
67
    }
621
65.9k
    for (size_t i = 0; i < _projections.size(); i++) {
622
56.0k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
56.0k
    }
624
9.88k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
10.0k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
141
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
855
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
714
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
714
                    state, _intermediate_projections[i][j]));
630
714
        }
631
141
    }
632
9.88k
    return Status::OK();
633
9.88k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
6.40k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
6.40k
    _conjuncts.resize(_parent->_conjuncts.size());
617
6.40k
    _projections.resize(_parent->_projections.size());
618
7.01k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
615
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
615
    }
621
17.8k
    for (size_t i = 0; i < _projections.size(); i++) {
622
11.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
11.4k
    }
624
6.40k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
6.48k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
85
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
642
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
557
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
557
                    state, _intermediate_projections[i][j]));
630
557
        }
631
85
    }
632
6.40k
    return Status::OK();
633
6.40k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
151k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
151k
    _conjuncts.resize(_parent->_conjuncts.size());
617
151k
    _projections.resize(_parent->_projections.size());
618
154k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
3.96k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
3.96k
    }
621
413k
    for (size_t i = 0; i < _projections.size(); i++) {
622
262k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
262k
    }
624
151k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
151k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
236
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
1.62k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
1.39k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
1.39k
                    state, _intermediate_projections[i][j]));
630
1.39k
        }
631
236
    }
632
151k
    return Status::OK();
633
151k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
282
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
282
    _conjuncts.resize(_parent->_conjuncts.size());
617
282
    _projections.resize(_parent->_projections.size());
618
285
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
3
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
3
    }
621
1.06k
    for (size_t i = 0; i < _projections.size(); i++) {
622
781
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
781
    }
624
282
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
282
    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
282
    return Status::OK();
633
282
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
192
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
192
    _conjuncts.resize(_parent->_conjuncts.size());
617
192
    _projections.resize(_parent->_projections.size());
618
192
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
484
    for (size_t i = 0; i < _projections.size(); i++) {
622
292
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
292
    }
624
192
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
192
    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
192
    return Status::OK();
633
192
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
1.22M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
1.22M
    _conjuncts.resize(_parent->_conjuncts.size());
617
1.22M
    _projections.resize(_parent->_projections.size());
618
1.71M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
489k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
489k
    }
621
3.18M
    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.22M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
1.23M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
9.69k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
58.8k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
49.1k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
49.1k
                    state, _intermediate_projections[i][j]));
630
49.1k
        }
631
9.69k
    }
632
1.22M
    return Status::OK();
633
1.22M
}
_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
150k
    for (size_t i = 0; i < _projections.size(); i++) {
622
95.2k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
95.2k
    }
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.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
10.5k
    _conjuncts.resize(_parent->_conjuncts.size());
617
10.5k
    _projections.resize(_parent->_projections.size());
618
14.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
3.82k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
3.82k
    }
621
10.5k
    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.5k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
10.5k
    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.5k
    return Status::OK();
633
10.5k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
420
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
420
    _conjuncts.resize(_parent->_conjuncts.size());
617
420
    _projections.resize(_parent->_projections.size());
618
420
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
420
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
420
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
420
    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
420
    return Status::OK();
633
420
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
4.92k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
4.92k
    _conjuncts.resize(_parent->_conjuncts.size());
617
4.92k
    _projections.resize(_parent->_projections.size());
618
4.92k
    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.92k
    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.92k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
4.92k
    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.92k
    return Status::OK();
633
4.92k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
772k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
772k
    _conjuncts.resize(_parent->_conjuncts.size());
617
772k
    _projections.resize(_parent->_projections.size());
618
772k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
772k
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
772k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
772k
    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
772k
    return Status::OK();
633
772k
}
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.52k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
7.52k
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
7.52k
    _terminated = true;
641
7.52k
    return Status::OK();
642
7.52k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
333
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
333
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
333
    _terminated = true;
641
333
    return Status::OK();
642
333
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
60
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
60
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
60
    _terminated = true;
641
60
    return Status::OK();
642
60
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
137
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
137
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
137
    _terminated = true;
641
137
    return Status::OK();
642
137
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_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_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
128
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
128
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
128
    _terminated = true;
641
128
    return Status::OK();
642
128
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
2
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
2
    _terminated = true;
641
2
    return Status::OK();
642
2
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
5.62k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
5.62k
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
5.62k
    _terminated = true;
641
5.62k
    return Status::OK();
642
5.62k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
8
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
8
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
8
    _terminated = true;
641
8
    return Status::OK();
642
8
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
2
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
2
    _terminated = true;
641
2
    return Status::OK();
642
2
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
5
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
5
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
5
    _terminated = true;
641
5
    return Status::OK();
642
5
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
1.21k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
1.21k
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
1.21k
    _terminated = true;
641
1.21k
    return Status::OK();
642
1.21k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
21
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
21
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
21
    _terminated = true;
641
21
    return Status::OK();
642
21
}
643
644
template <typename SharedStateArg>
645
2.84M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
2.84M
    if (_closed) {
647
285k
        return Status::OK();
648
285k
    }
649
2.55M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
1.33M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
1.33M
    }
652
2.55M
    _closed = true;
653
2.55M
    return Status::OK();
654
2.84M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
66.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
66.4k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
66.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
66.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
66.4k
    }
652
66.4k
    _closed = true;
653
66.4k
    return Status::OK();
654
66.4k
}
_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
507k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
507k
    if (_closed) {
647
253k
        return Status::OK();
648
253k
    }
649
253k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
253k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
253k
    }
652
253k
    _closed = true;
653
253k
    return Status::OK();
654
507k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
37
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
37
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
37
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
37
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
37
    }
652
37
    _closed = true;
653
37
    return Status::OK();
654
37
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
9.88k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
9.88k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
9.88k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
9.88k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
9.88k
    }
652
9.88k
    _closed = true;
653
9.88k
    return Status::OK();
654
9.88k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
12.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
12.8k
    if (_closed) {
647
6.47k
        return Status::OK();
648
6.47k
    }
649
6.38k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
6.38k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
6.38k
    }
652
6.38k
    _closed = true;
653
6.38k
    return Status::OK();
654
12.8k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
150k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
150k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
150k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
150k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
150k
    }
652
150k
    _closed = true;
653
150k
    return Status::OK();
654
150k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
281
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
281
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
281
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
281
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
281
    }
652
281
    _closed = true;
653
281
    return Status::OK();
654
281
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
187
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
187
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
187
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
187
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
187
    }
652
187
    _closed = true;
653
187
    return Status::OK();
654
187
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
1.24M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
1.24M
    if (_closed) {
647
19.6k
        return Status::OK();
648
19.6k
    }
649
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
    }
652
1.22M
    _closed = true;
653
1.22M
    return Status::OK();
654
1.24M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
55.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
55.2k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
55.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
55.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
55.2k
    }
652
55.2k
    _closed = true;
653
55.2k
    return Status::OK();
654
55.2k
}
_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.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
10.5k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
10.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
10.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
10.5k
    }
652
10.5k
    _closed = true;
653
10.5k
    return Status::OK();
654
10.5k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
638
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
638
    if (_closed) {
647
319
        return Status::OK();
648
319
    }
649
319
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
319
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
319
    }
652
319
    _closed = true;
653
319
    return Status::OK();
654
638
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
9.95k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
9.95k
    if (_closed) {
647
5.02k
        return Status::OK();
648
5.02k
    }
649
4.92k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
4.92k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
4.92k
    }
652
4.92k
    _closed = true;
653
4.92k
    return Status::OK();
654
9.95k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
774k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
774k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
774k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
774k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
774k
    }
652
774k
    _closed = true;
653
774k
    return Status::OK();
654
774k
}
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
2.05M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
2.05M
    _operator_profile =
660
2.05M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
2.05M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
2.05M
    _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.05M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
2.05M
    _operator_profile->add_child(_common_profile, true);
669
2.05M
    _operator_profile->add_child(_custom_profile, true);
670
671
2.05M
    _operator_profile->set_metadata(_parent->node_id());
672
2.05M
    _wait_for_finish_dependency_timer =
673
2.05M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
2.05M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
2.05M
    if constexpr (!is_fake_shared) {
676
1.36M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
1.36M
            info.shared_state_map.end()) {
678
313k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
292k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
292k
            }
681
313k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
313k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
313k
                                                  ? 0
684
313k
                                                  : info.task_idx]
685
313k
                                  .get();
686
313k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
1.04M
        } else {
688
1.04M
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
183
                DCHECK(false);
690
183
            }
691
1.04M
            _shared_state = info.shared_state->template cast<SharedState>();
692
1.04M
            _dependency = _shared_state->create_sink_dependency(
693
1.04M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
1.04M
        }
695
1.36M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
1.36M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
1.36M
    }
698
699
2.05M
    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.05M
    _rows_input_counter =
704
2.05M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
2.05M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
2.05M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
2.05M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
2.05M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
2.05M
    _memory_used_counter =
710
2.05M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
2.05M
    _common_profile->add_info_string("IsColocate",
712
2.05M
                                     std::to_string(_parent->is_colocated_operator()));
713
2.05M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
2.05M
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
2.05M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
2.05M
    return Status::OK();
717
2.05M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
114k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
114k
    _operator_profile =
660
114k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
114k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
114k
    _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
114k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
114k
    _operator_profile->add_child(_common_profile, true);
669
114k
    _operator_profile->add_child(_custom_profile, true);
670
671
114k
    _operator_profile->set_metadata(_parent->node_id());
672
114k
    _wait_for_finish_dependency_timer =
673
114k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
114k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
114k
    if constexpr (!is_fake_shared) {
676
114k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
114k
            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
21.2k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
21.2k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
21.2k
                                                  ? 0
684
21.2k
                                                  : info.task_idx]
685
21.2k
                                  .get();
686
21.2k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
93.1k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
93.1k
            _shared_state = info.shared_state->template cast<SharedState>();
692
93.1k
            _dependency = _shared_state->create_sink_dependency(
693
93.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
93.1k
        }
695
114k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
114k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
114k
    }
698
699
114k
    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
114k
    _rows_input_counter =
704
114k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
114k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
114k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
114k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
114k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
114k
    _memory_used_counter =
710
114k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
114k
    _common_profile->add_info_string("IsColocate",
712
114k
                                     std::to_string(_parent->is_colocated_operator()));
713
114k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
114k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
114k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
114k
    return Status::OK();
717
114k
}
_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
254k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
254k
    _operator_profile =
660
254k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
254k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
254k
    _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
254k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
254k
    _operator_profile->add_child(_common_profile, true);
669
254k
    _operator_profile->add_child(_custom_profile, true);
670
671
254k
    _operator_profile->set_metadata(_parent->node_id());
672
254k
    _wait_for_finish_dependency_timer =
673
254k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
254k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
254k
    if constexpr (!is_fake_shared) {
676
254k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
254k
            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
254k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
254k
            _shared_state = info.shared_state->template cast<SharedState>();
692
254k
            _dependency = _shared_state->create_sink_dependency(
693
254k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
254k
        }
695
254k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
254k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
254k
    }
698
699
254k
    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
254k
    _rows_input_counter =
704
254k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
254k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
254k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
254k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
254k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
254k
    _memory_used_counter =
710
254k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
254k
    _common_profile->add_info_string("IsColocate",
712
254k
                                     std::to_string(_parent->is_colocated_operator()));
713
254k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
254k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
254k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
254k
    return Status::OK();
717
254k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
44
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
44
    _operator_profile =
660
44
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
44
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
44
    _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
44
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
44
    _operator_profile->add_child(_common_profile, true);
669
44
    _operator_profile->add_child(_custom_profile, true);
670
671
44
    _operator_profile->set_metadata(_parent->node_id());
672
44
    _wait_for_finish_dependency_timer =
673
44
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
44
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
44
    if constexpr (!is_fake_shared) {
676
44
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
44
            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
44
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
44
            _shared_state = info.shared_state->template cast<SharedState>();
692
44
            _dependency = _shared_state->create_sink_dependency(
693
44
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
44
        }
695
44
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
44
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
44
    }
698
699
44
    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
44
    _rows_input_counter =
704
44
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
44
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
44
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
44
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
44
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
44
    _memory_used_counter =
710
44
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
44
    _common_profile->add_info_string("IsColocate",
712
44
                                     std::to_string(_parent->is_colocated_operator()));
713
44
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
44
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
44
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
44
    return Status::OK();
717
44
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
9.88k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
9.88k
    _operator_profile =
660
9.88k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
9.88k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
9.88k
    _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.88k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
9.88k
    _operator_profile->add_child(_common_profile, true);
669
9.88k
    _operator_profile->add_child(_custom_profile, true);
670
671
9.88k
    _operator_profile->set_metadata(_parent->node_id());
672
9.88k
    _wait_for_finish_dependency_timer =
673
9.88k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
9.88k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
9.88k
    if constexpr (!is_fake_shared) {
676
9.88k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
9.88k
            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.88k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
9.88k
            _shared_state = info.shared_state->template cast<SharedState>();
692
9.88k
            _dependency = _shared_state->create_sink_dependency(
693
9.88k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
9.88k
        }
695
9.88k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
9.88k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
9.88k
    }
698
699
9.88k
    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.88k
    _rows_input_counter =
704
9.88k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
9.88k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
9.88k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
9.88k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
9.88k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
9.88k
    _memory_used_counter =
710
9.88k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
9.88k
    _common_profile->add_info_string("IsColocate",
712
9.88k
                                     std::to_string(_parent->is_colocated_operator()));
713
9.88k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
9.88k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
9.88k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
9.88k
    return Status::OK();
717
9.88k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
6.39k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
6.39k
    _operator_profile =
660
6.39k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
6.39k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
6.39k
    _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.39k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
6.39k
    _operator_profile->add_child(_common_profile, true);
669
6.39k
    _operator_profile->add_child(_custom_profile, true);
670
671
6.39k
    _operator_profile->set_metadata(_parent->node_id());
672
6.39k
    _wait_for_finish_dependency_timer =
673
6.39k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
6.39k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
6.39k
    if constexpr (!is_fake_shared) {
676
6.39k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
6.39k
            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.39k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
6.39k
            _shared_state = info.shared_state->template cast<SharedState>();
692
6.39k
            _dependency = _shared_state->create_sink_dependency(
693
6.39k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
6.39k
        }
695
6.39k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
6.39k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
6.39k
    }
698
699
6.39k
    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.39k
    _rows_input_counter =
704
6.39k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
6.39k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
6.39k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
6.39k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
6.39k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
6.39k
    _memory_used_counter =
710
6.39k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
6.39k
    _common_profile->add_info_string("IsColocate",
712
6.39k
                                     std::to_string(_parent->is_colocated_operator()));
713
6.39k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
6.39k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
6.39k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
6.39k
    return Status::OK();
717
6.39k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
150k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
150k
    _operator_profile =
660
150k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
150k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
150k
    _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
150k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
150k
    _operator_profile->add_child(_common_profile, true);
669
150k
    _operator_profile->add_child(_custom_profile, true);
670
671
150k
    _operator_profile->set_metadata(_parent->node_id());
672
150k
    _wait_for_finish_dependency_timer =
673
150k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
150k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
150k
    if constexpr (!is_fake_shared) {
676
150k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
150k
            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
150k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
150k
            _shared_state = info.shared_state->template cast<SharedState>();
692
150k
            _dependency = _shared_state->create_sink_dependency(
693
150k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
150k
        }
695
150k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
150k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
150k
    }
698
699
150k
    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
150k
    _rows_input_counter =
704
150k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
150k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
150k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
150k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
150k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
150k
    _memory_used_counter =
710
150k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
150k
    _common_profile->add_info_string("IsColocate",
712
150k
                                     std::to_string(_parent->is_colocated_operator()));
713
150k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
150k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
150k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
150k
    return Status::OK();
717
150k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
245
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
245
    _operator_profile =
660
245
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
245
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
245
    _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
245
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
245
    _operator_profile->add_child(_common_profile, true);
669
245
    _operator_profile->add_child(_custom_profile, true);
670
671
245
    _operator_profile->set_metadata(_parent->node_id());
672
245
    _wait_for_finish_dependency_timer =
673
245
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
245
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
245
    if constexpr (!is_fake_shared) {
676
245
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
245
            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
245
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
245
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
245
                                                  ? 0
684
245
                                                  : info.task_idx]
685
245
                                  .get();
686
245
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
245
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
0
            _shared_state = info.shared_state->template cast<SharedState>();
692
0
            _dependency = _shared_state->create_sink_dependency(
693
0
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
0
        }
695
245
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
245
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
245
    }
698
699
245
    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
245
    _rows_input_counter =
704
245
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
245
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
245
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
245
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
245
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
245
    _memory_used_counter =
710
245
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
245
    _common_profile->add_info_string("IsColocate",
712
245
                                     std::to_string(_parent->is_colocated_operator()));
713
245
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
245
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
245
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
245
    return Status::OK();
717
245
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
198
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
198
    _operator_profile =
660
198
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
198
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
198
    _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
198
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
198
    _operator_profile->add_child(_common_profile, true);
669
198
    _operator_profile->add_child(_custom_profile, true);
670
671
198
    _operator_profile->set_metadata(_parent->node_id());
672
198
    _wait_for_finish_dependency_timer =
673
198
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
198
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
198
    if constexpr (!is_fake_shared) {
676
198
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
198
            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
198
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
198
            _shared_state = info.shared_state->template cast<SharedState>();
692
198
            _dependency = _shared_state->create_sink_dependency(
693
198
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
198
        }
695
198
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
198
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
198
    }
698
699
198
    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
198
    _rows_input_counter =
704
198
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
198
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
198
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
198
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
198
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
198
    _memory_used_counter =
710
198
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
198
    _common_profile->add_info_string("IsColocate",
712
198
                                     std::to_string(_parent->is_colocated_operator()));
713
198
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
198
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
198
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
198
    return Status::OK();
717
198
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
693k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
693k
    _operator_profile =
660
693k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
693k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
693k
    _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
693k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
693k
    _operator_profile->add_child(_common_profile, true);
669
693k
    _operator_profile->add_child(_custom_profile, true);
670
671
693k
    _operator_profile->set_metadata(_parent->node_id());
672
693k
    _wait_for_finish_dependency_timer =
673
693k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
693k
    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
693k
    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
693k
    _rows_input_counter =
704
693k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
693k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
693k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
693k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
693k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
693k
    _memory_used_counter =
710
693k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
693k
    _common_profile->add_info_string("IsColocate",
712
693k
                                     std::to_string(_parent->is_colocated_operator()));
713
693k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
693k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
693k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
693k
    return Status::OK();
717
693k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
5.79k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
5.79k
    _operator_profile =
660
5.79k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
5.79k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
5.79k
    _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.79k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
5.79k
    _operator_profile->add_child(_common_profile, true);
669
5.79k
    _operator_profile->add_child(_custom_profile, true);
670
671
5.79k
    _operator_profile->set_metadata(_parent->node_id());
672
5.79k
    _wait_for_finish_dependency_timer =
673
5.79k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
5.79k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
5.79k
    if constexpr (!is_fake_shared) {
676
5.79k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
5.79k
            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.79k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
5.79k
            _shared_state = info.shared_state->template cast<SharedState>();
692
5.79k
            _dependency = _shared_state->create_sink_dependency(
693
5.79k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
5.79k
        }
695
5.79k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
5.79k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
5.79k
    }
698
699
5.79k
    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.79k
    _rows_input_counter =
704
5.79k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
5.79k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
5.79k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
5.79k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
5.79k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
5.79k
    _memory_used_counter =
710
5.79k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
5.79k
    _common_profile->add_info_string("IsColocate",
712
5.79k
                                     std::to_string(_parent->is_colocated_operator()));
713
5.79k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
5.79k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
5.79k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
5.79k
    return Status::OK();
717
5.79k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
420
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
420
    _operator_profile =
660
420
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
420
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
420
    _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
420
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
420
    _operator_profile->add_child(_common_profile, true);
669
420
    _operator_profile->add_child(_custom_profile, true);
670
671
420
    _operator_profile->set_metadata(_parent->node_id());
672
420
    _wait_for_finish_dependency_timer =
673
420
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
420
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
420
    if constexpr (!is_fake_shared) {
676
420
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
420
            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
420
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
420
            _shared_state = info.shared_state->template cast<SharedState>();
692
420
            _dependency = _shared_state->create_sink_dependency(
693
420
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
420
        }
695
420
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
420
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
420
    }
698
699
420
    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
420
    _rows_input_counter =
704
420
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
420
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
420
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
420
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
420
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
420
    _memory_used_counter =
710
420
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
420
    _common_profile->add_info_string("IsColocate",
712
420
                                     std::to_string(_parent->is_colocated_operator()));
713
420
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
420
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
420
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
420
    return Status::OK();
717
420
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
3.78k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
3.78k
    _operator_profile =
660
3.78k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
3.78k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
3.78k
    _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
3.78k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
3.78k
    _operator_profile->add_child(_common_profile, true);
669
3.78k
    _operator_profile->add_child(_custom_profile, true);
670
671
3.78k
    _operator_profile->set_metadata(_parent->node_id());
672
3.78k
    _wait_for_finish_dependency_timer =
673
3.78k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
3.78k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
3.78k
    if constexpr (!is_fake_shared) {
676
3.78k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
3.78k
            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
3.78k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
3.78k
            _shared_state = info.shared_state->template cast<SharedState>();
692
3.78k
            _dependency = _shared_state->create_sink_dependency(
693
3.78k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
3.78k
        }
695
3.78k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
3.78k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
3.78k
    }
698
699
3.78k
    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
3.78k
    _rows_input_counter =
704
3.78k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
3.78k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
3.78k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
3.78k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
3.78k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
3.78k
    _memory_used_counter =
710
3.78k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
3.78k
    _common_profile->add_info_string("IsColocate",
712
3.78k
                                     std::to_string(_parent->is_colocated_operator()));
713
3.78k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
3.78k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
3.78k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
3.78k
    return Status::OK();
717
3.78k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
12.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
12.0k
    _operator_profile =
660
12.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
12.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
12.0k
    _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
12.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
12.0k
    _operator_profile->add_child(_common_profile, true);
669
12.0k
    _operator_profile->add_child(_custom_profile, true);
670
671
12.0k
    _operator_profile->set_metadata(_parent->node_id());
672
12.0k
    _wait_for_finish_dependency_timer =
673
12.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
12.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
12.0k
    if constexpr (!is_fake_shared) {
676
12.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
12.0k
            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
12.0k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
12.0k
            _shared_state = info.shared_state->template cast<SharedState>();
692
12.0k
            _dependency = _shared_state->create_sink_dependency(
693
12.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
12.0k
        }
695
12.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
12.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
12.0k
    }
698
699
12.0k
    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
12.0k
    _rows_input_counter =
704
12.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
12.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
12.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
12.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
12.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
12.0k
    _memory_used_counter =
710
12.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
12.0k
    _common_profile->add_info_string("IsColocate",
712
12.0k
                                     std::to_string(_parent->is_colocated_operator()));
713
12.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
12.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
12.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
12.0k
    return Status::OK();
717
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
292k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
292k
    _operator_profile =
660
292k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
292k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
292k
    _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
292k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
292k
    _operator_profile->add_child(_common_profile, true);
669
292k
    _operator_profile->add_child(_custom_profile, true);
670
671
292k
    _operator_profile->set_metadata(_parent->node_id());
672
292k
    _wait_for_finish_dependency_timer =
673
292k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
292k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
292k
    if constexpr (!is_fake_shared) {
676
292k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
292k
            info.shared_state_map.end()) {
678
292k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
292k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
292k
            }
681
292k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
292k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
292k
                                                  ? 0
684
292k
                                                  : info.task_idx]
685
292k
                                  .get();
686
292k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
292k
        } else {
688
183
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
183
                DCHECK(false);
690
183
            }
691
183
            _shared_state = info.shared_state->template cast<SharedState>();
692
183
            _dependency = _shared_state->create_sink_dependency(
693
183
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
183
        }
695
292k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
292k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
292k
    }
698
699
292k
    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
292k
    _rows_input_counter =
704
292k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
292k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
292k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
292k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
292k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
292k
    _memory_used_counter =
710
292k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
292k
    _common_profile->add_info_string("IsColocate",
712
292k
                                     std::to_string(_parent->is_colocated_operator()));
713
292k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
292k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
292k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
292k
    return Status::OK();
717
292k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
510k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
510k
    _operator_profile =
660
510k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
510k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
510k
    _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
510k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
510k
    _operator_profile->add_child(_common_profile, true);
669
510k
    _operator_profile->add_child(_custom_profile, true);
670
671
510k
    _operator_profile->set_metadata(_parent->node_id());
672
510k
    _wait_for_finish_dependency_timer =
673
510k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
510k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
510k
    if constexpr (!is_fake_shared) {
676
510k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
510k
            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
510k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
510k
            _shared_state = info.shared_state->template cast<SharedState>();
692
510k
            _dependency = _shared_state->create_sink_dependency(
693
510k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
510k
        }
695
510k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
510k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
510k
    }
698
699
510k
    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
510k
    _rows_input_counter =
704
510k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
510k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
510k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
510k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
510k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
510k
    _memory_used_counter =
710
510k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
510k
    _common_profile->add_info_string("IsColocate",
712
510k
                                     std::to_string(_parent->is_colocated_operator()));
713
510k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
510k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
510k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
510k
    return Status::OK();
717
510k
}
_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
2.06M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
2.06M
    if (_closed) {
722
2
        return Status::OK();
723
2
    }
724
2.06M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
1.36M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
1.36M
    }
727
2.06M
    _closed = true;
728
2.06M
    return Status::OK();
729
2.06M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
114k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
114k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
114k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
114k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
114k
    }
727
114k
    _closed = true;
728
114k
    return Status::OK();
729
114k
}
_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
254k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
254k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
254k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
254k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
254k
    }
727
254k
    _closed = true;
728
254k
    return Status::OK();
729
254k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
35
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
35
    if (_closed) {
722
2
        return Status::OK();
723
2
    }
724
33
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
33
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
33
    }
727
33
    _closed = true;
728
33
    return Status::OK();
729
35
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
9.86k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
9.86k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
9.86k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
9.86k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
9.86k
    }
727
9.86k
    _closed = true;
728
9.86k
    return Status::OK();
729
9.86k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
6.37k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
6.37k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
6.37k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
6.37k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
6.37k
    }
727
6.37k
    _closed = true;
728
6.37k
    return Status::OK();
729
6.37k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
150k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
150k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
150k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
150k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
150k
    }
727
150k
    _closed = true;
728
150k
    return Status::OK();
729
150k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
244
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
244
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
244
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
244
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
244
    }
727
244
    _closed = true;
728
244
    return Status::OK();
729
244
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
187
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
187
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
187
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
187
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
187
    }
727
187
    _closed = true;
728
187
    return Status::OK();
729
187
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
695k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
695k
    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
695k
    _closed = true;
728
695k
    return Status::OK();
729
695k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
5.78k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
5.78k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
5.78k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
5.78k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
5.78k
    }
727
5.78k
    _closed = true;
728
5.78k
    return Status::OK();
729
5.78k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
317
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
317
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
317
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
317
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
317
    }
727
317
    _closed = true;
728
317
    return Status::OK();
729
317
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
3.79k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
3.79k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
3.79k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
3.79k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
3.79k
    }
727
3.79k
    _closed = true;
728
3.79k
    return Status::OK();
729
3.79k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
12.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
12.1k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
12.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
12.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
12.1k
    }
727
12.1k
    _closed = true;
728
12.1k
    return Status::OK();
729
12.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
293k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
293k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
293k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
293k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
293k
    }
727
293k
    _closed = true;
728
293k
    return Status::OK();
729
293k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
513k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
513k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
513k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
513k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
513k
    }
727
513k
    _closed = true;
728
513k
    return Status::OK();
729
513k
}
_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
11.9k
                                                          bool* eos) {
734
11.9k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
735
11.9k
    return pull(state, block, eos);
736
11.9k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
733
432
                                                          bool* eos) {
734
432
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
735
432
    return pull(state, block, eos);
736
432
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
733
11.5k
                                                          bool* eos) {
734
11.5k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
735
11.5k
    return pull(state, block, eos);
736
11.5k
}
737
738
template <typename LocalStateType>
739
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
740
724k
                                                         bool* eos) {
741
724k
    auto& local_state = get_local_state(state);
742
724k
    if (need_more_input_data(state)) {
743
699k
        local_state._child_block->clear_column_data(
744
699k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
699k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
699k
                state, local_state._child_block.get(), &local_state._child_eos));
747
699k
        *eos = local_state._child_eos;
748
699k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
64.4k
            return Status::OK();
750
64.4k
        }
751
635k
        {
752
635k
            SCOPED_TIMER(local_state.exec_time_counter());
753
635k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
635k
        }
755
635k
    }
756
757
659k
    if (!need_more_input_data(state)) {
758
609k
        SCOPED_TIMER(local_state.exec_time_counter());
759
609k
        bool new_eos = false;
760
609k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
609k
        if (new_eos) {
762
536k
            *eos = true;
763
536k
        } else if (!need_more_input_data(state)) {
764
19.6k
            *eos = false;
765
19.6k
        }
766
609k
    }
767
659k
    return Status::OK();
768
659k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
126k
                                                         bool* eos) {
741
126k
    auto& local_state = get_local_state(state);
742
126k
    if (need_more_input_data(state)) {
743
113k
        local_state._child_block->clear_column_data(
744
113k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
113k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
113k
                state, local_state._child_block.get(), &local_state._child_eos));
747
113k
        *eos = local_state._child_eos;
748
113k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
33.4k
            return Status::OK();
750
33.4k
        }
751
79.8k
        {
752
79.8k
            SCOPED_TIMER(local_state.exec_time_counter());
753
79.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
79.8k
        }
755
79.8k
    }
756
757
93.1k
    if (!need_more_input_data(state)) {
758
93.1k
        SCOPED_TIMER(local_state.exec_time_counter());
759
93.1k
        bool new_eos = false;
760
93.1k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
93.1k
        if (new_eos) {
762
42.1k
            *eos = true;
763
51.0k
        } else if (!need_more_input_data(state)) {
764
7.28k
            *eos = false;
765
7.28k
        }
766
93.1k
    }
767
93.1k
    return Status::OK();
768
93.1k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
3.39k
                                                         bool* eos) {
741
3.39k
    auto& local_state = get_local_state(state);
742
3.39k
    if (need_more_input_data(state)) {
743
2.17k
        local_state._child_block->clear_column_data(
744
2.17k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
2.17k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
2.17k
                state, local_state._child_block.get(), &local_state._child_eos));
747
2.17k
        *eos = local_state._child_eos;
748
2.17k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
361
            return Status::OK();
750
361
        }
751
1.81k
        {
752
1.81k
            SCOPED_TIMER(local_state.exec_time_counter());
753
1.81k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
1.81k
        }
755
1.81k
    }
756
757
3.04k
    if (!need_more_input_data(state)) {
758
3.04k
        SCOPED_TIMER(local_state.exec_time_counter());
759
3.04k
        bool new_eos = false;
760
3.04k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
3.04k
        if (new_eos) {
762
1.45k
            *eos = true;
763
1.58k
        } else if (!need_more_input_data(state)) {
764
1.22k
            *eos = false;
765
1.22k
        }
766
3.04k
    }
767
3.03k
    return Status::OK();
768
3.03k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
4.77k
                                                         bool* eos) {
741
4.77k
    auto& local_state = get_local_state(state);
742
4.77k
    if (need_more_input_data(state)) {
743
4.77k
        local_state._child_block->clear_column_data(
744
4.77k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
4.77k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
4.77k
                state, local_state._child_block.get(), &local_state._child_eos));
747
4.77k
        *eos = local_state._child_eos;
748
4.77k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
1.62k
            return Status::OK();
750
1.62k
        }
751
3.15k
        {
752
3.15k
            SCOPED_TIMER(local_state.exec_time_counter());
753
3.15k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
3.15k
        }
755
3.15k
    }
756
757
3.15k
    if (!need_more_input_data(state)) {
758
3.15k
        SCOPED_TIMER(local_state.exec_time_counter());
759
3.15k
        bool new_eos = false;
760
3.15k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
3.15k
        if (new_eos) {
762
1.64k
            *eos = true;
763
1.64k
        } else if (!need_more_input_data(state)) {
764
0
            *eos = false;
765
0
        }
766
3.15k
    }
767
3.15k
    return Status::OK();
768
3.15k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
34.3k
                                                         bool* eos) {
741
34.3k
    auto& local_state = get_local_state(state);
742
34.3k
    if (need_more_input_data(state)) {
743
34.3k
        local_state._child_block->clear_column_data(
744
34.3k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
34.3k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
34.3k
                state, local_state._child_block.get(), &local_state._child_eos));
747
34.3k
        *eos = local_state._child_eos;
748
34.3k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
4.21k
            return Status::OK();
750
4.21k
        }
751
30.1k
        {
752
30.1k
            SCOPED_TIMER(local_state.exec_time_counter());
753
30.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
30.1k
        }
755
30.1k
    }
756
757
30.1k
    if (!need_more_input_data(state)) {
758
12.6k
        SCOPED_TIMER(local_state.exec_time_counter());
759
12.6k
        bool new_eos = false;
760
12.6k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
12.6k
        if (new_eos) {
762
12.4k
            *eos = true;
763
12.4k
        } else if (!need_more_input_data(state)) {
764
13
            *eos = false;
765
13
        }
766
12.6k
    }
767
30.1k
    return Status::OK();
768
30.1k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
520k
                                                         bool* eos) {
741
520k
    auto& local_state = get_local_state(state);
742
521k
    if (need_more_input_data(state)) {
743
521k
        local_state._child_block->clear_column_data(
744
521k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
521k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
521k
                state, local_state._child_block.get(), &local_state._child_eos));
747
521k
        *eos = local_state._child_eos;
748
521k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
21.6k
            return Status::OK();
750
21.6k
        }
751
499k
        {
752
499k
            SCOPED_TIMER(local_state.exec_time_counter());
753
499k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
499k
        }
755
499k
    }
756
757
498k
    if (!need_more_input_data(state)) {
758
466k
        SCOPED_TIMER(local_state.exec_time_counter());
759
466k
        bool new_eos = false;
760
466k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
466k
        if (new_eos) {
762
465k
            *eos = true;
763
465k
        } else if (!need_more_input_data(state)) {
764
0
            *eos = false;
765
0
        }
766
466k
    }
767
498k
    return Status::OK();
768
498k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
28.3k
                                                         bool* eos) {
741
28.3k
    auto& local_state = get_local_state(state);
742
28.3k
    if (need_more_input_data(state)) {
743
17.5k
        local_state._child_block->clear_column_data(
744
17.5k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
17.5k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
17.5k
                state, local_state._child_block.get(), &local_state._child_eos));
747
17.5k
        *eos = local_state._child_eos;
748
17.5k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
2.69k
            return Status::OK();
750
2.69k
        }
751
14.8k
        {
752
14.8k
            SCOPED_TIMER(local_state.exec_time_counter());
753
14.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
14.8k
        }
755
14.8k
    }
756
757
25.6k
    if (!need_more_input_data(state)) {
758
25.1k
        SCOPED_TIMER(local_state.exec_time_counter());
759
25.1k
        bool new_eos = false;
760
25.1k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
25.1k
        if (new_eos) {
762
9.84k
            *eos = true;
763
15.2k
        } else if (!need_more_input_data(state)) {
764
10.7k
            *eos = false;
765
10.7k
        }
766
25.1k
    }
767
25.6k
    return Status::OK();
768
25.6k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
6.68k
                                                         bool* eos) {
741
6.68k
    auto& local_state = get_local_state(state);
742
6.68k
    if (need_more_input_data(state)) {
743
6.33k
        local_state._child_block->clear_column_data(
744
6.33k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
6.33k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
6.33k
                state, local_state._child_block.get(), &local_state._child_eos));
747
6.33k
        *eos = local_state._child_eos;
748
6.33k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
548
            return Status::OK();
750
548
        }
751
5.78k
        {
752
5.78k
            SCOPED_TIMER(local_state.exec_time_counter());
753
5.78k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
5.78k
        }
755
5.78k
    }
756
757
6.14k
    if (!need_more_input_data(state)) {
758
6.14k
        SCOPED_TIMER(local_state.exec_time_counter());
759
6.14k
        bool new_eos = false;
760
6.14k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
6.14k
        if (new_eos) {
762
4.03k
            *eos = true;
763
4.03k
        } else if (!need_more_input_data(state)) {
764
366
            *eos = false;
765
366
        }
766
6.14k
    }
767
6.13k
    return Status::OK();
768
6.13k
}
769
770
template <typename Writer, typename Parent>
771
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
772
64.3k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
64.3k
    RETURN_IF_ERROR(Base::init(state, info));
774
64.3k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
64.3k
                                                         "AsyncWriterDependency", true);
776
64.3k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
64.3k
                             _finish_dependency));
778
779
64.3k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
64.3k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
64.3k
    return Status::OK();
782
64.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
539
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
539
    RETURN_IF_ERROR(Base::init(state, info));
774
539
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
539
                                                         "AsyncWriterDependency", true);
776
539
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
539
                             _finish_dependency));
778
779
539
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
539
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
539
    return Status::OK();
782
539
}
_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.1k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
45.1k
    RETURN_IF_ERROR(Base::init(state, info));
774
45.1k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
45.1k
                                                         "AsyncWriterDependency", true);
776
45.1k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
45.1k
                             _finish_dependency));
778
779
45.1k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
45.1k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
45.1k
    return Status::OK();
782
45.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
9.06k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
9.06k
    RETURN_IF_ERROR(Base::init(state, info));
774
9.06k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
9.06k
                                                         "AsyncWriterDependency", true);
776
9.06k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
9.06k
                             _finish_dependency));
778
779
9.06k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
9.06k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
9.06k
    return Status::OK();
782
9.06k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
5.16k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
5.16k
    RETURN_IF_ERROR(Base::init(state, info));
774
5.16k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
5.16k
                                                         "AsyncWriterDependency", true);
776
5.16k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
5.16k
                             _finish_dependency));
778
779
5.16k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
5.16k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
5.16k
    return Status::OK();
782
5.16k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
3.38k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
3.38k
    RETURN_IF_ERROR(Base::init(state, info));
774
3.38k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
3.38k
                                                         "AsyncWriterDependency", true);
776
3.38k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
3.38k
                             _finish_dependency));
778
779
3.38k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
3.38k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
3.38k
    return Status::OK();
782
3.38k
}
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.7k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
64.7k
    RETURN_IF_ERROR(Base::open(state));
788
64.7k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
577k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
513k
        RETURN_IF_ERROR(
791
513k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
513k
    }
793
64.7k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
64.7k
    return Status::OK();
795
64.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
541
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
541
    RETURN_IF_ERROR(Base::open(state));
788
541
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
2.85k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
2.30k
        RETURN_IF_ERROR(
791
2.30k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
2.30k
    }
793
541
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
541
    return Status::OK();
795
541
}
_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.5k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
45.5k
    RETURN_IF_ERROR(Base::open(state));
788
45.5k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
333k
    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.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
45.5k
    return Status::OK();
795
45.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
9.00k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
9.00k
    RETURN_IF_ERROR(Base::open(state));
788
9.00k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
57.0k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
47.9k
        RETURN_IF_ERROR(
791
47.9k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
47.9k
    }
793
9.00k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
9.00k
    return Status::OK();
795
9.00k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
5.16k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
5.16k
    RETURN_IF_ERROR(Base::open(state));
788
5.16k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
136k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
131k
        RETURN_IF_ERROR(
791
131k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
131k
    }
793
5.16k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
5.16k
    return Status::OK();
795
5.16k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
3.38k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
3.38k
    RETURN_IF_ERROR(Base::open(state));
788
3.38k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
42.0k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
38.6k
        RETURN_IF_ERROR(
791
38.6k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
38.6k
    }
793
3.38k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
3.38k
    return Status::OK();
795
3.38k
}
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
478
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
318
        RETURN_IF_ERROR(
791
318
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
318
    }
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
638
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
638
    RETURN_IF_ERROR(Base::open(state));
788
638
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
4.39k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
3.75k
        RETURN_IF_ERROR(
791
3.75k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
3.75k
    }
793
638
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
638
    return Status::OK();
795
638
}
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
88.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
88.1k
    return _writer->sink(block, eos);
801
88.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
2.02k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
2.02k
    return _writer->sink(block, eos);
801
2.02k
}
_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
61.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
61.3k
    return _writer->sink(block, eos);
801
61.3k
}
_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.53k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
7.53k
    return _writer->sink(block, eos);
801
7.53k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
5.35k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
5.35k
    return _writer->sink(block, eos);
801
5.35k
}
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
788
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
788
    return _writer->sink(block, eos);
801
788
}
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.8k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
64.8k
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
64.8k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
64.8k
    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.9k
    if (_writer) {
813
64.9k
        Status st = _writer->get_writer_status();
814
64.9k
        if (exec_status.ok()) {
815
64.7k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
64.7k
                                                       : Status::Cancelled("force close"));
817
64.7k
        } else {
818
133
            _writer->force_close(exec_status);
819
133
        }
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.9k
        RETURN_IF_ERROR(st);
824
64.9k
    }
825
64.8k
    return Base::close(state, exec_status);
826
64.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
530
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
530
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
530
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
530
    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
530
    if (_writer) {
813
530
        Status st = _writer->get_writer_status();
814
530
        if (exec_status.ok()) {
815
530
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
530
                                                       : Status::Cancelled("force close"));
817
530
        } 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
530
        RETURN_IF_ERROR(st);
824
530
    }
825
530
    return Base::close(state, exec_status);
826
530
}
_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.6k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
45.6k
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
45.6k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
45.6k
    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.7k
    if (_writer) {
813
45.7k
        Status st = _writer->get_writer_status();
814
45.7k
        if (exec_status.ok()) {
815
45.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
45.6k
                                                       : Status::Cancelled("force close"));
817
45.6k
        } else {
818
65
            _writer->force_close(exec_status);
819
65
        }
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.7k
        RETURN_IF_ERROR(st);
824
45.7k
    }
825
45.6k
    return Base::close(state, exec_status);
826
45.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
9.06k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
9.06k
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
9.06k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
9.06k
    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.06k
    if (_writer) {
813
9.06k
        Status st = _writer->get_writer_status();
814
9.06k
        if (exec_status.ok()) {
815
8.99k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
8.99k
                                                       : Status::Cancelled("force close"));
817
8.99k
        } else {
818
68
            _writer->force_close(exec_status);
819
68
        }
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.06k
        RETURN_IF_ERROR(st);
824
9.06k
    }
825
9.06k
    return Base::close(state, exec_status);
826
9.06k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
5.16k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
5.16k
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
5.16k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
5.16k
    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.16k
    if (_writer) {
813
5.16k
        Status st = _writer->get_writer_status();
814
5.16k
        if (exec_status.ok()) {
815
5.16k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
5.16k
                                                       : Status::Cancelled("force close"));
817
5.16k
        } 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
5.16k
        RETURN_IF_ERROR(st);
824
5.16k
    }
825
5.16k
    return Base::close(state, exec_status);
826
5.16k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
3.38k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
3.38k
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
3.38k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
3.38k
    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.38k
    return Base::close(state, exec_status);
826
3.38k
}
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