Coverage Report

Created: 2026-10-30 11:52

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.69M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.69M
    if (_parent->nereids_id() == -1) {
123
872k
        return fmt::format("(id={})", _parent->node_id());
124
872k
    } else {
125
825k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
825k
    }
127
1.69M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
69.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
69.1k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
69.1k
    } else {
125
69.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
69.1k
    }
127
69.1k
}
_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
246k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
246k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
246k
    } else {
125
246k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
246k
    }
127
246k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
157
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
157
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
157
    } else {
125
157
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
157
    }
127
157
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.40k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.40k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
5.40k
    } else {
125
5.40k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.40k
    }
127
5.40k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
9.79k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
9.79k
    if (_parent->nereids_id() == -1) {
123
60
        return fmt::format("(id={})", _parent->node_id());
124
9.73k
    } else {
125
9.73k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
9.73k
    }
127
9.79k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
98.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
98.7k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
98.6k
    } else {
125
98.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
98.6k
    }
127
98.7k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
70.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
70.6k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
70.6k
    } else {
125
70.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
70.6k
    }
127
70.6k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
125
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
125
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
125
    } else {
125
125
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
125
    }
127
125
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
524k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
524k
    if (_parent->nereids_id() == -1) {
123
260k
        return fmt::format("(id={})", _parent->node_id());
124
263k
    } else {
125
263k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
263k
    }
127
524k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
56.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
56.8k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
56.7k
    } else {
125
56.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
56.7k
    }
127
56.8k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
26
    if (_parent->nereids_id() == -1) {
123
26
        return fmt::format("(id={})", _parent->node_id());
124
26
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4.19k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4.19k
    if (_parent->nereids_id() == -1) {
123
4.19k
        return fmt::format("(id={})", _parent->node_id());
124
4.19k
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
4.19k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
381
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
381
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
279
    } else {
125
279
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
279
    }
127
381
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.26k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.26k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.25k
    } else {
125
5.25k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.25k
    }
127
5.26k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
605k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
607k
    if (_parent->nereids_id() == -1) {
123
607k
        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
605k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
169
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
169
    } else {
125
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
169
    }
127
169
}
128
129
template <typename SharedStateArg>
130
1.19M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.19M
    if (_parent->nereids_id() == -1) {
132
630k
        return fmt::format("(id={})", _parent->node_id());
133
630k
    } else {
134
562k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
562k
    }
136
1.19M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
117k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
117k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
117k
    } else {
134
117k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
117k
    }
136
117k
}
_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
248k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
248k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
248k
    } else {
134
248k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
248k
    }
136
248k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
164
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
164
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
164
    } else {
134
164
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
164
    }
136
164
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5.39k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5.39k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
5.39k
    } else {
134
5.39k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
5.39k
    }
136
5.39k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.87k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.87k
    if (_parent->nereids_id() == -1) {
132
60
        return fmt::format("(id={})", _parent->node_id());
133
9.81k
    } else {
134
9.81k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.81k
    }
136
9.87k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
99.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
99.0k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
98.9k
    } else {
134
98.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
98.9k
    }
136
99.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
70.4k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
70.4k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
70.4k
    } else {
134
70.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
70.4k
    }
136
70.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
135
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
135
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
135
    } else {
134
135
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
135
    }
136
135
}
_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
12.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12.0k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
12.0k
    } else {
134
12.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
12.0k
    }
136
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
381
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
381
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
279
    } else {
134
279
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
279
    }
136
381
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
12.7k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12.7k
    if (_parent->nereids_id() == -1) {
132
12.7k
        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.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
217k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
217k
    if (_parent->nereids_id() == -1) {
132
217k
        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
217k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
399k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
399k
    if (_parent->nereids_id() == -1) {
132
399k
        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
399k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
25
    if (_parent->nereids_id() == -1) {
132
25
        return fmt::format("(id={})", _parent->node_id());
133
25
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
338
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
338
    } else {
134
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
338
    }
136
338
}
137
138
template <typename SharedStateArg>
139
32.4k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
32.4k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
32.4k
    _terminated = true;
144
32.4k
    return Status::OK();
145
32.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
2.59k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.59k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.59k
    _terminated = true;
144
2.59k
    return Status::OK();
145
2.59k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
6
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
6
    _terminated = true;
144
6
    return Status::OK();
145
6
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.76k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.76k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.76k
    _terminated = true;
144
1.76k
    return Status::OK();
145
1.76k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.50k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.50k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.50k
    _terminated = true;
144
2.50k
    return Status::OK();
145
2.50k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
331
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
331
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
331
    _terminated = true;
144
331
    return Status::OK();
145
331
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
443
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
443
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
443
    _terminated = true;
144
443
    return Status::OK();
145
443
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
6
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
6
    _terminated = true;
144
6
    return Status::OK();
145
6
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
78
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
78
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
78
    _terminated = true;
144
78
    return Status::OK();
145
78
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3
    _terminated = true;
144
3
    return Status::OK();
145
3
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
534
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
534
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
534
    _terminated = true;
144
534
    return Status::OK();
145
534
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
130
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
130
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
130
    _terminated = true;
144
130
    return Status::OK();
145
130
}
146
147
303k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
303k
    return _child && _child->is_serial_operator() && !is_source()
149
303k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
303k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
303k
}
152
153
19.4k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
19.4k
    if (!_child) {
155
18.6k
        return false;
156
18.6k
    }
157
815
    if (_child->is_serial_operator()) {
158
29
        return true;
159
29
    }
160
786
    const auto child_distribution = _child->required_data_distribution(state);
161
786
    return child_distribution.need_local_exchange() &&
162
786
           !is_shuffled_exchange(child_distribution.distribution_type);
163
815
}
164
165
template <typename SharedStateArg>
166
13.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
13.4k
    fmt::memory_buffer debug_string_buffer;
168
13.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
13.4k
    return fmt::to_string(debug_string_buffer);
170
13.4k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
16
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16
    fmt::memory_buffer debug_string_buffer;
168
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16
    return fmt::to_string(debug_string_buffer);
170
16
}
_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
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
33
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
33
    fmt::memory_buffer debug_string_buffer;
168
33
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
33
    return fmt::to_string(debug_string_buffer);
170
33
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
13.3k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
13.3k
    fmt::memory_buffer debug_string_buffer;
168
13.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
13.3k
    return fmt::to_string(debug_string_buffer);
170
13.3k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
1
    fmt::memory_buffer debug_string_buffer;
168
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
1
    return fmt::to_string(debug_string_buffer);
170
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
32
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
32
    fmt::memory_buffer debug_string_buffer;
168
32
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
32
    return fmt::to_string(debug_string_buffer);
170
32
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
13.3k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
13.3k
    fmt::memory_buffer debug_string_buffer;
175
13.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
13.3k
    return fmt::to_string(debug_string_buffer);
177
13.3k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
33
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
33
    fmt::memory_buffer debug_string_buffer;
175
33
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
33
    return fmt::to_string(debug_string_buffer);
177
33
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
32
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
32
    fmt::memory_buffer debug_string_buffer;
175
32
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
32
    return fmt::to_string(debug_string_buffer);
177
32
}
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
17
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
17
    fmt::memory_buffer debug_string_buffer;
175
17
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
17
    return fmt::to_string(debug_string_buffer);
177
17
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
13.2k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
13.2k
    fmt::memory_buffer debug_string_buffer;
175
13.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
13.2k
    return fmt::to_string(debug_string_buffer);
177
13.2k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
13.4k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
13.4k
    fmt::memory_buffer debug_string_buffer;
181
13.4k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
13.4k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
13.4k
                   _is_serial_operator);
184
13.4k
    return fmt::to_string(debug_string_buffer);
185
13.4k
}
186
187
13.3k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
13.3k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
13.3k
}
190
191
683k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
683k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
683k
    _nereids_id = tnode.nereids_id;
194
683k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.79k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.79k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.79k
            tnode.intermediate_projections_list.size()) {
200
0
            return Status::InternalError(
201
0
                    "intermediate_output_tuple_id_list size:{} not match "
202
0
                    "intermediate_projections_list size:{}",
203
0
                    tnode.intermediate_output_tuple_id_list.size(),
204
0
                    tnode.intermediate_projections_list.size());
205
0
        }
206
6.79k
    }
207
683k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
683k
    _op_name = substr + "_OPERATOR";
209
210
683k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
683k
    } else if (tnode.__isset.conjuncts) {
213
284k
        for (const auto& conjunct : tnode.conjuncts) {
214
284k
            VExprContextSPtr context;
215
284k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
284k
            _conjuncts.emplace_back(context);
217
284k
        }
218
106k
    }
219
220
    // create the projections expr
221
683k
    if (tnode.__isset.projections) {
222
276k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
276k
    }
224
683k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.79k
        DCHECK(has_projection()) << "no final projections";
226
6.79k
        _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.79k
    }
233
683k
    return Status::OK();
234
683k
}
235
236
709k
Status OperatorXBase::prepare(RuntimeState* state) {
237
709k
    for (auto& conjunct : _conjuncts) {
238
284k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
284k
    }
240
709k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
659k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
346k
            return a->execute_cost() < b->execute_cost();
243
346k
        });
244
659k
    };
245
246
709k
    if (has_projection()) {
247
276k
        auto& projection = *_projection;
248
288k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
12.2k
            const auto& input_row_desc =
250
12.2k
                    i == 0 ? operator_row_desc_before_projection()
251
12.2k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
12.2k
            RETURN_IF_ERROR(
253
12.2k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
12.2k
        }
255
276k
        const auto& final_projection_input_row_desc =
256
276k
                projection.intermediate_output_row_descriptors.empty()
257
276k
                        ? operator_row_desc_before_projection()
258
276k
                        : projection.intermediate_output_row_descriptors.back();
259
276k
        RETURN_IF_ERROR(
260
276k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
276k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
276k
                                                      projection.output_row_descriptor));
263
276k
    }
264
265
709k
    for (auto& conjunct : _conjuncts) {
266
284k
        RETURN_IF_ERROR(conjunct->open(state));
267
284k
    }
268
709k
    if (has_projection()) {
269
275k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
275k
        for (auto& projections : _projection->intermediate_projections) {
271
12.2k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
12.2k
        }
273
275k
    }
274
709k
    if (_child && !is_source()) {
275
88.0k
        RETURN_IF_ERROR(_child->prepare(state));
276
88.0k
    }
277
278
709k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
709k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
709k
    return Status::OK();
284
709k
}
285
286
8.96k
Status OperatorXBase::terminate(RuntimeState* state) {
287
8.96k
    if (_child && !is_source()) {
288
547
        RETURN_IF_ERROR(_child->terminate(state));
289
547
    }
290
8.96k
    auto result = state->get_local_state_result(operator_id());
291
8.96k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
8.96k
    return result.value()->terminate(state);
295
8.96k
}
296
297
4.52M
Status OperatorXBase::close(RuntimeState* state) {
298
4.52M
    if (_child && !is_source()) {
299
651k
        RETURN_IF_ERROR(_child->close(state));
300
651k
    }
301
4.52M
    auto result = state->get_local_state_result(operator_id());
302
4.52M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
4.52M
    return result.value()->close(state);
306
4.52M
}
307
308
293k
void PipelineXLocalStateBase::clear_origin_block() {
309
293k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
293k
}
311
312
647k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
647k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
647k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
647k
    return Status::OK();
