Coverage Report

Created: 2026-07-18 09:58

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