Coverage Report

Created: 2026-11-05 22:49

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