317
647k
}
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
293k
                                     Block* output_block) const {
326
293k
    auto* local_state = state->get_local_state(operator_id());
327
293k
    SCOPED_TIMER(local_state->exec_time_counter());
328
293k
    SCOPED_TIMER(local_state->_projection_timer);
329
293k
    const size_t rows = origin_block->rows();
330
293k
    if (rows == 0) {
331
149k
        return Status::OK();
332
149k
    }
333
144k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
144k
    {
336
144k
        Block input_block = *origin_block;
337
338
144k
        ColumnsWithTypeAndName new_columns;
339
144k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.37k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.37k
            new_columns.resize(projections.size());
345
125k
            for (int i = 0; i < projections.size(); i++) {
346
119k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
119k
                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
119k
            }
355
5.36k
            Block tmp_block {new_columns};
356
5.36k
            input_block.swap(tmp_block);
357
5.36k
        }
358
359
144k
        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
144k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
144k
                output_block, _projection->output_row_descriptor);
368
144k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
144k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
144k
        Columns shared_columns(mutable_columns.size());
371
372
816k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
672k
            ColumnPtr column_ptr;
374
672k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
672k
            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
672k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
672k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
672k
            if (column_ptr->is_exclusive()) {
386
240k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
432k
            } else {
388
432k
                shared_columns[i] = std::move(column_ptr);
389
432k
            }
390
672k
        }
391
392
144k
        scoped_mutable_block.restore();
393
816k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
672k
            if (shared_columns[i]) {
395
432k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
432k
            }
397
672k
        }
398
144k
    }
399
400
0
    origin_block->clear_column_data(
401
144k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
144k
    DCHECK_EQ(output_block->rows(), rows);
403
404
144k
    return Status::OK();
405
144k
}
406
407
3.97M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
3.97M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
3.97M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
3.97M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
3.97M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
3.97M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
3.97M
            if (_debug_point_count++ % 2 == 0) {
414
3.97M
                return Status::OK();
415
3.97M
            }
416
3.97M
        }
417
3.97M
    });
418
419
3.97M
    Status status;
420
3.97M
    auto* local_state = state->get_local_state(operator_id());
421
3.97M
    Defer defer([&]() {
422
3.97M
        if (status.ok()) {
423
3.97M
            local_state->update_output_block_counters(*block);
424
3.97M
        }
425
3.97M
    });
426
3.97M
    if (has_projection()) {
427
293k
        local_state->clear_origin_block();
428
293k
        status = get_block(state, &local_state->_origin_block, eos);
429
293k
        if (UNLIKELY(!status.ok())) {
430
42
            return status;
431
42
        }
432
293k
        status = do_projections(state, &local_state->_origin_block, block);
433
293k
        return status;
434
293k
    }
435
3.68M
    status = get_block(state, block, eos);
436
3.68M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.68M
    return status;
438
3.68M
}
439
440
2.73M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.73M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
10.0k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
10.0k
        *eos = true;
444
10.0k
    }
445
446
2.73M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.73M
        auto op_name = to_lower(_parent->_op_name);
448
2.73M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.73M
        arg_op_name = to_lower(arg_op_name);
450
451
2.73M
        if (op_name == arg_op_name) {
452
2.73M
            *eos = true;
453
2.73M
        }
454
2.73M
    });
455
456
2.73M
    if (auto rows = block->rows()) {
457
825k
        _num_rows_returned += rows;
458
825k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
825k
    }
460
2.73M
}
461
462
32.4k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
32.4k
    auto result = state->get_sink_local_state_result();
464
32.4k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
32.4k
    return result.value()->terminate(state);
468
32.4k
}
469
470
13.3k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
13.3k
    fmt::memory_buffer debug_string_buffer;
472
473
13.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
13.3k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
13.3k
    return fmt::to_string(debug_string_buffer);
476
13.3k
}
477
478
13.3k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
13.3k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
13.3k
}
481
482
360k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
360k
    std::string op_name = "UNKNOWN_SINK";
484
360k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
360k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
360k
        op_name = it->second;
488
360k
    }
489
360k
    _name = op_name + "_OPERATOR";
490
360k
    return Status::OK();
491
360k
}
492
493
307k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
307k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
307k
    _nereids_id = tnode.nereids_id;
496
307k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
307k
    _name = substr + "_SINK_OPERATOR";
498
307k
    return Status::OK();
499
307k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.70M
                                                            LocalSinkStateInfo& info) {
504
1.70M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.70M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.70M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.70M
    return Status::OK();
508
1.70M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
117k
                                                            LocalSinkStateInfo& info) {
504
117k
    auto local_state = LocalStateType::create_unique(this, state);
505
117k
    RETURN_IF_ERROR(local_state->init(state, info));
506
117k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
117k
    return Status::OK();
508
117k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
350k
                                                            LocalSinkStateInfo& info) {
504
350k
    auto local_state = LocalStateType::create_unique(this, state);
505
350k
    RETURN_IF_ERROR(local_state->init(state, info));
506
350k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
350k
    return Status::OK();
508
350k
}
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
365
                                                            LocalSinkStateInfo& info) {
504
365
    auto local_state = LocalStateType::create_unique(this, state);
505
365
    RETURN_IF_ERROR(local_state->init(state, info));
506
365
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
365
    return Status::OK();
508
365
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
49.4k
                                                            LocalSinkStateInfo& info) {
504
49.4k
    auto local_state = LocalStateType::create_unique(this, state);
505
49.4k
    RETURN_IF_ERROR(local_state->init(state, info));
506
49.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
49.4k
    return Status::OK();
508
49.4k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_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
}
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.76k
                                                            LocalSinkStateInfo& info) {
504
9.76k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.76k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.76k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.76k
    return Status::OK();
508
9.76k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
12
                                                            LocalSinkStateInfo& info) {
504
12
    auto local_state = LocalStateType::create_unique(this, state);
505
12
    RETURN_IF_ERROR(local_state->init(state, info));
506
12
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
12
    return Status::OK();
508
12
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
248k
                                                            LocalSinkStateInfo& info) {
504
248k
    auto local_state = LocalStateType::create_unique(this, state);
505
248k
    RETURN_IF_ERROR(local_state->init(state, info));
506
248k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
248k
    return Status::OK();
508
248k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
164
                                                            LocalSinkStateInfo& info) {
504
164
    auto local_state = LocalStateType::create_unique(this, state);
505
164
    RETURN_IF_ERROR(local_state->init(state, info));
506
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
164
    return Status::OK();
508
164
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
217k
                                                            LocalSinkStateInfo& info) {
504
217k
    auto local_state = LocalStateType::create_unique(this, state);
505
217k
    RETURN_IF_ERROR(local_state->init(state, info));
506
217k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
217k
    return Status::OK();
508
217k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
98.9k
                                                            LocalSinkStateInfo& info) {
504
98.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
98.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
98.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
98.9k
    return Status::OK();
508
98.9k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
70.4k
                                                            LocalSinkStateInfo& info) {
504
70.4k
    auto local_state = LocalStateType::create_unique(this, state);
505
70.4k
    RETURN_IF_ERROR(local_state->init(state, info));
506
70.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
70.4k
    return Status::OK();
508
70.4k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
135
                                                            LocalSinkStateInfo& info) {
504
135
    auto local_state = LocalStateType::create_unique(this, state);
505
135
    RETURN_IF_ERROR(local_state->init(state, info));
506
135
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
135
    return Status::OK();
508
135
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
513k
                                                            LocalSinkStateInfo& info) {
504
513k
    auto local_state = LocalStateType::create_unique(this, state);
505
513k
    RETURN_IF_ERROR(local_state->init(state, info));
506
513k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
513k
    return Status::OK();
508
513k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.39k
                                                            LocalSinkStateInfo& info) {
504
5.39k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.39k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.39k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.39k
    return Status::OK();
508
5.39k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
12.0k
                                                            LocalSinkStateInfo& info) {
504
12.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
12.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
12.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
12.0k
    return Status::OK();
508
12.0k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.67k
                                                            LocalSinkStateInfo& info) {
504
1.67k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.67k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.67k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.67k
    return Status::OK();
508
1.67k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
280
                                                            LocalSinkStateInfo& info) {
504
280
    auto local_state = LocalStateType::create_unique(this, state);
505
280
    RETURN_IF_ERROR(local_state->init(state, info));
506
280
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
280
    return Status::OK();
508
280
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.86k
                                                            LocalSinkStateInfo& info) {
504
4.86k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.86k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.86k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.86k
    return Status::OK();
508
4.86k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.62k
                                                            LocalSinkStateInfo& info) {
504
2.62k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.62k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.62k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.62k
    return Status::OK();
508
2.62k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.68k
                                                            LocalSinkStateInfo& info) {
504
2.68k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.68k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.68k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.68k
    return Status::OK();
508
2.68k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.55k
                                                            LocalSinkStateInfo& info) {
504
2.55k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.55k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.55k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.55k
    return Status::OK();
508
2.55k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4
                                                            LocalSinkStateInfo& info) {
504
4
    auto local_state = LocalStateType::create_unique(this, state);
505
4
    RETURN_IF_ERROR(local_state->init(state, info));
506
4
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4
    return Status::OK();
508
4
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
566
                                                            LocalSinkStateInfo& info) {
504
566
    auto local_state = LocalStateType::create_unique(this, state);
505
566
    RETURN_IF_ERROR(local_state->init(state, info));
506
566
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
566
    return Status::OK();
508
566
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
106
                                                            LocalSinkStateInfo& info) {
504
106
    auto local_state = LocalStateType::create_unique(this, state);
505
106
    RETURN_IF_ERROR(local_state->init(state, info));
506
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106
    return Status::OK();
508
106
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
509
510
template <typename LocalStateType>
511
1.38M
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.38M
    } else {
519
1.38M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.38M
        ss->id = operator_id();
521
1.38M
        for (auto& dest : dests_id()) {
522
1.38M
            ss->related_op_ids.insert(dest);
523
1.38M
        }
524
1.38M
        return ss;
525
1.38M
    }
526
1.38M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
100k
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
100k
    } else {
519
100k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
100k
        ss->id = operator_id();
521
100k
        for (auto& dest : dests_id()) {
522
100k
            ss->related_op_ids.insert(dest);
523
100k
        }
524
100k
        return ss;
525
100k
    }
526
100k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
351k
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
351k
    } else {
519
351k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
351k
        ss->id = operator_id();
521
351k
        for (auto& dest : dests_id()) {
522
349k
            ss->related_op_ids.insert(dest);
523
349k
        }
524
351k
        return ss;
525
351k
    }
526
351k
}
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
366
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
366
    } else {
519
366
        auto ss = LocalStateType::SharedStateType::create_shared();
520
366
        ss->id = operator_id();
521
366
        for (auto& dest : dests_id()) {
522
366
            ss->related_op_ids.insert(dest);
523
366
        }
524
366
        return ss;
525
366
    }
526
366
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
49.6k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
49.6k
    } else {
519
49.6k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
49.6k
        ss->id = operator_id();
521
49.6k
        for (auto& dest : dests_id()) {
522
49.4k
            ss->related_op_ids.insert(dest);
523
49.4k
        }
524
49.6k
        return ss;
525
49.6k
    }
526
49.6k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_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
}
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.90k
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.90k
    } else {
519
9.90k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9.90k
        ss->id = operator_id();
521
9.90k
        for (auto& dest : dests_id()) {
522
9.89k
            ss->related_op_ids.insert(dest);
523
9.89k
        }
524
9.90k
        return ss;
525
9.90k
    }
526
9.90k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
17
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
17
    } else {
519
17
        auto ss = LocalStateType::SharedStateType::create_shared();
520
17
        ss->id = operator_id();
521
17
        for (auto& dest : dests_id()) {
522
16
            ss->related_op_ids.insert(dest);
523
16
        }
524
17
        return ss;
525
17
    }
526
17
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
249k
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
249k
    } else {
519
249k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
249k
        ss->id = operator_id();
521
249k
        for (auto& dest : dests_id()) {
522
249k
            ss->related_op_ids.insert(dest);
523
249k
        }
524
249k
        return ss;
525
249k
    }
526
249k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
166
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
166
    } else {
519
166
        auto ss = LocalStateType::SharedStateType::create_shared();
520
166
        ss->id = operator_id();
521
166
        for (auto& dest : dests_id()) {
522
166
            ss->related_op_ids.insert(dest);
523
166
        }
524
166
        return ss;
525
166
    }
526
166
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
99.3k
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
99.3k
    } else {
519
99.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
99.3k
        ss->id = operator_id();
521
99.3k
        for (auto& dest : dests_id()) {
522
99.3k
            ss->related_op_ids.insert(dest);
523
99.3k
        }
524
99.3k
        return ss;
525
99.3k
    }
526
99.3k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
134
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
134
    } else {
519
134
        auto ss = LocalStateType::SharedStateType::create_shared();
520
134
        ss->id = operator_id();
521
134
        for (auto& dest : dests_id()) {
522
134
            ss->related_op_ids.insert(dest);
523
134
        }
524
134
        return ss;
525
134
    }
526
134
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
514k
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
514k
    } else {
519
514k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
514k
        ss->id = operator_id();
521
514k
        for (auto& dest : dests_id()) {
522
510k
            ss->related_op_ids.insert(dest);
523
510k
        }
524
514k
        return ss;
525
514k
    }
526
514k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.40k
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.40k
    } else {
519
5.40k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.40k
        ss->id = operator_id();
521
5.40k
        for (auto& dest : dests_id()) {
522
5.39k
            ss->related_op_ids.insert(dest);
523
5.39k
        }
524
5.40k
        return ss;
525
5.40k
    }
526
5.40k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
383
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
383
    } else {
519
383
        auto ss = LocalStateType::SharedStateType::create_shared();
520
383
        ss->id = operator_id();
521
383
        for (auto& dest : dests_id()) {
522
382
            ss->related_op_ids.insert(dest);
523
382
        }
524
383
        return ss;
525
383
    }
526
383
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.67k
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.67k
    } else {
519
2.67k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.67k
        ss->id = operator_id();
521
2.68k
        for (auto& dest : dests_id()) {
522
2.68k
            ss->related_op_ids.insert(dest);
523
2.68k
        }
524
2.67k
        return ss;
525
2.67k
    }
526
2.67k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.55k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.55k
    } else {
519
2.55k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.55k
        ss->id = operator_id();
521
2.55k
        for (auto& dest : dests_id()) {
522
2.55k
            ss->related_op_ids.insert(dest);
523
2.55k
        }
524
2.55k
        return ss;
525
2.55k
    }
526
2.55k
}
_ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
3
    } else {
519
3
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3
        ss->id = operator_id();
521
3
        for (auto& dest : dests_id()) {
522
3
            ss->related_op_ids.insert(dest);
523
3
        }
524
3
        return ss;
525
3
    }
526
3
}
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
565
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
565
    } else {
519
565
        auto ss = LocalStateType::SharedStateType::create_shared();
520
565
        ss->id = operator_id();
521
565
        for (auto& dest : dests_id()) {
522
562
            ss->related_op_ids.insert(dest);
523
562
        }
524
565
        return ss;
525
565
    }
526
565
}
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.96M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.96M
    auto local_state = LocalStateType::create_unique(state, this);
531
1.96M
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.96M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.96M
    return Status::OK();
534
1.96M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
69.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
69.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
69.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
69.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
69.4k
    return Status::OK();
534
69.4k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
252k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
252k
    auto local_state = LocalStateType::create_unique(state, this);
531
252k
    RETURN_IF_ERROR(local_state->init(state, info));
532
252k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
252k
    return Status::OK();
534
252k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
127
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
127
    auto local_state = LocalStateType::create_unique(state, this);
531
127
    RETURN_IF_ERROR(local_state->init(state, info));
532
127
    state->emplace_local_state(operator_id(), std::move(local_state));
533
127
    return Status::OK();
534
127
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.25k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.25k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.25k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.25k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.25k
    return Status::OK();
534
3.25k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.76k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.76k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.76k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.76k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.76k
    return Status::OK();
534
9.76k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.69k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.69k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.69k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.69k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.69k
    return Status::OK();
534
8.69k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
157
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
157
    auto local_state = LocalStateType::create_unique(state, this);
531
157
    RETURN_IF_ERROR(local_state->init(state, info));
532
157
    state->emplace_local_state(operator_id(), std::move(local_state));
533
157
    return Status::OK();
534
157
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
239k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
239k
    auto local_state = LocalStateType::create_unique(state, this);
531
239k
    RETURN_IF_ERROR(local_state->init(state, info));
532
239k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
239k
    return Status::OK();
534
239k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
98.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
98.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
98.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
98.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
98.9k
    return Status::OK();
534
98.9k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
70.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
70.7k
    auto local_state = LocalStateType::create_unique(state, this);
531
70.7k
    RETURN_IF_ERROR(local_state->init(state, info));
532
70.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
70.7k
    return Status::OK();
534
70.7k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
125
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
125
    auto local_state = LocalStateType::create_unique(state, this);
531
125
    RETURN_IF_ERROR(local_state->init(state, info));
532
125
    state->emplace_local_state(operator_id(), std::move(local_state));
533
125
    return Status::OK();
534
125
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_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_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
261k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
261k
    auto local_state = LocalStateType::create_unique(state, this);
531
261k
    RETURN_IF_ERROR(local_state->init(state, info));
532
261k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
261k
    return Status::OK();
534
261k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.45k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.45k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.45k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.45k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.45k
    return Status::OK();
534
1.45k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.39k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.39k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.39k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.39k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.39k
    return Status::OK();
534
5.39k
}
_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.56k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.56k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.56k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.56k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.56k
    return Status::OK();
534
1.56k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
56.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.7k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.7k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.7k
    return Status::OK();
534
56.7k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.19k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.19k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.19k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.19k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.19k
    return Status::OK();
534
4.19k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
280
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
280
    auto local_state = LocalStateType::create_unique(state, this);
531
280
    RETURN_IF_ERROR(local_state->init(state, info));
532
280
    state->emplace_local_state(operator_id(), std::move(local_state));
533
280
    return Status::OK();
534
280
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.68k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.68k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.68k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.68k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.68k
    return Status::OK();
534
2.68k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.57k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.57k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.57k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.57k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.57k
    return Status::OK();
534
2.57k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
607
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
607
    auto local_state = LocalStateType::create_unique(state, this);
531
607
    RETURN_IF_ERROR(local_state->init(state, info));
532
607
    state->emplace_local_state(operator_id(), std::move(local_state));
533
607
    return Status::OK();
534
607
}
_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
610k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
610k
    auto local_state = LocalStateType::create_unique(state, this);
531
610k
    RETURN_IF_ERROR(local_state->init(state, info));
532
610k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
610k
    return Status::OK();
534
610k
}
_ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3
    auto local_state = LocalStateType::create_unique(state, this);
531
3
    RETURN_IF_ERROR(local_state->init(state, info));
532
3
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3
    return Status::OK();
534
3
}
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
14
    auto local_state = LocalStateType::create_unique(state, this);
531
14
    RETURN_IF_ERROR(local_state->init(state, info));
532
14
    state->emplace_local_state(operator_id(), std::move(local_state));
533
14
    return Status::OK();
534
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
169
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
169
    auto local_state = LocalStateType::create_unique(state, this);
531
169
    RETURN_IF_ERROR(local_state->init(state, info));
532
169
    state->emplace_local_state(operator_id(), std::move(local_state));
533
169
    return Status::OK();
534
169
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.20k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.20k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.20k
    return Status::OK();
534
2.20k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
802
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
802
    auto local_state = LocalStateType::create_unique(state, this);
531
802
    RETURN_IF_ERROR(local_state->init(state, info));
532
802
    state->emplace_local_state(operator_id(), std::move(local_state));
533
802
    return Status::OK();
534
802
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
676
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
676
    auto local_state = LocalStateType::create_unique(state, this);
531
676
    RETURN_IF_ERROR(local_state->init(state, info));
532
676
    state->emplace_local_state(operator_id(), std::move(local_state));
533
676
    return Status::OK();
534
676
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.01k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.01k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.01k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.01k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.01k
    return Status::OK();
534
8.01k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
230k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
230k
    auto local_state = LocalStateType::create_unique(state, this);
531
230k
    RETURN_IF_ERROR(local_state->init(state, info));
532
230k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
230k
    return Status::OK();
534
230k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.70M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
1.95M
        : _num_rows_returned(0),
542
1.95M
          _rows_returned_counter(nullptr),
543
1.95M
          _parent(parent),
544
1.95M
          _state(state),
545
1.95M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
1.96M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.96M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.96M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.96M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.96M
    _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.96M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.96M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.96M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.96M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1.96M
    if constexpr (!is_fake_shared) {
560
1.18M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
696k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
696k
                                    .first.get()
563
696k
                                    ->template cast<SharedStateArg>();
564
565
696k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
696k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
696k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
696k
        } else if (info.shared_state) {
569
423k
            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
423k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
423k
            _dependency = _shared_state->create_source_dependency(
576
423k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
423k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
423k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
423k
        } else {
580
62.7k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
3.79k
                DCHECK(false);
582
3.79k
            }
583
62.7k
        }
584
1.18M
    }
585
586
1.96M
    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.96M
    _rows_returned_counter =
591
1.96M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.96M
    _blocks_returned_counter =
593
1.96M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.96M
    _output_block_bytes_counter =
595
1.96M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.96M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.96M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.96M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.96M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.96M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.96M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.96M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.96M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.96M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.96M
    _memory_used_counter =
606
1.96M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.96M
    _common_profile->add_info_string("IsColocate",
608
1.96M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.96M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.96M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.96M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.96M
    return Status::OK();
613
1.96M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
69.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
69.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
69.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
69.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
69.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
69.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
69.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
69.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
69.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
69.4k
    if constexpr (!is_fake_shared) {
560
69.4k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
16.9k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
16.9k
                                    .first.get()
563
16.9k
                                    ->template cast<SharedStateArg>();
564
565
16.9k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
16.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
16.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
52.4k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
51.8k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
51.8k
            _dependency = _shared_state->create_source_dependency(
576
51.8k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
51.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
51.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.8k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
615
        }
584
69.4k
    }
585
586
69.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
69.4k
    _rows_returned_counter =
591
69.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
69.4k
    _blocks_returned_counter =
593
69.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
69.4k
    _output_block_bytes_counter =
595
69.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
69.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
69.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
69.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
69.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
69.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
69.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
69.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
69.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
69.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
69.4k
    _memory_used_counter =
606
69.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
69.4k
    _common_profile->add_info_string("IsColocate",
608
69.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
69.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
69.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
69.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
69.4k
    return Status::OK();
613
69.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
248k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
248k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
248k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
248k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
248k
    _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
248k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
248k
    _operator_profile->add_child(_common_profile.get(), true);
557
248k
    _operator_profile->add_child(_custom_profile.get(), true);
558
248k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
248k
    if constexpr (!is_fake_shared) {
560
248k
        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
248k
        } 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
243k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
243k
            _dependency = _shared_state->create_source_dependency(
576
243k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
243k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
243k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
243k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
5.09k
        }
584
248k
    }
585
586
248k
    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
248k
    _rows_returned_counter =
591
248k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
248k
    _blocks_returned_counter =
593
248k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
248k
    _output_block_bytes_counter =
595
248k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
248k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
248k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
248k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
248k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
248k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
248k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
248k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
248k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
248k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
248k
    _memory_used_counter =
606
248k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
248k
    _common_profile->add_info_string("IsColocate",
608
248k
                                     std::to_string(_parent->is_colocated_operator()));
609
248k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
248k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
248k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
248k
    return Status::OK();
613
248k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
157
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
157
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
157
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
157
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
157
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
157
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
157
    _operator_profile->add_child(_common_profile.get(), true);
557
157
    _operator_profile->add_child(_custom_profile.get(), true);
558
157
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
157
    if constexpr (!is_fake_shared) {
560
157
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
157
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
157
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
157
            _dependency = _shared_state->create_source_dependency(
576
157
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
157
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
157
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
157
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
157
    }
585
586
157
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
157
    _rows_returned_counter =
591
157
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
157
    _blocks_returned_counter =
593
157
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
157
    _output_block_bytes_counter =
595
157
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
157
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
157
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
157
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
157
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
157
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
157
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
157
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
157
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
157
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
157
    _memory_used_counter =
606
157
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
157
    _common_profile->add_info_string("IsColocate",
608
157
                                     std::to_string(_parent->is_colocated_operator()));
609
157
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
157
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
157
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
157
    return Status::OK();
613
157
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.40k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.40k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.40k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.40k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.40k
    _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.40k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.40k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.40k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.40k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.40k
    if constexpr (!is_fake_shared) {
560
5.40k
        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.40k
        } 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.39k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.39k
            _dependency = _shared_state->create_source_dependency(
576
5.39k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.39k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.39k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.39k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
14
        }
584
5.40k
    }
585
586
5.40k
    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.40k
    _rows_returned_counter =
591
5.40k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.40k
    _blocks_returned_counter =
593
5.40k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.40k
    _output_block_bytes_counter =
595
5.40k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.40k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.40k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.40k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.40k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.40k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.40k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.40k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.40k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.40k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.40k
    _memory_used_counter =
606
5.40k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.40k
    _common_profile->add_info_string("IsColocate",
608
5.40k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.40k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.40k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.40k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.40k
    return Status::OK();
613
5.40k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
9.88k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
9.88k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
9.88k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
9.88k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
9.88k
    _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.88k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
9.88k
    _operator_profile->add_child(_common_profile.get(), true);
557
9.88k
    _operator_profile->add_child(_custom_profile.get(), true);
558
9.88k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
9.88k
    if constexpr (!is_fake_shared) {
560
9.88k
        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.88k
        } 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.74k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
9.74k
            _dependency = _shared_state->create_source_dependency(
576
9.74k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
9.74k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
9.74k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
9.74k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
136
        }
584
9.88k
    }
585
586
9.88k
    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.88k
    _rows_returned_counter =
591
9.88k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
9.88k
    _blocks_returned_counter =
593
9.88k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
9.88k
    _output_block_bytes_counter =
595
9.88k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.88k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
9.88k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
9.88k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
9.88k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
9.88k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
9.88k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
9.88k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
9.88k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
9.88k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
9.88k
    _memory_used_counter =
606
9.88k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
9.88k
    _common_profile->add_info_string("IsColocate",
608
9.88k
                                     std::to_string(_parent->is_colocated_operator()));
609
9.88k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
9.88k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
9.88k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
9.88k
    return Status::OK();
613
9.88k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
99.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
99.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
99.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
99.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
99.2k
    _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
99.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
99.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
99.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
99.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
99.2k
    if constexpr (!is_fake_shared) {
560
99.2k
        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
99.2k
        } 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
97.9k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
97.9k
            _dependency = _shared_state->create_source_dependency(
576
97.9k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
97.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
97.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
97.9k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.24k
        }
584
99.2k
    }
585
586
99.2k
    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
99.2k
    _rows_returned_counter =
591
99.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
99.2k
    _blocks_returned_counter =
593
99.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
99.2k
    _output_block_bytes_counter =
595
99.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
99.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
99.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
99.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
99.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
99.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
99.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
99.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
99.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
99.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
99.2k
    _memory_used_counter =
606
99.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
99.2k
    _common_profile->add_info_string("IsColocate",
608
99.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
99.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
99.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
99.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
99.2k
    return Status::OK();
613
99.2k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
70.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
70.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
70.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
70.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
70.7k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
70.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
70.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
70.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
70.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
70.7k
    if constexpr (!is_fake_shared) {
560
70.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
70.7k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
70.7k
                                    .first.get()
563
70.7k
                                    ->template cast<SharedStateArg>();
564
565
70.7k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
70.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
70.7k
                    _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
70.7k
    }
585
586
70.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
70.7k
    _rows_returned_counter =
591
70.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
70.7k
    _blocks_returned_counter =
593
70.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
70.7k
    _output_block_bytes_counter =
595
70.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
70.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
70.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
70.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
70.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
70.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
70.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
70.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
70.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
70.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
70.7k
    _memory_used_counter =
606
70.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
70.7k
    _common_profile->add_info_string("IsColocate",
608
70.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
70.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
70.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
70.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
70.7k
    return Status::OK();
613
70.7k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
125
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
125
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
125
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
125
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
125
    _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
125
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
125
    _operator_profile->add_child(_common_profile.get(), true);
557
125
    _operator_profile->add_child(_custom_profile.get(), true);
558
125
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
125
    if constexpr (!is_fake_shared) {
560
125
        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
125
        } 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
125
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
125
            _dependency = _shared_state->create_source_dependency(
576
125
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
125
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
125
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
125
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
125
    }
585
586
125
    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
125
    _rows_returned_counter =
591
125
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
125
    _blocks_returned_counter =
593
125
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
125
    _output_block_bytes_counter =
595
125
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
125
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
125
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
125
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
125
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
125
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
125
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
125
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
125
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
125
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
125
    _memory_used_counter =
606
125
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
125
    _common_profile->add_info_string("IsColocate",
608
125
                                     std::to_string(_parent->is_colocated_operator()));
609
125
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
125
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
125
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
125
    return Status::OK();
613
125
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
781k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
781k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
781k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
781k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
781k
    _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
781k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
781k
    _operator_profile->add_child(_common_profile.get(), true);
557
781k
    _operator_profile->add_child(_custom_profile.get(), true);
558
781k
    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
781k
    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
781k
    _rows_returned_counter =
591
781k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
781k
    _blocks_returned_counter =
593
781k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
781k
    _output_block_bytes_counter =
595
781k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
781k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
781k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
781k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
781k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
781k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
781k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
781k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
781k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
781k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
781k
    _memory_used_counter =
606
781k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
781k
    _common_profile->add_info_string("IsColocate",
608
781k
                                     std::to_string(_parent->is_colocated_operator()));
609
781k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
781k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
781k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
781k
    return Status::OK();
613
781k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
56.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
56.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
56.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
56.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
56.7k
    _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.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
56.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
56.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
56.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
56.7k
    if constexpr (!is_fake_shared) {
560
56.7k
        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.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
4.83k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.83k
            _dependency = _shared_state->create_source_dependency(
576
4.83k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.83k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.83k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.9k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.9k
        }
584
56.7k
    }
585
586
56.7k
    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.7k
    _rows_returned_counter =
591
56.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
56.7k
    _blocks_returned_counter =
593
56.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
56.7k
    _output_block_bytes_counter =
595
56.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
56.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
56.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
56.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
56.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
56.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
56.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
56.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
56.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
56.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
56.7k
    _memory_used_counter =
606
56.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
56.7k
    _common_profile->add_info_string("IsColocate",
608
56.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
56.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
56.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
56.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
56.7k
    return Status::OK();
613
56.7k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4.20k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.20k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.20k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.20k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.20k
    _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.20k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.20k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.20k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.20k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.20k
    if constexpr (!is_fake_shared) {
560
4.20k
        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.20k
        } 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.17k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.17k
            _dependency = _shared_state->create_source_dependency(
576
4.17k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.17k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.17k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.17k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
28
        }
584
4.20k
    }
585
586
4.20k
    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.20k
    _rows_returned_counter =
591
4.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.20k
    _blocks_returned_counter =
593
4.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.20k
    _output_block_bytes_counter =
595
4.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.20k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.20k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.20k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.20k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.20k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.20k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.20k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.20k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.20k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.20k
    _memory_used_counter =
606
4.20k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.20k
    _common_profile->add_info_string("IsColocate",
608
4.20k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.20k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.20k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.20k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.20k
    return Status::OK();
613
4.20k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
382
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
382
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
382
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
382
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
382
    _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
382
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
382
    _operator_profile->add_child(_common_profile.get(), true);
557
382
    _operator_profile->add_child(_custom_profile.get(), true);
558
382
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
382
    if constexpr (!is_fake_shared) {
560
382
        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
382
        } 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
377
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
377
            _dependency = _shared_state->create_source_dependency(
576
377
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
377
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
377
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
377
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
5
        }
584
382
    }
585
586
382
    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
382
    _rows_returned_counter =
591
382
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
382
    _blocks_returned_counter =
593
382
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
382
    _output_block_bytes_counter =
595
382
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
382
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
382
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
382
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
382
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
382
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
382
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
382
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
382
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
382
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
382
    _memory_used_counter =
606
382
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
382
    _common_profile->add_info_string("IsColocate",
608
382
                                     std::to_string(_parent->is_colocated_operator()));
609
382
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
382
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
382
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
382
    return Status::OK();
613
382
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.28k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.28k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.28k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.28k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.28k
    _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.28k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.28k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.28k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.28k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.28k
    if constexpr (!is_fake_shared) {
560
5.28k
        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.28k
        } 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.24k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.24k
            _dependency = _shared_state->create_source_dependency(
576
5.24k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.24k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.24k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.24k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
36
        }
584
5.28k
    }
585
586
5.28k
    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.28k
    _rows_returned_counter =
591
5.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.28k
    _blocks_returned_counter =
593
5.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.28k
    _output_block_bytes_counter =
595
5.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.28k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.28k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.28k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.28k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.28k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.28k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.28k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.28k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.28k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.28k
    _memory_used_counter =
606
5.28k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.28k
    _common_profile->add_info_string("IsColocate",
608
5.28k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.28k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.28k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.28k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.28k
    return Status::OK();
613
5.28k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
612k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
612k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
612k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
612k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
612k
    _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
612k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
612k
    _operator_profile->add_child(_common_profile.get(), true);
557
612k
    _operator_profile->add_child(_custom_profile.get(), true);
558
612k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
612k
    if constexpr (!is_fake_shared) {
560
612k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
608k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
608k
                                    .first.get()
563
608k
                                    ->template cast<SharedStateArg>();
564
565
608k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
608k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
608k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
608k
        } 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
3.79k
        } else {
580
3.79k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
3.79k
                DCHECK(false);
582
3.79k
            }
583
3.79k
        }
584
612k
    }
585
586
612k
    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
612k
    _rows_returned_counter =
591
612k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
612k
    _blocks_returned_counter =
593
612k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
612k
    _output_block_bytes_counter =
595
612k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
612k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
612k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
612k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
612k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
612k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
612k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
612k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
612k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
612k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
612k
    _memory_used_counter =
606
612k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
612k
    _common_profile->add_info_string("IsColocate",
608
612k
                                     std::to_string(_parent->is_colocated_operator()));
609
612k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
612k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
612k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
612k
    return Status::OK();
613
612k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
169
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
169
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
169
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
169
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
169
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
169
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
169
    _operator_profile->add_child(_common_profile.get(), true);
557
169
    _operator_profile->add_child(_custom_profile.get(), true);
558
169
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
169
    if constexpr (!is_fake_shared) {
560
169
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
169
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
169
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
169
            _dependency = _shared_state->create_source_dependency(
576
169
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
169
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
169
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
169
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
169
    }
585
586
169
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
169
    _rows_returned_counter =
591
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
169
    _blocks_returned_counter =
593
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
169
    _output_block_bytes_counter =
595
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
169
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
169
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
169
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
169
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
169
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
169
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
169
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
169
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
169
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
169
    _memory_used_counter =
606
169
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
169
    _common_profile->add_info_string("IsColocate",
608
169
                                     std::to_string(_parent->is_colocated_operator()));
609
169
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
169
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
169
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
169
    return Status::OK();
613
169
}
614
615
template <typename SharedStateArg>
616
1.97M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.97M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.28M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
312k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
312k
    }
621
1.97M
    if (_parent->has_projection()) {
622
399k
        const auto& projection = *_parent->_projection;
623
399k
        _projections.resize(projection.projections.size());
624
2.46M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.06M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.06M
        }
627
399k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
421k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
22.5k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
384k
            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
22.5k
        }
635
399k
    }
636
1.97M
    return Status::OK();
637
1.97M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
69.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
69.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
71.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.63k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.63k
    }
621
69.8k
    if (_parent->has_projection()) {
622
69.7k
        const auto& projection = *_parent->_projection;
623
69.7k
        _projections.resize(projection.projections.size());
624
382k
        for (size_t i = 0; i < _projections.size(); i++) {
625
312k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
312k
        }
627
69.7k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
80.7k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10.9k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
313k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
302k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
302k
                        state, _intermediate_projections[i][j]));
633
302k
            }
634
10.9k
        }
635
69.7k
    }
636
69.8k
    return Status::OK();
637
69.8k
}
_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
249k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
249k
    _conjuncts.resize(_parent->_conjuncts.size());
618
249k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
249k
    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
249k
    return Status::OK();
637
249k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
154
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
154
    _conjuncts.resize(_parent->_conjuncts.size());
618
154
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
154
    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
154
    return Status::OK();
637
154
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.40k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.40k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.47k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
73
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
73
    }
621
5.40k
    if (_parent->has_projection()) {
622
5.40k
        const auto& projection = *_parent->_projection;
623
5.40k
        _projections.resize(projection.projections.size());
624
23.2k
        for (size_t i = 0; i < _projections.size(); i++) {
625
17.8k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
17.8k
        }
627
5.40k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.42k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
16
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
136
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
120
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
120
                        state, _intermediate_projections[i][j]));
633
120
            }
634
16
        }
635
5.40k
    }
636
5.40k
    return Status::OK();
637
5.40k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.93k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.93k
    _conjuncts.resize(_parent->_conjuncts.size());
618
10.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
830
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
830
    }
621
9.93k
    if (_parent->has_projection()) {
622
5.08k
        const auto& projection = *_parent->_projection;
623
5.08k
        _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.08k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.17k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
89
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
674
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
585
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
585
                        state, _intermediate_projections[i][j]));
633
585
            }
634
89
        }
635
5.08k
    }
636
9.93k
    return Status::OK();
637
9.93k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
99.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
99.3k
    _conjuncts.resize(_parent->_conjuncts.size());
618
100k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.60k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.60k
    }
621
99.3k
    if (_parent->has_projection()) {
622
32.4k
        const auto& projection = *_parent->_projection;
623
32.4k
        _projections.resize(projection.projections.size());
624
295k
        for (size_t i = 0; i < _projections.size(); i++) {
625
263k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
263k
        }
627
32.4k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
33.1k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
786
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
5.22k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
4.44k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
4.44k
                        state, _intermediate_projections[i][j]));
633
4.44k
            }
634
786
        }
635
32.4k
    }
636
99.3k
    return Status::OK();
637
99.3k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
70.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
70.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
70.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
16
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
16
    }
621
70.8k
    if (_parent->has_projection()) {
622
372
        const auto& projection = *_parent->_projection;
623
372
        _projections.resize(projection.projections.size());
624
1.48k
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.11k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.11k
        }
627
372
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
372
        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
372
    }
636
70.8k
    return Status::OK();
637
70.8k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
129
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
129
    _conjuncts.resize(_parent->_conjuncts.size());
618
129
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
129
    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
129
    return Status::OK();
637
129
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
786k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
786k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.09M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
308k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
308k
    }
621
786k
    if (_parent->has_projection()) {
622
273k
        const auto& projection = *_parent->_projection;
623
273k
        _projections.resize(projection.projections.size());
624
1.62M
        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
273k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
283k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10.6k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
61.9k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
51.3k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
51.3k
                        state, _intermediate_projections[i][j]));
633
51.3k
            }
634
10.6k
        }
635
273k
    }
636
786k
    return Status::OK();
637
786k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.9k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.9k
    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.9k
    if (_parent->has_projection()) {
622
12.3k
        const auto& projection = *_parent->_projection;
623
12.3k
        _projections.resize(projection.projections.size());
624
117k
        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.3k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.5k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
175
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
3.54k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.37k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.37k
                        state, _intermediate_projections[i][j]));
633
3.37k
            }
634
175
        }
635
12.3k
    }
636
56.9k
    return Status::OK();
637
56.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
25
    _conjuncts.resize(_parent->_conjuncts.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
25
    return Status::OK();
637
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
4.19k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.19k
    _conjuncts.resize(_parent->_conjuncts.size());
618
4.58k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
389
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
389
    }
621
4.19k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
4.19k
    return Status::OK();
637
4.19k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
383
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
383
    _conjuncts.resize(_parent->_conjuncts.size());
618
383
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
383
    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
383
    return Status::OK();
637
383
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.27k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.27k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.27k
    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.27k
    if (_parent->has_projection()) {
622
142
        const auto& projection = *_parent->_projection;
623
142
        _projections.resize(projection.projections.size());
624
392
        for (size_t i = 0; i < _projections.size(); i++) {
625
250
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
250
        }
627
142
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
142
        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
142
    }
636
5.27k
    return Status::OK();
637
5.27k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
615k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
615k
    _conjuncts.resize(_parent->_conjuncts.size());
618
615k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
615k
    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
615k
    return Status::OK();
637
615k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
8.97k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
8.97k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
8.97k
    _terminated = true;
645
8.97k
    return Status::OK();
646
8.97k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
352
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
352
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
352
    _terminated = true;
645
352
    return Status::OK();
646
352
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_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
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
31
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
31
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
31
    _terminated = true;
645
31
    return Status::OK();
646
31
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
41
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
41
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
41
    _terminated = true;
645
41
    return Status::OK();
646
41
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_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
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
6.98k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.98k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.98k
    _terminated = true;
645
6.98k
    return Status::OK();
646
6.98k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
71
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
71
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
71
    _terminated = true;
645
71
    return Status::OK();
646
71
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4
    _terminated = true;
645
4
    return Status::OK();
646
4
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4
    _terminated = true;
645
4
    return Status::OK();
646
4
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.39k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.39k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.39k
    _terminated = true;
645
1.39k
    return Status::OK();
646
1.39k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
37
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
37
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
37
    _terminated = true;
645
37
    return Status::OK();
646
37
}
647
648
template <typename SharedStateArg>
649
2.24M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.24M
    if (_closed) {
651
273k
        return Status::OK();
652
273k
    }
653
1.97M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.18M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.18M
    }
656
1.97M
    _closed = true;
657
1.97M
    return Status::OK();
658
2.24M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
69.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
69.7k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
69.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
69.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
69.7k
    }
656
69.7k
    _closed = true;
657
69.7k
    return Status::OK();
658
69.7k
}
_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
493k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
493k
    if (_closed) {
651
248k
        return Status::OK();
652
248k
    }
653
245k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
245k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
245k
    }
656
245k
    _closed = true;
657
245k
    return Status::OK();
658
493k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
157
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
157
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
157
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
157
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
157
    }
656
157
    _closed = true;
657
157
    return Status::OK();
658
157
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.39k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.39k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.39k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.39k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.39k
    }
656
5.39k
    _closed = true;
657
5.39k
    return Status::OK();
658
5.39k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
9.86k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
9.86k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
9.86k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
9.86k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
9.86k
    }
656
9.86k
    _closed = true;
657
9.86k
    return Status::OK();
658
9.86k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
99.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
99.2k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
99.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
99.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
99.2k
    }
656
99.2k
    _closed = true;
657
99.2k
    return Status::OK();
658
99.2k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
70.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
70.3k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
70.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
70.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
70.3k
    }
656
70.3k
    _closed = true;
657
70.3k
    return Status::OK();
658
70.3k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
124
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
124
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
124
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
124
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
124
    }
656
124
    _closed = true;
657
124
    return Status::OK();
658
124
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
805k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
805k
    if (_closed) {
651
18.9k
        return Status::OK();
652
18.9k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
786k
    _closed = true;
657
786k
    return Status::OK();
658
805k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56.9k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56.9k
    }
656
56.9k
    _closed = true;
657
56.9k
    return Status::OK();
658
56.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4.17k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.17k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.17k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.17k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.17k
    }
656
4.17k
    _closed = true;
657
4.17k
    return Status::OK();
658
4.17k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
562
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
562
    if (_closed) {
651
281
        return Status::OK();
652
281
    }
653
281
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
281
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
281
    }
656
281
    _closed = true;
657
281
    return Status::OK();
658
562
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.8k
    if (_closed) {
651
5.53k
        return Status::OK();
652
5.53k
    }
653
5.27k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.27k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.27k
    }
656
5.27k
    _closed = true;
657
5.27k
    return Status::OK();
658
10.8k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
616k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
616k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
616k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
616k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
616k
    }
656
616k
    _closed = true;
657
616k
    return Status::OK();
658
616k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
338
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
338
    if (_closed) {
651
178
        return Status::OK();
652
178
    }
653
160
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
160
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
160
    }
656
160
    _closed = true;
657
160
    return Status::OK();
658
338
}
659
660
template <typename SharedState>
661
1.71M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.71M
    _operator_profile =
664
1.71M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.71M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.71M
    _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.71M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.71M
    _operator_profile->add_child(_common_profile, true);
673
1.71M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.71M
    _operator_profile->set_metadata(_parent->node_id());
676
1.71M
    _wait_for_finish_dependency_timer =
677
1.71M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.71M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.71M
    if constexpr (!is_fake_shared) {
680
1.19M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.19M
            info.shared_state_map.end()) {
682
306k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
217k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
217k
            }
685
306k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
306k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
306k
                                                  ? 0
688
306k
                                                  : info.task_idx]
689
306k
                                  .get();
690
306k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
892k
        } else {
692
892k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
5
                DCHECK(false);
694
5
            }
695
892k
            _shared_state = info.shared_state->template cast<SharedState>();
696
892k
            _dependency = _shared_state->create_sink_dependency(
697
892k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
892k
        }
699
1.19M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.19M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.19M
    }
702
703
1.71M
    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.71M
    _rows_input_counter =
708
1.71M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.71M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.71M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.71M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.71M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.71M
    _memory_used_counter =
714
1.71M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.71M
    _common_profile->add_info_string("IsColocate",
716
1.71M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.71M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.71M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.71M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.71M
    return Status::OK();
721
1.71M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
117k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
117k
    _operator_profile =
664
117k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
117k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
117k
    _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
117k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
117k
    _operator_profile->add_child(_common_profile, true);
673
117k
    _operator_profile->add_child(_custom_profile, true);
674
675
117k
    _operator_profile->set_metadata(_parent->node_id());
676
117k
    _wait_for_finish_dependency_timer =
677
117k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
117k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
117k
    if constexpr (!is_fake_shared) {
680
117k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
117k
            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
17.3k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
17.3k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
17.3k
                                                  ? 0
688
17.3k
                                                  : info.task_idx]
689
17.3k
                                  .get();
690
17.3k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
100k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
100k
            _shared_state = info.shared_state->template cast<SharedState>();
696
100k
            _dependency = _shared_state->create_sink_dependency(
697
100k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
100k
        }
699
117k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
117k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
117k
    }
702
703
117k
    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
117k
    _rows_input_counter =
708
117k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
117k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
117k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
117k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
117k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
117k
    _memory_used_counter =
714
117k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
117k
    _common_profile->add_info_string("IsColocate",
716
117k
                                     std::to_string(_parent->is_colocated_operator()));
717
117k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
117k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
117k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
117k
    return Status::OK();
721
117k
}
_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
248k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
248k
    _operator_profile =
664
248k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
248k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
248k
    _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
248k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
248k
    _operator_profile->add_child(_common_profile, true);
673
248k
    _operator_profile->add_child(_custom_profile, true);
674
675
248k
    _operator_profile->set_metadata(_parent->node_id());
676
248k
    _wait_for_finish_dependency_timer =
677
248k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
248k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
248k
    if constexpr (!is_fake_shared) {
680
248k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
248k
            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
248k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
248k
            _shared_state = info.shared_state->template cast<SharedState>();
696
248k
            _dependency = _shared_state->create_sink_dependency(
697
248k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
248k
        }
699
248k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
248k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
248k
    }
702
703
248k
    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
248k
    _rows_input_counter =
708
248k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
248k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
248k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
248k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
248k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
248k
    _memory_used_counter =
714
248k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
248k
    _common_profile->add_info_string("IsColocate",
716
248k
                                     std::to_string(_parent->is_colocated_operator()));
717
248k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
248k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
248k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
248k
    return Status::OK();
721
248k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
164
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
164
    _operator_profile =
664
164
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
164
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
164
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
164
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
164
    _operator_profile->add_child(_common_profile, true);
673
164
    _operator_profile->add_child(_custom_profile, true);
674
675
164
    _operator_profile->set_metadata(_parent->node_id());
676
164
    _wait_for_finish_dependency_timer =
677
164
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
164
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
164
    if constexpr (!is_fake_shared) {
680
164
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
164
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
164
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
164
            _shared_state = info.shared_state->template cast<SharedState>();
696
164
            _dependency = _shared_state->create_sink_dependency(
697
164
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
164
        }
699
164
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
164
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
164
    }
702
703
164
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
164
    _rows_input_counter =
708
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
164
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
164
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
164
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
164
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
164
    _memory_used_counter =
714
164
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
164
    _common_profile->add_info_string("IsColocate",
716
164
                                     std::to_string(_parent->is_colocated_operator()));
717
164
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
164
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
164
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
164
    return Status::OK();
721
164
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.40k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.40k
    _operator_profile =
664
5.40k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.40k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.40k
    _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.40k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.40k
    _operator_profile->add_child(_common_profile, true);
673
5.40k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.40k
    _operator_profile->set_metadata(_parent->node_id());
676
5.40k
    _wait_for_finish_dependency_timer =
677
5.40k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.40k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.40k
    if constexpr (!is_fake_shared) {
680
5.40k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.40k
            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.40k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.40k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.40k
            _dependency = _shared_state->create_sink_dependency(
697
5.40k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.40k
        }
699
5.40k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.40k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.40k
    }
702
703
5.40k
    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.40k
    _rows_input_counter =
708
5.40k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.40k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.40k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.40k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.40k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.40k
    _memory_used_counter =
714
5.40k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.40k
    _common_profile->add_info_string("IsColocate",
716
5.40k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.40k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.40k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.40k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.40k
    return Status::OK();
721
5.40k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.91k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.91k
    _operator_profile =
664
9.91k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.91k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.91k
    _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.91k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.91k
    _operator_profile->add_child(_common_profile, true);
673
9.91k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.91k
    _operator_profile->set_metadata(_parent->node_id());
676
9.91k
    _wait_for_finish_dependency_timer =
677
9.91k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.91k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.91k
    if constexpr (!is_fake_shared) {
680
9.91k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.91k
            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.91k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.91k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.91k
            _dependency = _shared_state->create_sink_dependency(
697
9.91k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.91k
        }
699
9.91k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.91k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.91k
    }
702
703
9.91k
    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.91k
    _rows_input_counter =
708
9.91k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.91k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.91k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.91k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.91k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.91k
    _memory_used_counter =
714
9.91k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.91k
    _common_profile->add_info_string("IsColocate",
716
9.91k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.91k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.91k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.91k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.91k
    return Status::OK();
721
9.91k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
99.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
99.3k
    _operator_profile =
664
99.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
99.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
99.3k
    _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
99.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
99.3k
    _operator_profile->add_child(_common_profile, true);
673
99.3k
    _operator_profile->add_child(_custom_profile, true);
674
675
99.3k
    _operator_profile->set_metadata(_parent->node_id());
676
99.3k
    _wait_for_finish_dependency_timer =
677
99.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
99.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
99.3k
    if constexpr (!is_fake_shared) {
680
99.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
99.3k
            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
99.3k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
99.3k
            _shared_state = info.shared_state->template cast<SharedState>();
696
99.3k
            _dependency = _shared_state->create_sink_dependency(
697
99.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
99.3k
        }
699
99.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
99.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
99.3k
    }
702
703
99.3k
    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
99.3k
    _rows_input_counter =
708
99.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
99.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
99.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
99.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
99.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
99.3k
    _memory_used_counter =
714
99.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
99.3k
    _common_profile->add_info_string("IsColocate",
716
99.3k
                                     std::to_string(_parent->is_colocated_operator()));
717
99.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
99.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
99.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
99.3k
    return Status::OK();
721
99.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
70.7k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
70.7k
    _operator_profile =
664
70.7k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
70.7k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
70.7k
    _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
70.7k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
70.7k
    _operator_profile->add_child(_common_profile, true);
673
70.7k
    _operator_profile->add_child(_custom_profile, true);
674
675
70.7k
    _operator_profile->set_metadata(_parent->node_id());
676
70.7k
    _wait_for_finish_dependency_timer =
677
70.7k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
70.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
70.7k
    if constexpr (!is_fake_shared) {
680
70.7k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
70.8k
            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
70.8k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
70.8k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
70.8k
                                                  ? 0
688
70.8k
                                                  : info.task_idx]
689
70.8k
                                  .get();
690
70.8k
            _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
70.7k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
70.7k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
70.7k
    }
702
703
70.7k
    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
70.7k
    _rows_input_counter =
708
70.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
70.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
70.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
70.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
70.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
70.7k
    _memory_used_counter =
714
70.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
70.7k
    _common_profile->add_info_string("IsColocate",
716
70.7k
                                     std::to_string(_parent->is_colocated_operator()));
717
70.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
70.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
70.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
70.7k
    return Status::OK();
721
70.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
135
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
135
    _operator_profile =
664
135
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
135
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
135
    _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
135
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
135
    _operator_profile->add_child(_common_profile, true);
673
135
    _operator_profile->add_child(_custom_profile, true);
674
675
135
    _operator_profile->set_metadata(_parent->node_id());
676
135
    _wait_for_finish_dependency_timer =
677
135
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
135
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
135
    if constexpr (!is_fake_shared) {
680
135
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
135
            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
135
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
135
            _shared_state = info.shared_state->template cast<SharedState>();
696
135
            _dependency = _shared_state->create_sink_dependency(
697
135
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
135
        }
699
135
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
135
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
135
    }
702
703
135
    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
135
    _rows_input_counter =
708
135
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
135
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
135
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
135
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
135
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
135
    _memory_used_counter =
714
135
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
135
    _common_profile->add_info_string("IsColocate",
716
135
                                     std::to_string(_parent->is_colocated_operator()));
717
135
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
135
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
135
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
135
    return Status::OK();
721
135
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
514k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
514k
    _operator_profile =
664
514k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
514k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
514k
    _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
514k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
514k
    _operator_profile->add_child(_common_profile, true);
673
514k
    _operator_profile->add_child(_custom_profile, true);
674
675
514k
    _operator_profile->set_metadata(_parent->node_id());
676
514k
    _wait_for_finish_dependency_timer =
677
514k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
514k
    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
514k
    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
514k
    _rows_input_counter =
708
514k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
514k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
514k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
514k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
514k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
514k
    _memory_used_counter =
714
514k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
514k
    _common_profile->add_info_string("IsColocate",
716
514k
                                     std::to_string(_parent->is_colocated_operator()));
717
514k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
514k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
514k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
514k
    return Status::OK();
721
514k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.0k
    _operator_profile =
664
12.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.0k
    _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.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.0k
    _operator_profile->add_child(_common_profile, true);
673
12.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.0k
    _operator_profile->set_metadata(_parent->node_id());
676
12.0k
    _wait_for_finish_dependency_timer =
677
12.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.0k
    if constexpr (!is_fake_shared) {
680
12.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.0k
            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.0k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.0k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.0k
            _dependency = _shared_state->create_sink_dependency(
697
12.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.0k
        }
699
12.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.0k
    }
702
703
12.0k
    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.0k
    _rows_input_counter =
708
12.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.0k
    _memory_used_counter =
714
12.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.0k
    _common_profile->add_info_string("IsColocate",
716
12.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.0k
    return Status::OK();
721
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
381
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
381
    _operator_profile =
664
381
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
381
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
381
    _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
381
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
381
    _operator_profile->add_child(_common_profile, true);
673
381
    _operator_profile->add_child(_custom_profile, true);
674
675
381
    _operator_profile->set_metadata(_parent->node_id());
676
381
    _wait_for_finish_dependency_timer =
677
381
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
381
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
381
    if constexpr (!is_fake_shared) {
680
381
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
381
            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
381
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
381
            _shared_state = info.shared_state->template cast<SharedState>();
696
381
            _dependency = _shared_state->create_sink_dependency(
697
381
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
381
        }
699
381
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
381
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
381
    }
702
703
381
    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
381
    _rows_input_counter =
708
381
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
381
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
381
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
381
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
381
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
381
    _memory_used_counter =
714
381
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
381
    _common_profile->add_info_string("IsColocate",
716
381
                                     std::to_string(_parent->is_colocated_operator()));
717
381
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
381
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
381
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
381
    return Status::OK();
721
381
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.67k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.67k
    _operator_profile =
664
1.67k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.67k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.67k
    _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.67k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.67k
    _operator_profile->add_child(_common_profile, true);
673
1.67k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.67k
    _operator_profile->set_metadata(_parent->node_id());
676
1.67k
    _wait_for_finish_dependency_timer =
677
1.67k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.67k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.67k
    if constexpr (!is_fake_shared) {
680
1.67k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.67k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
1.67k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.67k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.67k
            _dependency = _shared_state->create_sink_dependency(
697
1.67k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.67k
        }
699
1.67k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.67k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.67k
    }
702
703
1.67k
    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.67k
    _rows_input_counter =
708
1.67k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.67k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.67k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.67k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.67k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.67k
    _memory_used_counter =
714
1.67k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.67k
    _common_profile->add_info_string("IsColocate",
716
1.67k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.67k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.67k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.67k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.67k
    return Status::OK();
721
1.67k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.8k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.8k
    _operator_profile =
664
12.8k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.8k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.8k
    _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.8k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.8k
    _operator_profile->add_child(_common_profile, true);
673
12.8k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.8k
    _operator_profile->set_metadata(_parent->node_id());
676
12.8k
    _wait_for_finish_dependency_timer =
677
12.8k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.8k
    if constexpr (!is_fake_shared) {
680
12.8k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.8k
            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.8k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.8k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.8k
            _dependency = _shared_state->create_sink_dependency(
697
12.8k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.8k
        }
699
12.8k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.8k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.8k
    }
702
703
12.8k
    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.8k
    _rows_input_counter =
708
12.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.8k
    _memory_used_counter =
714
12.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.8k
    _common_profile->add_info_string("IsColocate",
716
12.8k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.8k
    return Status::OK();
721
12.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
217k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
217k
    _operator_profile =
664
217k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
217k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
217k
    _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
217k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
217k
    _operator_profile->add_child(_common_profile, true);
673
217k
    _operator_profile->add_child(_custom_profile, true);
674
675
217k
    _operator_profile->set_metadata(_parent->node_id());
676
217k
    _wait_for_finish_dependency_timer =
677
217k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
217k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
217k
    if constexpr (!is_fake_shared) {
680
217k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
217k
            info.shared_state_map.end()) {
682
217k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
217k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
217k
            }
685
217k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
217k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
217k
                                                  ? 0
688
217k
                                                  : info.task_idx]
689
217k
                                  .get();
690
217k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
217k
        } else {
692
5
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
5
                DCHECK(false);
694
5
            }
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
217k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
217k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
217k
    }
702
703
217k
    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
217k
    _rows_input_counter =
708
217k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
217k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
217k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
217k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
217k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
217k
    _memory_used_counter =
714
217k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
217k
    _common_profile->add_info_string("IsColocate",
716
217k
                                     std::to_string(_parent->is_colocated_operator()));
717
217k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
217k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
217k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
217k
    return Status::OK();
721
217k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
401k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
401k
    _operator_profile =
664
401k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
401k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
401k
    _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
401k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
401k
    _operator_profile->add_child(_common_profile, true);
673
401k
    _operator_profile->add_child(_custom_profile, true);
674
675
401k
    _operator_profile->set_metadata(_parent->node_id());
676
401k
    _wait_for_finish_dependency_timer =
677
401k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
401k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
401k
    if constexpr (!is_fake_shared) {
680
401k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
401k
            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
401k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
401k
            _shared_state = info.shared_state->template cast<SharedState>();
696
401k
            _dependency = _shared_state->create_sink_dependency(
697
401k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
401k
        }
699
401k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
401k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
401k
    }
702
703
401k
    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
401k
    _rows_input_counter =
708
401k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
401k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
401k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
401k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
401k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
401k
    _memory_used_counter =
714
401k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
401k
    _common_profile->add_info_string("IsColocate",
716
401k
                                     std::to_string(_parent->is_colocated_operator()));
717
401k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
401k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
401k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
401k
    return Status::OK();
721
401k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
25
    _operator_profile =
664
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
25
    _operator_profile->add_child(_common_profile, true);
673
25
    _operator_profile->add_child(_custom_profile, true);
674
675
25
    _operator_profile->set_metadata(_parent->node_id());
676
25
    _wait_for_finish_dependency_timer =
677
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
25
    if constexpr (!is_fake_shared) {
680
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
25
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
25
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
25
            _shared_state = info.shared_state->template cast<SharedState>();
696
25
            _dependency = _shared_state->create_sink_dependency(
697
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
25
        }
699
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
25
    }
702
703
25
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
25
    _rows_input_counter =
708
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
25
    _memory_used_counter =
714
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
25
    _common_profile->add_info_string("IsColocate",
716
25
                                     std::to_string(_parent->is_colocated_operator()));
717
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
25
    return Status::OK();
721
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
338
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
338
    _operator_profile =
664
338
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
338
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
338
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
338
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
338
    _operator_profile->add_child(_common_profile, true);
673
338
    _operator_profile->add_child(_custom_profile, true);
674
675
338
    _operator_profile->set_metadata(_parent->node_id());
676
338
    _wait_for_finish_dependency_timer =
677
338
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
338
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
338
    if constexpr (!is_fake_shared) {
680
338
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
338
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
338
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
338
            _shared_state = info.shared_state->template cast<SharedState>();
696
338
            _dependency = _shared_state->create_sink_dependency(
697
338
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
338
        }
699
338
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
338
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
338
    }
702
703
338
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
338
    _rows_input_counter =
708
338
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
338
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
338
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
338
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
338
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
338
    _memory_used_counter =
714
338
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
338
    _common_profile->add_info_string("IsColocate",
716
338
                                     std::to_string(_parent->is_colocated_operator()));
717
338
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
338
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
338
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
338
    return Status::OK();
721
338
}
722
723
template <typename SharedState>
724
1.71M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.71M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.71M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.19M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.19M
    }
731
1.71M
    _closed = true;
732
1.71M
    return Status::OK();
733
1.71M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
117k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
117k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
117k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
117k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
117k
    }
731
117k
    _closed = true;
732
117k
    return Status::OK();
733
117k
}
_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
247k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
247k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
247k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
247k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
247k
    }
731
247k
    _closed = true;
732
247k
    return Status::OK();
733
247k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
155
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
155
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
153
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
153
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
153
    }
731
153
    _closed = true;
732
153
    return Status::OK();
733
155
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.37k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.37k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.37k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.37k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.37k
    }
731
5.37k
    _closed = true;
732
5.37k
    return Status::OK();
733
5.37k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.86k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.86k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.86k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.86k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.86k
    }
731
9.86k
    _closed = true;
732
9.86k
    return Status::OK();
733
9.86k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
99.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
99.0k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
99.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
99.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
99.0k
    }
731
99.0k
    _closed = true;
732
99.0k
    return Status::OK();
733
99.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
70.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
70.3k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
70.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
70.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
70.3k
    }
731
70.3k
    _closed = true;
732
70.3k
    return Status::OK();
733
70.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
124
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
124
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
124
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
124
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
124
    }
731
124
    _closed = true;
732
124
    return Status::OK();
733
124
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
515k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
515k
    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
515k
    _closed = true;
732
515k
    return Status::OK();
733
515k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.0k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.0k
    }
731
12.0k
    _closed = true;
732
12.0k
    return Status::OK();
733
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
279
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
279
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
279
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
279
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
279
    }
731
279
    _closed = true;
732
279
    return Status::OK();
733
279
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.68k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.68k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.68k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.68k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.68k
    }
731
1.68k
    _closed = true;
732
1.68k
    return Status::OK();
733
1.68k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.8k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.8k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.8k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.8k
    }
731
12.8k
    _closed = true;
732
12.8k
    return Status::OK();
733
12.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
218k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
218k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
218k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
218k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
218k
    }
731
218k
    _closed = true;
732
218k
    return Status::OK();
733
218k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
401k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
401k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
401k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
401k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
401k
    }
731
401k
    _closed = true;
732
401k
    return Status::OK();
733
401k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
14
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
14
    }
731
14
    _closed = true;
732
14
    return Status::OK();
733
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
338
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
338
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
338
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
338
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
338
    }
731
338
    _closed = true;
732
338
    return Status::OK();
733
338
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
1.05k
                                                          bool* eos) {
738
1.05k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.04k
    return pull(state, block, eos);
740
1.05k
}
_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.01k
                                                          bool* eos) {
738
1.01k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.00k
    return pull(state, block, eos);
740
1.01k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
450k
                                                         bool* eos) {
745
450k
    auto& local_state = get_local_state(state);
746
450k
    if (need_more_input_data(state)) {
747
418k
        local_state._child_block->clear_column_data(
748
418k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
418k
                        .num_slots());
750
418k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
418k
                state, local_state._child_block.get(), &local_state._child_eos));
752
418k
        *eos = local_state._child_eos;
753
418k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
49.3k
            return Status::OK();
755
49.3k
        }
756
369k
        {
757
369k
            SCOPED_TIMER(local_state.exec_time_counter());
758
369k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
369k
        }
760
369k
    }
761
762
400k
    if (!need_more_input_data(state)) {
763
376k
        SCOPED_TIMER(local_state.exec_time_counter());
764
376k
        bool new_eos = false;
765
376k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
376k
        if (new_eos) {
767
299k
            *eos = true;
768
299k
        } else if (!need_more_input_data(state)) {
769
24.2k
            *eos = false;
770
24.2k
        }
771
376k
    }
772
400k
    return Status::OK();
773
400k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
130k
                                                         bool* eos) {
745
130k
    auto& local_state = get_local_state(state);
746
130k
    if (need_more_input_data(state)) {
747
111k
        local_state._child_block->clear_column_data(
748
111k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
111k
                        .num_slots());
750
111k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
111k
                state, local_state._child_block.get(), &local_state._child_eos));
752
111k
        *eos = local_state._child_eos;
753
111k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
29.1k
            return Status::OK();
755
29.1k
        }
756
82.6k
        {
757
82.6k
            SCOPED_TIMER(local_state.exec_time_counter());
758
82.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
82.6k
        }
760
82.6k
    }
761
762
101k
    if (!need_more_input_data(state)) {
763
101k
        SCOPED_TIMER(local_state.exec_time_counter());
764
101k
        bool new_eos = false;
765
101k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
101k
        if (new_eos) {
767
45.0k
            *eos = true;
768
56.0k
        } else if (!need_more_input_data(state)) {
769
10.3k
            *eos = false;
770
10.3k
        }
771
101k
    }
772
101k
    return Status::OK();
773
101k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.48k
                                                         bool* eos) {
745
4.48k
    auto& local_state = get_local_state(state);
746
4.48k
    if (need_more_input_data(state)) {
747
2.58k
        local_state._child_block->clear_column_data(
748
2.58k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.58k
                        .num_slots());
750
2.58k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.58k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.58k
        *eos = local_state._child_eos;
753
2.58k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
487
            return Status::OK();
755
487
        }
756
2.10k
        {
757
2.10k
            SCOPED_TIMER(local_state.exec_time_counter());
758
2.10k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
2.10k
        }
760
2.10k
    }
761
762
4.01k
    if (!need_more_input_data(state)) {
763
4.01k
        SCOPED_TIMER(local_state.exec_time_counter());
764
4.01k
        bool new_eos = false;
765
4.01k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
4.01k
        if (new_eos) {
767
1.46k
            *eos = true;
768
2.54k
        } else if (!need_more_input_data(state)) {
769
1.90k
            *eos = false;
770
1.90k
        }
771
4.01k
    }
772
4.00k
    return Status::OK();
773
4.00k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.88k
                                                         bool* eos) {
745
1.88k
    auto& local_state = get_local_state(state);
746
1.88k
    if (need_more_input_data(state)) {
747
1.88k
        local_state._child_block->clear_column_data(
748
1.88k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.88k
                        .num_slots());
750
1.88k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.88k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.88k
        *eos = local_state._child_eos;
753
1.88k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
784
            return Status::OK();
755
784
        }
756
1.09k
        {
757
1.09k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.09k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.09k
        }
760
1.09k
    }
761
762
1.09k
    if (!need_more_input_data(state)) {
763
1.09k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.09k
        bool new_eos = false;
765
1.09k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.09k
        if (new_eos) {
767
802
            *eos = true;
768
802
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.09k
    }
772
1.09k
    return Status::OK();
773
1.09k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
16.2k
                                                         bool* eos) {
745
16.2k
    auto& local_state = get_local_state(state);
746
16.2k
    if (need_more_input_data(state)) {
747
16.2k
        local_state._child_block->clear_column_data(
748
16.2k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
16.2k
                        .num_slots());
750
16.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
16.2k
                state, local_state._child_block.get(), &local_state._child_eos));
752
16.2k
        *eos = local_state._child_eos;
753
16.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
2.21k
            return Status::OK();
755
2.21k
        }
756
14.0k
        {
757
14.0k
            SCOPED_TIMER(local_state.exec_time_counter());
758
14.0k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
14.0k
        }
760
14.0k
    }
761
762
14.0k
    if (!need_more_input_data(state)) {
763
8.09k
        SCOPED_TIMER(local_state.exec_time_counter());
764
8.09k
        bool new_eos = false;
765
8.09k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
8.09k
        if (new_eos) {
767
7.88k
            *eos = true;
768
7.88k
        } else if (!need_more_input_data(state)) {
769
17
            *eos = false;
770
17
        }
771
8.09k
    }
772
14.0k
    return Status::OK();
773
14.0k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
265k
                                                         bool* eos) {
745
265k
    auto& local_state = get_local_state(state);
746
265k
    if (need_more_input_data(state)) {
747
265k
        local_state._child_block->clear_column_data(
748
265k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
265k
                        .num_slots());
750
265k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
265k
                state, local_state._child_block.get(), &local_state._child_eos));
752
265k
        *eos = local_state._child_eos;
753
265k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
15.6k
            return Status::OK();
755
15.6k
        }
756
250k
        {
757
250k
            SCOPED_TIMER(local_state.exec_time_counter());
758
250k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
250k
        }
760
250k
    }
761
762
249k
    if (!need_more_input_data(state)) {
763
231k
        SCOPED_TIMER(local_state.exec_time_counter());
764
231k
        bool new_eos = false;
765
231k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
231k
        if (new_eos) {
767
230k
            *eos = true;
768
230k
        } else if (!need_more_input_data(state)) {
769
6
            *eos = false;
770
6
        }
771
231k
    }
772
249k
    return Status::OK();
773
249k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
21.0k
                                                         bool* eos) {
745
21.0k
    auto& local_state = get_local_state(state);
746
21.0k
    if (need_more_input_data(state)) {
747
9.46k
        local_state._child_block->clear_column_data(
748
9.46k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.46k
                        .num_slots());
750
9.46k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.46k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.46k
        *eos = local_state._child_eos;
753
9.46k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
458
            return Status::OK();
755
458
        }
756
9.00k
        {
757
9.00k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.00k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.00k
        }
760
9.00k
    }
761
762
20.5k
    if (!need_more_input_data(state)) {
763
19.9k
        SCOPED_TIMER(local_state.exec_time_counter());
764
19.9k
        bool new_eos = false;
765
19.9k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
19.9k
        if (new_eos) {
767
5.37k
            *eos = true;
768
14.5k
        } else if (!need_more_input_data(state)) {
769
11.5k
            *eos = false;
770
11.5k
        }
771
19.9k
    }
772
20.5k
    return Status::OK();
773
20.5k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
11.0k
                                                         bool* eos) {
745
11.0k
    auto& local_state = get_local_state(state);
746
11.0k
    if (need_more_input_data(state)) {
747
10.7k
        local_state._child_block->clear_column_data(
748
10.7k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
10.7k
                        .num_slots());
750
10.7k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
10.7k
                state, local_state._child_block.get(), &local_state._child_eos));
752
10.7k
        *eos = local_state._child_eos;
753
10.7k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
589
            return Status::OK();
755
589
        }
756
10.1k
        {
757
10.1k
            SCOPED_TIMER(local_state.exec_time_counter());
758
10.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
10.1k
        }
760
10.1k
    }
761
762
10.4k
    if (!need_more_input_data(state)) {
763
10.4k
        SCOPED_TIMER(local_state.exec_time_counter());
764
10.4k
        bool new_eos = false;
765
10.4k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
10.4k
        if (new_eos) {
767
7.88k
            *eos = true;
768
7.88k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
10.4k
    }
772
10.4k
    return Status::OK();
773
10.4k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
49.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.6k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.6k
                                                         "AsyncWriterDependency", true);
781
49.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.6k
                             _finish_dependency));
783
784
49.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.6k
    return Status::OK();
787
49.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
366
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
366
    RETURN_IF_ERROR(Base::init(state, info));
779
366
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
366
                                                         "AsyncWriterDependency", true);
781
366
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
366
                             _finish_dependency));
783
784
366
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
366
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
366
    return Status::OK();
787
366
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
49.2k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.2k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.2k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.2k
                                                         "AsyncWriterDependency", true);
781
49.2k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.2k
                             _finish_dependency));
783
784
49.2k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.2k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.2k
    return Status::OK();
787
49.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
6
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
6
    RETURN_IF_ERROR(Base::init(state, info));
779
6
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
6
                                                         "AsyncWriterDependency", true);
781
6
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
6
                             _finish_dependency));
783
784
6
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
6
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
6
    return Status::OK();
787
6
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
16
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
16
    RETURN_IF_ERROR(Base::init(state, info));
779
16
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
16
                                                         "AsyncWriterDependency", true);
781
16
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
16
                             _finish_dependency));
783
784
16
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
16
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
16
    return Status::OK();
787
16
}
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
50.1k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.1k
    RETURN_IF_ERROR(Base::open(state));
793
50.1k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
387k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
337k
        RETURN_IF_ERROR(
796
337k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
337k
    }
798
50.1k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.1k
    return Status::OK();
800
50.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
366
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
366
    RETURN_IF_ERROR(Base::open(state));
793
366
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.85k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.48k
        RETURN_IF_ERROR(
796
1.48k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.48k
    }
798
366
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
366
    return Status::OK();
800
366
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
49.7k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
49.7k
    RETURN_IF_ERROR(Base::open(state));
793
49.7k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
385k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
335k
        RETURN_IF_ERROR(
796
335k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
335k
    }
798
49.7k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
49.7k
    return Status::OK();
800
49.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
6
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
6
    RETURN_IF_ERROR(Base::open(state));
793
6
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
108
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
102
        RETURN_IF_ERROR(
796
102
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
102
    }
798
6
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
6
    return Status::OK();
800
6
}
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
65.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
65.6k
    return _writer->sink(block, eos);
806
65.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.67k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.67k
    return _writer->sink(block, eos);
806
1.67k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
63.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
63.9k
    return _writer->sink(block, eos);
806
63.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
6
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
6
    return _writer->sink(block, eos);
806
6
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
52
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
52
    return _writer->sink(block, eos);
806
52
}
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
50.1k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.1k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.1k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.1k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
50.2k
    if (_writer) {
818
50.2k
        Status st = _writer->get_writer_status();
819
50.2k
        if (exec_status.ok()) {
820
50.1k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.1k
                                                       : Status::Cancelled("force close"));
822
50.1k
        } else {
823
75
            _writer->force_close(exec_status);
824
75
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50.2k
        RETURN_IF_ERROR(st);
829
50.2k
    }
830
50.1k
    return Base::close(state, exec_status);
831
50.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
355
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
355
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
355
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
355
    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
355
    if (_writer) {
818
355
        Status st = _writer->get_writer_status();
819
355
        if (exec_status.ok()) {
820
355
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
355
                                                       : Status::Cancelled("force close"));
822
355
        } 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
355
        RETURN_IF_ERROR(st);
829
355
    }
830
355
    return Base::close(state, exec_status);
831
355
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
49.8k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
49.8k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
49.8k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
49.8k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
49.8k
    if (_writer) {
818
49.8k
        Status st = _writer->get_writer_status();
819
49.8k
        if (exec_status.ok()) {
820
49.7k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
49.7k
                                                       : Status::Cancelled("force close"));
822
49.7k
        } else {
823
75
            _writer->force_close(exec_status);
824
75
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
49.8k
        RETURN_IF_ERROR(st);
829
49.8k
    }
830
49.7k
    return Base::close(state, exec_status);
831
49.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
6
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
6
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
6
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
6
    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
6
    if (_writer) {
818
6
        Status st = _writer->get_writer_status();
819
6
        if (exec_status.ok()) {
820
6
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
6
                                                       : Status::Cancelled("force close"));
822
6
        } 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
6
        RETURN_IF_ERROR(st);
829
6
    }
830
6
    return Base::close(state, exec_status);
831
6
}
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